Class HighlightCategoryColorSource
java.lang.Object
org.jfree.chart3d.renderer.category.StandardCategoryColorSource
com.orsoncharts.demo.HighlightCategoryColorSource
- All Implemented Interfaces:
Serializable, org.jfree.chart3d.renderer.category.CategoryColorSource
public class HighlightCategoryColorSource
extends org.jfree.chart3d.renderer.category.StandardCategoryColorSource
A custom implementation of the
CategoryColorSource interface.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with default colors.HighlightCategoryColorSource(int row, int column, Color highlightColor, Color... colors) Creates a new instance with the supplied sequence of colors. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests this color source for equality with an arbitrary object.getColor(int series, int row, int column) Returns the color to use for the specified item.Returns the highlight color.intReturns the column index of the item to be highlighted.intReturns the row index of the item to be highlighted.voidsetHighlightColor(Color color) Sets the highlight color.voidsetHighlightColumnIndex(int index) Sets the column index of the item to highlight (you can set this to -1 to have no item highlighted).voidsetHighlightRowIndex(int index) Sets the row index of the item to highlight (you can set this to -1 to have no item highlighted).Methods inherited from class org.jfree.chart3d.renderer.category.StandardCategoryColorSource
getLegendColor, hashCode, style
-
Constructor Details
-
HighlightCategoryColorSource
public HighlightCategoryColorSource()Creates a new instance with default colors. -
HighlightCategoryColorSource
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:
row- the row index of the item to highlight (or -1).column- the column index of the item to highlight (or -1).highlightColor- the highlight color (nullnot permitted).colors- the colors (nullnot permitted).
-
-
Method Details
-
getHighlightRowIndex
public int getHighlightRowIndex()Returns the row index of the item to be highlighted. The default value is-1.- Returns:
- The row index.
-
setHighlightRowIndex
public void setHighlightRowIndex(int index) Sets the row index of the item to highlight (you can set this to -1 to have no item highlighted).- Parameters:
index- the row index.
-
getHighlightColumnIndex
public int getHighlightColumnIndex()Returns the column index of the item to be highlighted. The default value is-1.- Returns:
- The row index.
-
setHighlightColumnIndex
public void setHighlightColumnIndex(int index) Sets the column index of the item to highlight (you can set this to -1 to have no item highlighted).- Parameters:
index- the row index.
-
getHighlightColor
Returns the highlight color. The default value isColor.RED.- Returns:
- The highlight color (never
null).
-
setHighlightColor
Sets the highlight color.- Parameters:
color- the color (nullnot permitted).
-
getColor
Returns the color to use for the specified item.- Specified by:
getColorin interfaceorg.jfree.chart3d.renderer.category.CategoryColorSource- Overrides:
getColorin classorg.jfree.chart3d.renderer.category.StandardCategoryColorSource- Parameters:
series- the series index.row- the row index.column- the column index.- Returns:
- The color (never
null).
-
equals
Tests this color source for equality with an arbitrary object.- Overrides:
equalsin classorg.jfree.chart3d.renderer.category.StandardCategoryColorSource- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-