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
Highlighters.- 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 givenHighlighters.CompoundHighlighter(HighlightPredicate predicate, Highlighter... inList) Instantiates a CompoundHighlighter with the given predicate containing the givenHighlighters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHighlighter(Highlighter highlighter) Appends a highlighter to the pipeline.voidaddHighlighter(Highlighter highlighter, boolean prepend) Adds a highlighter to the pipeline.protected ChangeListenerCreates and returns the ChangeListener registered to containedHighlighters.protected ComponentdoHighlight(Component stamp, ComponentAdapter adapter) Apply the highlights.protected ChangeListenerReturns theChangeListnerto containedHighlighters.Returns an array of contained Highlighters.voidRemoves a highlighter from the pipeline.voidsetHighlighters(Highlighter... inList) Sets the givenHighlighters.voidupdateUI()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 givenHighlighters.- 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 givenHighlighters.- 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 givenHighlighters.- 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:
updateUIin interfaceUIDependent
-
getHighlighterChangeListener
Returns theChangeListnerto containedHighlighters. The listener is lazily created.- Returns:
- the listener for contained highlighters, guaranteed to be not null.
-
createHighlighterChangeListener
Creates and returns the ChangeListener registered to containedHighlighters. Here: fires a stateChanged on each notification.- Returns:
- the listener for contained Highlighters.
-
doHighlight
Apply the highlights.- Specified by:
doHighlightin classAbstractHighlighter- Parameters:
stamp- the cell renderer component that is to be decoratedadapter- the ComponentAdapter for this decorate operation- Returns:
- Component
component - See Also:
-