com.infoviz.util
Class RandomColorFactory

java.lang.Object
  extended bycom.infoviz.util.RandomColorFactory
All Implemented Interfaces:
ColorFactory

public class RandomColorFactory
extends java.lang.Object
implements ColorFactory

Creates variety of colors. This class can be used to assign colors to different elements in a graph. We keep the saturation and brightness constant and change the hue to get different colors. Attempts are made to make sure that each color returned is sufficiently different from previously returned colors.

$Id$ $Revision$ $Author$


Constructor Summary
RandomColorFactory()
          creates color factory
 
Method Summary
 java.awt.Color getNextColor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomColorFactory

public RandomColorFactory()
creates color factory

Method Detail

getNextColor

public java.awt.Color getNextColor()
Specified by:
getNextColor in interface ColorFactory
Returns:
a color constructed using a random combination of rgb