|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.decorator.Highlighter
org.jdesktop.swing.decorator.AlternateRowHighlighter
AlternateRowHighlighter prepares a cell renderer to use different background colors for alternating rows in a data view.
| Field Summary | |
static Highlighter |
beige
|
static Highlighter |
classicLinePrinter
|
protected Color |
evenRowBackground
|
static Highlighter |
floralWhite
|
static Highlighter |
linePrinter
|
protected Color |
oddRowBackground
|
static Highlighter |
quickSilver
|
| Fields inherited from class org.jdesktop.swing.decorator.Highlighter |
background, foreground, ledgerBackground, notePadBackground, order, selectedBackground, selectedForeground |
| 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. |
|
| Method Summary | |
protected Color |
computeBackground(Component renderer,
ComponentAdapter adapter)
Computes the background color for the current rendering context for the specified adapter. |
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. |
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. |
void |
setEvenRowBackground(Color color)
Sets the background color for even rows to the specified color. |
void |
setOddRowBackground(Color color)
Sets the background color for odd rows to the specified color. |
| Methods inherited from class org.jdesktop.swing.decorator.Highlighter |
applyBackground, applyFont, applyForeground, computeForeground, computeSelectedBackground, computeSelectedForeground, doHighlight, getBackground, getForeground, getSelectedBackground, getSelectedForeground, highlight, setBackground, setForeground, setSelectedBackground, setSelectedForeground |
| 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
protected Color oddRowBackground
protected Color evenRowBackground
| 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 - | 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 rows
protected Color computeBackground(Component renderer,
ComponentAdapter adapter)
computeSelectedBackground
passing in the chosen raw background color as the seed color, but only if
the row being rendered is selected.
computeBackground in class Highlighterrenderer - the cell renderer componentadapter -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||