Package org.jdesktop.swingx.decorator
Class CompoundHighlighter
java.lang.Object
org.jdesktop.swingx.decorator.AbstractHighlighter
org.jdesktop.swingx.decorator.CompoundHighlighter
- All Implemented Interfaces:
Highlighter
,UIDependent
A class which manages the lists of
Highlighter
s.- Author:
- Ramesh Gupta, Jeanette Winzenburg
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Highlighter[]
TODO docprotected List<Highlighter>
TODO docFields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionCompoundHighlighter
(Highlighter... inList) Instantiates a CompoundHighlighter containing the givenHighlighter
s.CompoundHighlighter
(HighlightPredicate predicate, Highlighter... inList) Instantiates a CompoundHighlighter with the given predicate containing the givenHighlighter
s. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHighlighter
(Highlighter highlighter) Appends a highlighter to the pipeline.void
addHighlighter
(Highlighter highlighter, boolean prepend) Adds a highlighter to the pipeline.protected ChangeListener
Creates and returns the ChangeListener registered to containedHighlighter
s.protected Component
doHighlight
(Component stamp, ComponentAdapter adapter) Apply the highlights.protected ChangeListener
Returns theChangeListner
to containedHighlighter
s.Returns an array of contained Highlighters.void
Removes a highlighter from the pipeline.void
setHighlighters
(Highlighter... inList) Sets the givenHighlighter
s.void
updateUI()
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
-
Field Details
-
EMPTY_HIGHLIGHTERS
TODO doc -
highlighters
TODO doc
-
-
Constructor Details
-
CompoundHighlighter
Instantiates a CompoundHighlighter containing the givenHighlighter
s.- Parameters:
inList
- zero or more not-null Highlighters to manage by this CompoundHighlighter.- Throws:
NullPointerException
- if array is null or array contains null values.
-
CompoundHighlighter
Instantiates a CompoundHighlighter with the given predicate containing the givenHighlighter
s.- Parameters:
predicate
- the highlightPredicate to useinList
- zero or more not-null Highlighters to manage by this CompoundHighlighter.- Throws:
NullPointerException
- if array is null or array contains null values.
-
-
Method Details
-
setHighlighters
Sets the givenHighlighter
s.- Parameters:
inList
- zero or more not-null Highlighters to manage by this CompoundHighlighter.- Throws:
NullPointerException
- if array is null or array contains null values.
-
addHighlighter
Appends a highlighter to the pipeline.- Parameters:
highlighter
- highlighter to add- Throws:
NullPointerException
- if highlighter is null.
-
addHighlighter
Adds a highlighter to the pipeline. PENDING: Duplicate inserts?- Parameters:
highlighter
- highlighter to addprepend
- prepend the highlighter if true; false will append- Throws:
NullPointerException
- if highlighter is null.
-
removeHighlighter
Removes a highlighter from the pipeline.- Parameters:
hl
- highlighter to remove
-
getHighlighters
Returns an array of contained Highlighters.- Returns:
- the contained Highlighters, might be empty but never null.
-
updateUI
public void updateUI()Implemented to call updateUI on contained Highlighters.
- Specified by:
updateUI
in interfaceUIDependent
-
getHighlighterChangeListener
Returns theChangeListner
to containedHighlighter
s. The listener is lazily created.- Returns:
- the listener for contained highlighters, guaranteed to be not null.
-
createHighlighterChangeListener
Creates and returns the ChangeListener registered to containedHighlighter
s. Here: fires a stateChanged on each notification.- Returns:
- the listener for contained Highlighters.
-
doHighlight
Apply the highlights.- Specified by:
doHighlight
in classAbstractHighlighter
- Parameters:
stamp
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operation- Returns:
- Component
component
- See Also:
-