| java.lang.Object org.jdesktop.swingx.decorator.Highlighter org.jdesktop.swingx.decorator.AlternateRowHighlighter
AlternateRowHighlighter | public class AlternateRowHighlighter extends Highlighter (Code) | | AlternateRowHighlighter prepares a cell renderer to use different background
colors for alternating rows in a data view. The size (in terms of row count) of
an alternating group is configurable (defaults to 1);
author: Ramesh Gupta |
Inner Class :public static class UIAlternateRowHighlighter extends AlternateRowHighlighter implements UIHighlighter | |
Constructor Summary | |
public | AlternateRowHighlighter() Constructs a default AlternateRowHighlighter that prepares a
cell renderer to paint a white background for odd rows and a silver
(0xF0, 0xF0, 0xE0) background for even rows. | public | AlternateRowHighlighter(Color oddRowBackground, Color evenRowBackground, Color foreground) Constructs an AlternateRowHighlighter that prepares a
cell renderer to paint the specified background colors for odd and even
and even rows. | public | AlternateRowHighlighter(Color oddRowBackground, Color evenRowBackground, Color foreground, boolean immutable) |
AlternateRowHighlighter | public AlternateRowHighlighter()(Code) | | Constructs a default AlternateRowHighlighter that prepares a
cell renderer to paint a white background for odd rows and a silver
(0xF0, 0xF0, 0xE0) background for even rows.
|
AlternateRowHighlighter | public AlternateRowHighlighter(Color oddRowBackground, Color evenRowBackground, Color foreground)(Code) | | Constructs an AlternateRowHighlighter that prepares a
cell renderer to paint the specified background colors for odd and even
and even rows. A foreground color may also be specified. If null is
specified for the foreground color, the foreground color for the renderer
is unchanged. Otherwise, it is set to the specified foreground color for
both odd and even rows.
Parameters: oddRowBackground - Parameters: evenRowBackground - Parameters: foreground - |
AlternateRowHighlighter | public AlternateRowHighlighter(Color oddRowBackground, Color evenRowBackground, Color foreground, boolean immutable)(Code) | | |
getEvenRowBackground | public Color getEvenRowBackground()(Code) | | Returns the background color for even rows, or null if the background color
of the cell renderer should be left unchanged for even rows.
the background color for even rows, or null if the background colorof the cell renderer should be left unchanged for even rows |
getLinesPerGroup | public int getLinesPerGroup()(Code) | | |
getOddRowBackground | public Color getOddRowBackground()(Code) | | Returns the background color for odd rows, or null if the background color
of the cell renderer should be left unchanged for odd rows.
the background color for odd rows, or null if the background colorof the cell renderer should be left unchanged for odd rows |
isOddRow | protected boolean isOddRow(ComponentAdapter adapter)(Code) | | Parameters: adapter - true if the adapter's row should be colored with the oddRowBackground,false is not |
setEvenRowBackground | public void setEvenRowBackground(Color color)(Code) | | Sets the background color for even rows to the specified color. If null is
specified, the background color for even rows is left unchanged in the
renderer.
Parameters: color - the background color for even rows, or null if the backgroundcolor of the cell renderer should be left unchanged for even rows |
setLinesPerGroup | public void setLinesPerGroup(int linesPerGroup)(Code) | | |
setOddRowBackground | public void setOddRowBackground(Color color)(Code) | | Sets the background color for odd rows to the specified color. If null is
specified, the background color for odd rows is left unchanged in the
renderer
Parameters: color - the background color for odd rows, or null if the backgroundcolor of the cell renderer should be left unchanged for odd rows |
Methods inherited from org.jdesktop.swingx.decorator.Highlighter | public void addChangeListener(ChangeListener l)(Code)(Java Doc) protected void applyBackground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected void applyForeground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeBackground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeForeground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeSelectedBackground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeSelectedBackground(Color seed)(Code)(Java Doc) protected Color computeSelectedForeground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeSelectedForeground(Color seed)(Code)(Java Doc) protected Color computeUnselectedBackground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Color computeUnselectedForeground(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected Component doHighlight(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) protected void fireStateChanged()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public ChangeListener[] getChangeListeners()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Color getSelectedBackground()(Code)(Java Doc) public Color getSelectedForeground()(Code)(Java Doc) public Component highlight(Component renderer, ComponentAdapter adapter)(Code)(Java Doc) public boolean isImmutable()(Code)(Java Doc) public void removeChangeListener(ChangeListener l)(Code)(Java Doc) public void setBackground(Color color)(Code)(Java Doc) public void setForeground(Color color)(Code)(Java Doc) public void setSelectedBackground(Color color)(Code)(Java Doc) public void setSelectedForeground(Color color)(Code)(Java Doc)
|
|
|