Class PaletteSample

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, ListCellRenderer

public class PaletteSample extends JComponent implements ListCellRenderer
Deprecated.
This class is no longer supported (as of version 1.0.4). If you are creating contour plots, please try to use XYPlot and XYBlockRenderer.
A panel that displays a palette sample.
See Also:
  • Field Details

    • palette

      private ColorPalette palette
      Deprecated.
      The palette being displayed.
    • preferredSize

      private Dimension preferredSize
      Deprecated.
      The preferred size of the component;
  • Constructor Details

    • PaletteSample

      public PaletteSample(ColorPalette palette)
      Deprecated.
      Creates a new sample.
      Parameters:
      palette - the palette.
  • Method Details

    • getListCellRendererComponent

      public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
      Deprecated.
      Returns a list cell renderer for the stroke, so the sample can be displayed in a list or combo.
      Specified by:
      getListCellRendererComponent in interface ListCellRenderer
      Parameters:
      list - the list component.
      value - the value.
      index - the index.
      isSelected - a flag that indicates whether or not the item is selected.
      cellHasFocus - a flag that indicates whether or not the cell has the focus.
      Returns:
      The renderer.
    • getPalette

      public ColorPalette getPalette()
      Deprecated.
      Returns the current palette object being displayed.
      Returns:
      The palette.
    • getPreferredSize

      public Dimension getPreferredSize()
      Deprecated.
      Returns the preferred size of the component.
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      The preferred size.
    • paintComponent

      public void paintComponent(Graphics g)
      Deprecated.
      Draws the sample.
      Overrides:
      paintComponent in class JComponent
      Parameters:
      g - the graphics device.
    • setPalette

      public void setPalette(ColorPalette palette)
      Deprecated.
      Sets the palette object being displayed.
      Parameters:
      palette - the palette.