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 Details

    • HighlightCategoryColorSource

      public HighlightCategoryColorSource()
      Creates a new instance with default colors.
    • HighlightCategoryColorSource

      public HighlightCategoryColorSource(int row, int column, Color highlightColor, Color... colors)
      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 (null not permitted).
      colors - the colors (null not 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

      public Color getHighlightColor()
      Returns the highlight color. The default value is Color.RED.
      Returns:
      The highlight color (never null).
    • setHighlightColor

      public void setHighlightColor(Color color)
      Sets the highlight color.
      Parameters:
      color - the color (null not permitted).
    • getColor

      public Color getColor(int series, int row, int column)
      Returns the color to use for the specified item.
      Specified by:
      getColor in interface org.jfree.chart3d.renderer.category.CategoryColorSource
      Overrides:
      getColor in class org.jfree.chart3d.renderer.category.StandardCategoryColorSource
      Parameters:
      series - the series index.
      row - the row index.
      column - the column index.
      Returns:
      The color (never null).
    • equals

      public boolean equals(Object obj)
      Tests this color source for equality with an arbitrary object.
      Overrides:
      equals in class org.jfree.chart3d.renderer.category.StandardCategoryColorSource
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.