org.jfree.chart.editor
Class PaletteSample
JComponent
org.jfree.chart.editor.PaletteSample
- ListCellRenderer
extends JComponent
implements ListCellRenderer
A panel that displays a palette sample.
getListCellRendererComponent
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.
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.
getPreferredSize
public Dimension getPreferredSize()
Returns the preferred size of the component.
paintComponent
public void paintComponent(Graphics g)
Draws the sample.