|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.decorator.Highlighter
org.jdesktop.swingx.decorator.AlternateRowHighlighter
public class AlternateRowHighlighter
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);
Nested Class Summary | |
---|---|
static class |
AlternateRowHighlighter.UIAlternateRowHighlighter
|
Nested classes/interfaces inherited from class org.jdesktop.swingx.decorator.Highlighter |
---|
Highlighter.UIHighlighter |
Field Summary | |
---|---|
static Highlighter |
beige
|
static Highlighter |
classicLinePrinter
|
static Highlighter |
floralWhite
|
static AlternateRowHighlighter |
genericGrey
|
static Highlighter |
linePrinter
|
static Highlighter |
quickSilver
|
Fields inherited from class org.jdesktop.swingx.decorator.Highlighter |
---|
changeEvent, immutable, ledgerBackground, listenerList, notePadBackground |
Constructor Summary | |
---|---|
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. |
|
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. |
|
AlternateRowHighlighter(Color oddRowBackground,
Color evenRowBackground,
Color foreground,
boolean immutable)
|
Method Summary | |
---|---|
protected Color |
computeUnselectedBackground(Component renderer,
ComponentAdapter adapter)
Computes a suitable unselected background for the renderer component within the specified adapter and returns the computed color. |
Color |
getEvenRowBackground()
Returns the background color for even rows, or null if the background color of the cell renderer should be left unchanged for even rows. |
int |
getLinesPerGroup()
|
Color |
getOddRowBackground()
Returns the background color for odd rows, or null if the background color of the cell renderer should be left unchanged for odd rows. |
protected boolean |
isOddRow(ComponentAdapter adapter)
|
void |
setEvenRowBackground(Color color)
Sets the background color for even rows to the specified color. |
void |
setLinesPerGroup(int linesPerGroup)
|
void |
setOddRowBackground(Color color)
Sets the background color for odd rows to the specified color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Highlighter beige
public static final Highlighter linePrinter
public static final Highlighter classicLinePrinter
public static final Highlighter floralWhite
public static final Highlighter quickSilver
public static final AlternateRowHighlighter genericGrey
Constructor Detail |
---|
public AlternateRowHighlighter()
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)
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.
oddRowBackground
- evenRowBackground
- foreground
- public AlternateRowHighlighter(Color oddRowBackground, Color evenRowBackground, Color foreground, boolean immutable)
Method Detail |
---|
public Color getOddRowBackground()
public void setOddRowBackground(Color color)
color
- the background color for odd rows, or null if the background
color of the cell renderer should be left unchanged for odd rowspublic Color getEvenRowBackground()
public void setEvenRowBackground(Color color)
color
- the background color for even rows, or null if the background
color of the cell renderer should be left unchanged for even rowsprotected Color computeUnselectedBackground(Component renderer, ComponentAdapter adapter)
Highlighter
Computes a suitable unselected background for the renderer component within the specified adapter and returns the computed color. This implementation returns getBackground().
computeUnselectedBackground
in class Highlighter
protected boolean isOddRow(ComponentAdapter adapter)
adapter
-
public int getLinesPerGroup()
public void setLinesPerGroup(int linesPerGroup)
|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |