public class

PaletteSample

extends JComponent
implements ListCellRenderer
java.lang.Object
   ↳ java.awt.Component
     ↳ java.awt.Container
       ↳ javax.swing.JComponent
         ↳ org.jfree.chart.editor.PaletteSample

This class is 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.

Class Overview

A panel that displays a palette sample.

Summary

[Expand]
Inherited Constants
From class javax.swing.JComponent
From class java.awt.Component
From interface java.awt.image.ImageObserver
[Expand]
Inherited Fields
From class javax.swing.JComponent
Public Constructors
PaletteSample(ColorPalette palette)
Creates a new sample.
Public Methods
Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Returns a list cell renderer for the stroke, so the sample can be displayed in a list or combo.
ColorPalette getPalette()
Returns the current palette object being displayed.
Dimension getPreferredSize()
Returns the preferred size of the component.
void paintComponent(Graphics g)
Draws the sample.
void setPalette(ColorPalette palette)
Sets the palette object being displayed.
[Expand]
Inherited Methods
From class javax.swing.JComponent
From class java.awt.Container
From class java.awt.Component
From class java.lang.Object
From interface java.awt.MenuContainer
From interface java.awt.image.ImageObserver
From interface javax.swing.ListCellRenderer

Public Constructors

public PaletteSample (ColorPalette palette)

Creates a new sample.

Parameters
palette the palette.

Public Methods

public Component getListCellRendererComponent (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Returns a list cell renderer for the stroke, so the sample can be displayed in a list or combo.

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.

public ColorPalette getPalette ()

Returns the current palette object being displayed.

Returns
  • The palette.

public Dimension getPreferredSize ()

Returns the preferred size of the component.

Returns
  • The preferred size.

public void paintComponent (Graphics g)

Draws the sample.

Parameters
g the graphics device.

public void setPalette (ColorPalette palette)

Sets the palette object being displayed.

Parameters
palette the palette.