|
||||||||||
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.ConditionalHighlighter
public abstract class ConditionalHighlighter
ConditionalHighlighter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.swingx.decorator.Highlighter |
---|
Highlighter.UIHighlighter |
Field Summary | |
---|---|
protected int |
highlightColumn
|
protected int |
mask
|
protected int |
testColumn
|
Fields inherited from class org.jdesktop.swingx.decorator.Highlighter |
---|
changeEvent, immutable, ledgerBackground, listenerList, notePadBackground |
Constructor Summary | |
---|---|
ConditionalHighlighter()
|
|
ConditionalHighlighter(java.awt.Color cellBackground,
java.awt.Color cellForeground,
int testColumn,
int highlightColumn)
Constructs a ConditionalHighlighter instance with the
specified background and foreground colors that will be used to highlight
the renderer component for a cell in the specified highlightColumn of any
row if and only if needsHighlight returns true
for the adapter that identifies that cell. |
Method Summary | |
---|---|
protected java.awt.Color |
computeSelectedForeground(java.awt.Color seed)
Computes the selected foreground color. |
protected java.awt.Component |
doMask(java.awt.Component renderer,
ComponentAdapter adapter)
?? |
int |
getHighlightColumnIndex()
|
int |
getMask()
JW ?? |
int |
getTestColumnIndex()
|
java.awt.Component |
highlight(java.awt.Component renderer,
ComponentAdapter adapter)
Performs a conditional highlight. |
protected void |
maskBackground(java.awt.Component renderer,
ComponentAdapter adapter)
?? |
protected void |
maskForeground(java.awt.Component renderer,
ComponentAdapter adapter)
?? |
protected boolean |
needsHighlight(ComponentAdapter adapter)
Checks if the cell identified by the specified adapter is a potential candidate for highlighting, and returns true if so; otherwise, it returns false. |
void |
setHighlightColumnIndex(int columnIndex)
|
void |
setMask(int alpha)
JW ?? |
void |
setTestColumnIndex(int columnIndex)
|
protected abstract boolean |
test(ComponentAdapter adapter)
Tests if the cell identified by the specified adapter should actually be highlighted, and returns true if so; otherwise, it returns false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int testColumn
protected int highlightColumn
protected int mask
Constructor Detail |
---|
public ConditionalHighlighter()
public ConditionalHighlighter(java.awt.Color cellBackground, java.awt.Color cellForeground, int testColumn, int highlightColumn)
Constructs a ConditionalHighlighter
instance with the
specified background and foreground colors that will be used to highlight
the renderer component for a cell in the specified highlightColumn of any
row if and only if needsHighlight
returns true
for the adapter that identifies that cell.
cellBackground
- background color for highlighted cells, or null, if
background should not be changedcellForeground
- foreground color for highlighted cells, or null, if
foreground should not be changedtestColumn
- column whose value is to be tested to determine if a
cell should be highlightedhighlightColumn
- column whose index is used to determine if a cell
could be highlighted; may be a valid column index in model
coordinates, or -1 to indicate all columnsMethod Detail |
---|
public void setMask(int alpha)
public int getMask()
public java.awt.Component highlight(java.awt.Component renderer, ComponentAdapter adapter)
doHighlight
if
and only if needsHighlight
returns true.
highlight
in class Highlighter
renderer
- adapter
-
protected java.awt.Component doMask(java.awt.Component renderer, ComponentAdapter adapter)
renderer
- adapter
-
protected void maskBackground(java.awt.Component renderer, ComponentAdapter adapter)
protected void maskForeground(java.awt.Component renderer, ComponentAdapter adapter)
renderer
- adapter
- protected java.awt.Color computeSelectedForeground(java.awt.Color seed)
Highlighter
computeSelectedForeground
in class Highlighter
seed
- initial foreground color; must cope with null!
public int getTestColumnIndex()
public void setTestColumnIndex(int columnIndex)
public int getHighlightColumnIndex()
public void setHighlightColumnIndex(int columnIndex)
protected boolean needsHighlight(ComponentAdapter adapter)
adapter
-
protected abstract boolean test(ComponentAdapter adapter)
adapter
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |