Module org.jfree.chart3d
Package org.jfree.chart3d.plot
Interface ColorSource<K extends Comparable<K>>
- All Known Implementing Classes:
StandardColorSource
public interface ColorSource<K extends Comparable<K>>
A color source for use by the
PiePlot3D
class. This is the
interface through which the plot will obtain colors for each data item
(segment) in the chart. A default implementation
(StandardColorSource
) is provided.-
Method Summary
-
Method Details
-
getColor
Returns the color for one data item in the chart. We return aColor
rather than a paint, because some manipulations that require aColor
instance are done for the shading during the 3D rendering.- Parameters:
key
- the key (null
not permitted).- Returns:
- The color.
-
setColor
Sets the color associated with the specified key. If the supplied color isnull
, this will have the effect of clearing any previous setting and reverting to the default color.- Parameters:
key
- the key (null
not permitted).color
- the color (null
permitted).
-
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).- Parameters:
colors
- the colors.- Since:
- 1.2
-