Interface XYZColorSource

All Known Implementing Classes:
StandardXYZColorSource

public interface XYZColorSource
A source of Color values for an XYZRenderer.

Classes that implement this interface should also implement java.io.Serializable, otherwise it will not be possible to serialize and deserialize charts that use the non-serializable instance.

  • Method Summary

    Modifier and Type
    Method
    Description
    getColor(int series, int item)
    Returns the color for one item in the plot.
    getLegendColor(int series)
    Returns the color that represents the specified series.
    void
    style(Color... colors)
    Restyles the source using the specified colors.
  • Method Details

    • getColor

      Color getColor(int series, int item)
      Returns the color for one item in the plot.
      Parameters:
      series - the series index.
      item - the item index.
      Returns:
      The color (never null).
    • getLegendColor

      Color getLegendColor(int series)
      Returns the color that represents the specified series.
      Parameters:
      series - the series index.
      Returns:
      The color (never null).
    • style

      void style(Color... colors)
      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