public class FontHighlighter extends AbstractHighlighter
Modifier and Type | Field and Description |
---|---|
private Font |
font |
listenerList
Constructor and Description |
---|
FontHighlighter()
Instantiates a FontHighlighter with null Font.
|
FontHighlighter(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,
Font font)
Instantiates a FontHighlighter with the given Font and HighlightPredicate.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canHighlight(Component component,
ComponentAdapter adapter)
Subclasses may override to further limit the highlighting based
on Highlighter state, f.i. a PainterHighlighter can only be applied
to PainterAware components.
|
protected Component |
doHighlight(Component component,
ComponentAdapter adapter)
Apply the highlights.
|
Font |
getFont()
Returns the Font used for decoration.
|
void |
setFont(Font font)
Sets the Font used for decoration.
|
addChangeListener, areEqual, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
public FontHighlighter()
public FontHighlighter(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, Font font)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.font
- the Font to apply, may be nullpublic Font getFont()
setFont(Font)
public void setFont(Font font)
font
- the Font used for decoration, may be null to not decorate.getFont()
protected boolean canHighlight(Component component, ComponentAdapter adapter)
This implementation returns true always.
Implemented to return false if the font property is null.
canHighlight
in class AbstractHighlighter
protected Component doHighlight(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)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses