org.jfree.ui
public class StrokeSample extends JComponent implements ListCellRenderer
Constructor Summary | |
---|---|
StrokeSample(Stroke stroke)
Creates a StrokeSample for the specified stroke.
|
Method Summary | |
---|---|
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.
|
Dimension | getPreferredSize()
Returns the preferred size of the component.
|
Stroke | getStroke()
Returns the current Stroke object being displayed.
|
void | paintComponent(Graphics g)
Draws a line using the sample stroke.
|
void | setStroke(Stroke stroke)
Sets the Stroke object being displayed.
|
Parameters: stroke the sample stroke.
Parameters: list the list. value the value. index the index. isSelected selected? cellHasFocus focussed?
Returns: the component for rendering.
Returns: the preferred size of the component.
Returns: the stroke.
Parameters: g the graphics device.
Parameters: stroke the stroke.