org.jdesktop.swingx.decorator
Class AlternateRowHighlighter

java.lang.Object
  extended by org.jdesktop.swingx.decorator.AbstractHighlighter
      extended by org.jdesktop.swingx.decorator.LegacyHighlighter
          extended by org.jdesktop.swingx.decorator.AlternateRowHighlighter
All Implemented Interfaces:
Highlighter
Direct Known Subclasses:
AlternateRowHighlighter.UIAlternateRowHighlighter

Deprecated. use HighlighterFactory instead

public class AlternateRowHighlighter
extends LegacyHighlighter

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
          Deprecated. use HighlighterFactory.UIColorHighlighter
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.decorator.LegacyHighlighter
LegacyHighlighter.UIHighlighter
 
Field Summary
static LegacyHighlighter beige
          Deprecated.  
static LegacyHighlighter classicLinePrinter
          Deprecated.  
static LegacyHighlighter floralWhite
          Deprecated.  
static AlternateRowHighlighter genericGrey
          Deprecated.  
static LegacyHighlighter linePrinter
          Deprecated.  
static LegacyHighlighter quickSilver
          Deprecated.  
 
Fields inherited from class org.jdesktop.swingx.decorator.LegacyHighlighter
immutable, ledgerBackground, notePadBackground
 
Fields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
listenerList
 
Constructor Summary
AlternateRowHighlighter()
          Deprecated. 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)
          Deprecated. 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)
          Deprecated.  
 
Method Summary
protected  Color computeUnselectedBackground(Component renderer, ComponentAdapter adapter)
          Deprecated. Computes a suitable unselected background for the renderer component within the specified adapter and returns the computed color.
 Color getEvenRowBackground()
          Deprecated. 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()
          Deprecated.  
 Color getOddRowBackground()
          Deprecated. 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)
          Deprecated.  
 void setEvenRowBackground(Color color)
          Deprecated. Sets the background color for even rows to the specified color.
 void setLinesPerGroup(int linesPerGroup)
          Deprecated.  
 void setOddRowBackground(Color color)
          Deprecated. Sets the background color for odd rows to the specified color.
 
Methods inherited from class org.jdesktop.swingx.decorator.LegacyHighlighter
addChangeListener, applyBackground, applyForeground, computeBackground, computeForeground, computeSelectedBackground, computeSelectedBackground, computeSelectedForeground, computeSelectedForeground, computeUnselectedForeground, doHighlight, getBackground, getForeground, getSelectedBackground, getSelectedForeground, highlight, isImmutable, setBackground, setForeground, setSelectedBackground, setSelectedForeground
 
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
fireStateChanged, getChangeListeners, getHighlightPredicate, removeChangeListener, setHighlightPredicate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beige

public static final LegacyHighlighter beige
Deprecated. 

linePrinter

public static final LegacyHighlighter linePrinter
Deprecated. 

classicLinePrinter

public static final LegacyHighlighter classicLinePrinter
Deprecated. 

floralWhite

public static final LegacyHighlighter floralWhite
Deprecated. 

quickSilver

public static final LegacyHighlighter quickSilver
Deprecated. 

genericGrey

public static final AlternateRowHighlighter genericGrey
Deprecated. 
Constructor Detail

AlternateRowHighlighter

public AlternateRowHighlighter()
Deprecated. 
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)
Deprecated. 
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 -
evenRowBackground -
foreground -

AlternateRowHighlighter

public AlternateRowHighlighter(Color oddRowBackground,
                               Color evenRowBackground,
                               Color foreground,
                               boolean immutable)
Deprecated. 
Method Detail

getOddRowBackground

public Color getOddRowBackground()
Deprecated. 
Returns the background color for odd rows, or null if the background color of the cell renderer should be left unchanged for odd rows.

Returns:
the background color for odd rows, or null if the background color of the cell renderer should be left unchanged for odd rows

setOddRowBackground

public void setOddRowBackground(Color color)
Deprecated. 
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 background color of the cell renderer should be left unchanged for odd rows

getEvenRowBackground

public Color getEvenRowBackground()
Deprecated. 
Returns the background color for even rows, or null if the background color of the cell renderer should be left unchanged for even rows.

Returns:
the background color for even rows, or null if the background color of the cell renderer should be left unchanged for even rows

setEvenRowBackground

public void setEvenRowBackground(Color color)
Deprecated. 
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 background color of the cell renderer should be left unchanged for even rows

computeUnselectedBackground

protected Color computeUnselectedBackground(Component renderer,
                                            ComponentAdapter adapter)
Deprecated. 
Description copied from class: LegacyHighlighter

Computes a suitable unselected background for the renderer component within the specified adapter and returns the computed color. This implementation returns getBackground().

Overrides:
computeUnselectedBackground in class LegacyHighlighter
Returns:
unselected background color

isOddRow

protected boolean isOddRow(ComponentAdapter adapter)
Deprecated. 
Parameters:
adapter -
Returns:
true if the adapter's row should be colored with the oddRowBackground, false is not

getLinesPerGroup

public int getLinesPerGroup()
Deprecated. 

setLinesPerGroup

public void setLinesPerGroup(int linesPerGroup)
Deprecated.