|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.decorator.AbstractHighlighter
org.jdesktop.swingx.decorator.AlignmentHighlighter
public class AlignmentHighlighter
A Highlighter which sets the horizontal alignment.
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter |
---|
listenerList |
Constructor Summary | |
---|---|
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 | |
---|---|
protected boolean |
canHighlight(java.awt.Component component,
ComponentAdapter adapter)
Subclasses may override to further limit the highlighting based on Highlighter state, f.i. |
protected java.awt.Component |
doHighlight(java.awt.Component renderer,
ComponentAdapter adapter)
Apply the highlights. |
int |
getHorizontalAlignment()
Returns the alignment which is applied. |
void |
setHorizontalAlignment(int alignment)
Sets the horizontal alignment to apply. |
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter |
---|
addChangeListener, areEqual, 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 |
---|
public AlignmentHighlighter()
public AlignmentHighlighter(int alignment)
alignment
- the horizontal alignment to use.
java.lang.IllegalArgumentException
- if not one of the constants allowed as horizontal alignment,
that is one of LEADING, LEFT, CENTER, RIGHT, TRAILINGpublic AlignmentHighlighter(HighlightPredicate predicate)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.public AlignmentHighlighter(HighlightPredicate predicate, int alignment)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.alignment
- the horizontal alignment to use.
java.lang.IllegalArgumentException
- if not one of the constants allowed as horizontal alignment,
that is one of LEADING, LEFT, CENTER, RIGHT, TRAILINGMethod Detail |
---|
public int getHorizontalAlignment()
public void setHorizontalAlignment(int alignment)
alignment
- the horizontal alignment to set
java.lang.IllegalArgumentException
- if not one of the constants allowed as horizontal alignment,
that is one of LEADING, LEFT, CENTER, RIGHT, TRAILINGprotected java.awt.Component doHighlight(java.awt.Component renderer, ComponentAdapter adapter)
Implemented to set the horizontal alignement of the rendering component.
doHighlight
in class AbstractHighlighter
renderer
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operationAbstractHighlighter.highlight(Component, ComponentAdapter)
protected boolean canHighlight(java.awt.Component component, ComponentAdapter adapter)
This implementation returns true always.
Implemented to return true for components of type JLabel, AbstractButton or JTextField, false otherwise.
canHighlight
in class AbstractHighlighter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |