org.jdesktop.swingx.decorator
public class CompoundHighlighter extends AbstractHighlighter implements UIDependent
Highlighter
s.Highlighter
Modifier and Type | Field and Description |
---|---|
static Highlighter[] |
EMPTY_HIGHLIGHTERS |
protected java.util.List<Highlighter> |
highlighters |
listenerList
Constructor and Description |
---|
CompoundHighlighter(Highlighter... inList)
Instantiates a CompoundHighlighter containing the given
Highlighter s. |
CompoundHighlighter(HighlightPredicate predicate,
Highlighter... inList)
Instantiates a CompoundHighlighter with the given predicate containing the given
Highlighter s. |
Modifier and Type | Method and Description |
---|---|
void |
addHighlighter(Highlighter highlighter)
Appends a highlighter to the pipeline.
|
void |
addHighlighter(Highlighter highlighter,
boolean prepend)
Adds a highlighter to the pipeline.
|
protected javax.swing.event.ChangeListener |
createHighlighterChangeListener()
Creates and returns the ChangeListener registered to
contained
Highlighter s. |
protected java.awt.Component |
doHighlight(java.awt.Component stamp,
ComponentAdapter adapter)
Apply the highlights.
|
protected javax.swing.event.ChangeListener |
getHighlighterChangeListener()
Returns the
ChangeListner to contained
Highlighter s. |
Highlighter[] |
getHighlighters()
Returns an array of contained Highlighters.
|
void |
removeHighlighter(Highlighter hl)
Removes a highlighter from the pipeline.
|
void |
setHighlighters(Highlighter... inList)
Sets the given
Highlighter s. |
void |
updateUI()
method to call after the LookAndFeel changed.
|
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
public static final Highlighter[] EMPTY_HIGHLIGHTERS
protected java.util.List<Highlighter> highlighters
public CompoundHighlighter(Highlighter... inList)
Highlighter
s.inList
- zero or more not-null Highlighters to manage by this
CompoundHighlighter.java.lang.NullPointerException
- if array is null or array contains null values.public CompoundHighlighter(HighlightPredicate predicate, Highlighter... inList)
Highlighter
s.predicate
- the highlightPredicate to useinList
- zero or more not-null Highlighters to manage by this
CompoundHighlighter.java.lang.NullPointerException
- if array is null or array contains null values.public void setHighlighters(Highlighter... inList)
Highlighter
s.inList
- zero or more not-null Highlighters to manage by this
CompoundHighlighter.java.lang.NullPointerException
- if array is null or array contains null values.public void addHighlighter(Highlighter highlighter)
highlighter
- highlighter to addjava.lang.NullPointerException
- if highlighter is null.public void addHighlighter(Highlighter highlighter, boolean prepend)
highlighter
- highlighter to addprepend
- prepend the highlighter if true; false will appendjava.lang.NullPointerException
- if highlighter is null.public void removeHighlighter(Highlighter hl)
hl
- highlighter to removepublic Highlighter[] getHighlighters()
public void updateUI()
Implemented to call updateUI on contained Highlighters.
updateUI
in interface UIDependent
protected javax.swing.event.ChangeListener getHighlighterChangeListener()
ChangeListner
to contained
Highlighter
s. The listener is lazily created.protected javax.swing.event.ChangeListener createHighlighterChangeListener()
Highlighter
s. Here: fires a
stateChanged on each notification.protected java.awt.Component doHighlight(java.awt.Component stamp, ComponentAdapter adapter)
doHighlight
in class AbstractHighlighter
stamp
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operationAbstractHighlighter.highlight(Component, ComponentAdapter)