|
||||||||||
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.FontHighlighter
public class FontHighlighter
A Highlighter which sets the Font of the component.
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter |
---|
listenerList |
Constructor Summary | |
---|---|
FontHighlighter()
Instantiates a FontHighlighter with null Font. |
|
FontHighlighter(java.awt.Font font)
Instantiates a FontHighlighter with the given Font. |
|
FontHighlighter(HighlightPredicate predicate)
Instantiates a FontHighlighter with the given HighlightPredicate and null Font. |
|
FontHighlighter(HighlightPredicate predicate,
java.awt.Font font)
Instantiates a FontHighlighter with the given Font and HighlightPredicate. |
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 component,
ComponentAdapter adapter)
Apply the highlights. |
java.awt.Font |
getFont()
Returns the Font used for decoration. |
void |
setFont(java.awt.Font font)
Sets the Font used for decoration. |
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 FontHighlighter()
public FontHighlighter(java.awt.Font font)
font
- the Font to applypublic FontHighlighter(HighlightPredicate predicate)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.public FontHighlighter(HighlightPredicate predicate, java.awt.Font font)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.font
- the Font to apply, may be nullMethod Detail |
---|
public java.awt.Font getFont()
setFont(Font)
public void setFont(java.awt.Font font)
font
- the Font used for decoration, may be null to not decorate.getFont()
protected boolean canHighlight(java.awt.Component component, ComponentAdapter adapter)
This implementation returns true always.
Implemented to return false if the font property is null.
canHighlight
in class AbstractHighlighter
protected java.awt.Component doHighlight(java.awt.Component component, ComponentAdapter adapter)
Implemented to set the component's Font.
doHighlight
in class AbstractHighlighter
component
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operationAbstractHighlighter.highlight(Component, ComponentAdapter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |