java.lang.Object
org.jfree.chart3d.renderer.xyz.StandardXYZColorSource
- All Implemented Interfaces:
Serializable,XYZColorSource
A standard implementation of the
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
XYZColorSource interface.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with default colors.StandardXYZColorSource(Color... colors) Creates a new instance with the supplied sequence of colors. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests this paint source for equality with an arbitrary object.getColor(int series, int item) Returns the color to use for the specified item.getLegendColor(int series) Returns the color to use in the legend for the specified series.voidRestyles the source using the specified colors.
-
Constructor Details
-
StandardXYZColorSource
public StandardXYZColorSource()Creates a new instance with default colors. -
StandardXYZColorSource
Creates a new instance with the supplied sequence of colors. The supplied array must have at least one entry, and all entries must be non-null.- Parameters:
colors- the colors (nullnot permitted).
-
-
Method Details
-
getColor
Returns the color to use for the specified item.- Specified by:
getColorin interfaceXYZColorSource- Parameters:
series- the series index.item- the item index.- Returns:
- The color (never
null).
-
getLegendColor
Returns the color to use in the legend for the specified series.- Specified by:
getLegendColorin interfaceXYZColorSource- Parameters:
series- the series index.- Returns:
- The color (never
null).
-
style
Restyles the source using the specified colors. Refer to the implementing class to confirm the precise behaviour (typically all existing color settings are cleared and the specified colors are installed as the new defaults).- Specified by:
stylein interfaceXYZColorSource- Parameters:
colors- the colors.- Since:
- 1.2
-
equals
Tests this paint source for equality with an arbitrary object.
-