de.erichseifert.gral.plots.colors
Class RandomColors
- java.lang.Object
-
- de.erichseifert.gral.plots.colors.AbstractColorMapper<java.lang.Integer>
-
- de.erichseifert.gral.plots.colors.IndexedColorMapper
-
- de.erichseifert.gral.plots.colors.RandomColors
-
- All Implemented Interfaces:
- ColorMapper, java.io.Serializable
public class RandomColors extends IndexedColorMapper
Class that generates pseudo-random colors for specified index values.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.erichseifert.gral.plots.colors.ColorMapper
ColorMapper.Mode
-
-
Constructor Summary
Constructors Constructor and Description RandomColors()Creates a new RandomColors object with default seed.RandomColors(long seed)Creates a new instances with the specified seed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.Paintget(int index)Returns the Paint associated to the specified index value.float[]getColorVariance()Returns the current color variance.voidsetColorVariance(float[] colorVariance)Sets the current color variance.-
Methods inherited from class de.erichseifert.gral.plots.colors.IndexedColorMapper
get
-
Methods inherited from class de.erichseifert.gral.plots.colors.AbstractColorMapper
getMode
-
-
-
-
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 java.awt.Paint get(int index)
Returns the Paint associated to the specified index value.- Specified by:
getin classIndexedColorMapper- Parameters:
index- Numeric index.- Returns:
- Paint.
-
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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG