de.erichseifert.gral.plots.colors
Class IndexedColors
- java.lang.Object
-
- de.erichseifert.gral.plots.colors.AbstractColorMapper<java.lang.Integer>
-
- de.erichseifert.gral.plots.colors.IndexedColorMapper
-
- de.erichseifert.gral.plots.colors.IndexedColors
-
- All Implemented Interfaces:
- ColorMapper, java.io.Serializable
public class IndexedColors extends IndexedColorMapper
Maps index values to a specified color palette.- 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 IndexedColors(java.awt.Color color1, java.awt.Color... colors)Creates a new instance with at least one color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.Paintget(int index)Returns the Paint object associated to the specified index value.java.util.List<java.awt.Color>getColors()Returns the colors that are used for mapping.voidsetMode(ColorMapper.Mode mode)Sets how values outside of the mapping range will be handled.-
Methods inherited from class de.erichseifert.gral.plots.colors.IndexedColorMapper
get
-
Methods inherited from class de.erichseifert.gral.plots.colors.AbstractColorMapper
getMode
-
-
-
-
Constructor Detail
-
IndexedColors
public IndexedColors(java.awt.Color color1, java.awt.Color... colors)Creates a new instance with at least one color.- Parameters:
color1- First color.colors- Additional colors.
-
-
Method Detail
-
get
public java.awt.Paint get(int index)
Returns the Paint object associated to the specified index value.- Specified by:
getin classIndexedColorMapper- Parameters:
index- Numeric index.- Returns:
- Paint object.
-
getColors
public java.util.List<java.awt.Color> getColors()
Returns the colors that are used for mapping.- Returns:
- A list of colors in the order they are used as the color palette.
-
setMode
public void setMode(ColorMapper.Mode mode)
Description copied from class:AbstractColorMapperSets how values outside of the mapping range will be handled.- Parameters:
mode- Handling of values outside of the mapping range.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG