org.jdesktop.swingx.decorator
Class AlignmentHighlighter
- java.lang.Object
-
- org.jdesktop.swingx.decorator.AbstractHighlighter
-
- org.jdesktop.swingx.decorator.AlignmentHighlighter
-
- All Implemented Interfaces:
- Highlighter
public class AlignmentHighlighter extends AbstractHighlighter
A Highlighter which sets the horizontal alignment.
-
-
Constructor Summary
Constructors Constructor and Description AlignmentHighlighter()Instantiates a AlignmentHighlighter with default alignment LEADING.AlignmentHighlighter(HighlightPredicate predicate)Instantiates a FontHighlighter with the given HighlightPredicate and default horizontal alignement.AlignmentHighlighter(HighlightPredicate predicate, int alignment)Instantiates a FontHighlighter with the given HighlightPredicate and null Font.AlignmentHighlighter(int alignment)Instantiates a AlignmentHighlighter with the specified alignment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetHorizontalAlignment()Returns the alignment which is applied.voidsetHorizontalAlignment(int alignment)Sets the horizontal alignment to apply.-
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter
addChangeListener, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
-
-
-
-
Constructor Detail
-
AlignmentHighlighter
public AlignmentHighlighter()
Instantiates a AlignmentHighlighter with default alignment LEADING. The Highlighter is applied always.
-
AlignmentHighlighter
public AlignmentHighlighter(int alignment)
Instantiates a AlignmentHighlighter with the specified alignment. The Highlighter is applied always.- Parameters:
alignment- the horizontal alignment to use.- Throws:
java.lang.IllegalArgumentException- if not one of the constants allowed as horizontal alignment, that is one of LEADING, LEFT, CENTER, RIGHT, TRAILING
-
AlignmentHighlighter
public AlignmentHighlighter(HighlightPredicate predicate)
Instantiates a FontHighlighter with the given HighlightPredicate and default horizontal alignement.- Parameters:
predicate- the HighlightPredicate to use, may be null to default to ALWAYS.
-
AlignmentHighlighter
public AlignmentHighlighter(HighlightPredicate predicate, int alignment)
Instantiates a FontHighlighter with the given HighlightPredicate and null Font.- Parameters:
predicate- the HighlightPredicate to use, may be null to default to ALWAYS.alignment- the horizontal alignment to use.- Throws:
java.lang.IllegalArgumentException- if not one of the constants allowed as horizontal alignment, that is one of LEADING, LEFT, CENTER, RIGHT, TRAILING
-
-
Method Detail
-
getHorizontalAlignment
public int getHorizontalAlignment()
Returns the alignment which is applied.- Returns:
- the alignment
-
setHorizontalAlignment
public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment to apply.- Parameters:
alignment- the horizontal alignment to set- Throws:
java.lang.IllegalArgumentException- if not one of the constants allowed as horizontal alignment, that is one of LEADING, LEFT, CENTER, RIGHT, TRAILING
-
-
DataMelt 3.0 © DataMelt by jWork.ORG