public class CompoundHighlighter extends AbstractHighlighter implements UIDependent
Highlighter
s.Highlighter
Modifier and Type | Field and Description |
---|---|
static Highlighter[] |
EMPTY_HIGHLIGHTERS |
private ChangeListener |
highlighterChangeListener
the listener for changes in contained Highlighters.
|
protected 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.
|
private void |
addHighlighterSilently(Highlighter highlighter,
boolean prepend) |
protected ChangeListener |
createHighlighterChangeListener()
Creates and returns the ChangeListener registered to
contained
Highlighter s. |
protected Component |
doHighlight(Component stamp,
ComponentAdapter adapter)
Apply the highlights.
|
protected ChangeListener |
getHighlighterChangeListener()
Returns the
ChangeListner to contained
Highlighter s. |
Highlighter[] |
getHighlighters()
Returns an array of contained Highlighters.
|
private void |
removeAllHighlightersSilently()
Removes all contained highlighters without firing an event.
|
void |
removeHighlighter(Highlighter hl)
Removes a highlighter from the pipeline.
|
void |
setHighlighters(Highlighter... inList)
Sets the given
Highlighter s. |
void |
updateUI()
Updates all internal visuals after changing a UI-delegate.
|
private void |
updateUI(Highlighter hl)
Updates the ui-dependent state of the given Highlighter.
|
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
public static final Highlighter[] EMPTY_HIGHLIGHTERS
protected List<Highlighter> highlighters
private ChangeListener highlighterChangeListener
public CompoundHighlighter(Highlighter... inList)
Highlighter
s.inList
- zero or more not-null Highlighters to manage by this
CompoundHighlighter.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.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.NullPointerException
- if array is null or array contains null values.private void removeAllHighlightersSilently()
public void addHighlighter(Highlighter highlighter)
highlighter
- highlighter to addNullPointerException
- if highlighter is null.public void addHighlighter(Highlighter highlighter, boolean prepend)
highlighter
- highlighter to addprepend
- prepend the highlighter if true; false will appendNullPointerException
- if highlighter is null.private void addHighlighterSilently(Highlighter highlighter, boolean prepend)
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
JComponent.updateUI()
protected ChangeListener getHighlighterChangeListener()
ChangeListner
to contained
Highlighter
s. The listener is lazily created.protected ChangeListener createHighlighterChangeListener()
Highlighter
s. Here: fires a
stateChanged on each notification.private void updateUI(Highlighter hl)
hl
- the highlighter to update.protected Component doHighlight(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)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses