org.jdesktop.swingx.decorator
Class ComponentOrientationHighlighter

java.lang.Object
  extended by org.jdesktop.swingx.decorator.AbstractHighlighter
      extended by org.jdesktop.swingx.decorator.ComponentOrientationHighlighter
All Implemented Interfaces:
Highlighter

public class ComponentOrientationHighlighter
extends AbstractHighlighter

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
ComponentOrientationHighlighter()
          Instantiates a ComponentOrientationHighlighter with ComponentOrientation.LEFT_TO_RIGHT.
ComponentOrientationHighlighter(ComponentOrientation co)
          Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation.
ComponentOrientationHighlighter(HighlightPredicate predicate)
          Instantiates a ComponentOrientationHighlighter with the given HighlightPredicate and ComponentOrientation.LEFT_TO_RIGHT.
ComponentOrientationHighlighter(HighlightPredicate predicate, ComponentOrientation co)
          Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation and HighlightPredicate.
 
Method Summary
protected  Component doHighlight(Component component, ComponentAdapter adapter)
          Apply the highlights.
 ComponentOrientation getComponentOrientation()
          Returns the ComponentOrientation to apply.
 void setComponentOrientation(ComponentOrientation co)
          Sets the ComponentOrientation to apply.
 
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentOrientationHighlighter

public ComponentOrientationHighlighter()
Instantiates a ComponentOrientationHighlighter with ComponentOrientation.LEFT_TO_RIGHT. The Highlighter is applied always.


ComponentOrientationHighlighter

public ComponentOrientationHighlighter(HighlightPredicate predicate)
Instantiates a ComponentOrientationHighlighter with the given HighlightPredicate and ComponentOrientation.LEFT_TO_RIGHT.

Parameters:
predicate - the HighlightPredicate to use, may be null to default to ALWAYS.

ComponentOrientationHighlighter

public ComponentOrientationHighlighter(ComponentOrientation co)
Instantiates a ComponentOrientationHighlighter with the given ComponentOrientation. The Highlighter is applied always.

Parameters:
co - the ComponentOrientation to apply

ComponentOrientationHighlighter

public ComponentOrientationHighlighter(HighlightPredicate predicate,
                                       ComponentOrientation co)
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 Detail

getComponentOrientation

public ComponentOrientation getComponentOrientation()
Returns the ComponentOrientation to apply.

Returns:
the ComponentOrientation to apply, guaranteed to be not null.

setComponentOrientation

public void setComponentOrientation(ComponentOrientation co)
Sets the ComponentOrientation to apply.

Parameters:
co - the co to set, may be null to denote fallback to LEFT_TO_RIGHT

doHighlight

protected Component doHighlight(Component component,
                                ComponentAdapter adapter)
Description copied from class: AbstractHighlighter
Apply the highlights.

Specified by:
doHighlight in class AbstractHighlighter
Parameters:
component - the cell renderer component that is to be decorated
adapter - the ComponentAdapter for this decorate operation
See Also:
AbstractHighlighter.highlight(Component, ComponentAdapter)


Copyright © 2012. All Rights Reserved.