Package org.jdesktop.swingx.decorator
Class ComponentOrientationHighlighter
java.lang.Object
org.jdesktop.swingx.decorator.AbstractHighlighter
org.jdesktop.swingx.decorator.ComponentOrientationHighlighter
- All Implemented Interfaces:
Highlighter
A Highlighter which applies the ComponentOrientation to the component.
- Author:
- Jeanette Winzenburg, Berlin
-
Field Summary
Fields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a ComponentOrientationHighlighter withComponentOrientation.LEFT_TO_RIGHT
.Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation.Instantiates a ComponentOrientationHighlighter with the given HighlightPredicate andComponentOrientation.LEFT_TO_RIGHT
.Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation and HighlightPredicate. -
Method Summary
Modifier and TypeMethodDescriptionprotected Component
doHighlight
(Component component, ComponentAdapter adapter) Apply the highlights.Returns the ComponentOrientation to apply.void
Sets the ComponentOrientation to apply.Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
-
Constructor Details
-
ComponentOrientationHighlighter
public ComponentOrientationHighlighter()Instantiates a ComponentOrientationHighlighter withComponentOrientation.LEFT_TO_RIGHT
. The Highlighter is applied always. -
ComponentOrientationHighlighter
Instantiates a ComponentOrientationHighlighter with the given HighlightPredicate andComponentOrientation.LEFT_TO_RIGHT
.- Parameters:
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.
-
ComponentOrientationHighlighter
Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation. The Highlighter is applied always.- Parameters:
co
- the ComponentOrientation to apply
-
ComponentOrientationHighlighter
Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation and HighlightPredicate.- Parameters:
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.co
- the ComponentOrientation to apply, may be null
-
-
Method Details
-
getComponentOrientation
Returns the ComponentOrientation to apply.- Returns:
- the ComponentOrientation to apply, guaranteed to be not null.
-
setComponentOrientation
Sets the ComponentOrientation to apply.- Parameters:
co
- the co to set, may be null to denote fallback to LEFT_TO_RIGHT
-
doHighlight
Apply the highlights.Implementated to decorate the given component with the ComponentOrientation.
- Specified by:
doHighlight
in classAbstractHighlighter
- Parameters:
component
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operation- Returns:
- Component
component
- See Also:
-