Class ComponentOrientationHighlighter

java.lang.Object
org.jdesktop.swingx.decorator.AbstractHighlighter
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
  • Constructor Details

    • 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 Details

    • 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)
      Apply the highlights.

      Implementated to decorate the given component with the ComponentOrientation.

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