de.erichseifert.gral.plots.colors
Class RandomColors

java.lang.Object
  extended by de.erichseifert.gral.plots.colors.RandomColors
All Implemented Interfaces:
ColorMapper

public class RandomColors
extends Object
implements ColorMapper

Class that generates pseudo-random colors.


Constructor Summary
RandomColors()
          Creates a new RandomColors object with default seed.
RandomColors(long seed)
          Creates a new instances with the specified seed.
 
Method Summary
 Color get(double value)
          Returns the Color according to the specified value.
 float[] getColorVariance()
          Returns the current color variance.
 void setColorVariance(float[] colorVariance)
          Sets the current color variance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomColors

public RandomColors()
Creates a new RandomColors object with default seed.


RandomColors

public RandomColors(long seed)
Creates a new instances with the specified seed.

Parameters:
seed - Random number seed.
Method Detail

get

public Color get(double value)
Description copied from interface: ColorMapper
Returns the Color according to the specified value.

Specified by:
get in interface ColorMapper
Parameters:
value - Value of color.
Returns:
Color.

getColorVariance

public float[] getColorVariance()
Returns the current color variance.

Returns:
Range of hue, saturation and brightness a color can have.

setColorVariance

public void setColorVariance(float[] colorVariance)
Sets the current color variance.

Parameters:
colorVariance - Range of hue, saturation and brightness a color can have.


Copyright © 2009-2010. All Rights Reserved.