public class EnabledHighlighter extends AbstractHighlighter
Note: the enabled is a mutable property of this Highlighter which defaults to false because we assume that's the most common use case to make a rendering component look disabled when the parent is enabled. It's mutable for symmetry reasons, though the other way round - enabled looking rendering component on a disabled parent - most probably will confuse users.
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled |
listenerList
Constructor and Description |
---|
EnabledHighlighter()
Instantiates a EnabledHighlighter with default enabled property (== false).
|
EnabledHighlighter(boolean enabled)
Instantiates a EnabledHighlighter with the specified enabled property.
|
EnabledHighlighter(HighlightPredicate predicate)
Instantiates a EnabledHighlighter with the specified HighlightPredicate and
default enabled property (== false).
|
EnabledHighlighter(HighlightPredicate predicate,
boolean enabled)
Instantiates a EnabledHighlighter with the specified HighlightPredicate and
default enabled property.
|
Modifier and Type | Method and Description |
---|---|
protected Component |
doHighlight(Component renderer,
ComponentAdapter adapter)
Apply the highlights.
|
boolean |
isEnabled()
Returns the enabled property.
|
void |
setEnabled(boolean enabled)
Sets the enabled property.
|
addChangeListener, areEqual, canHighlight, fireStateChanged, getChangeListeners, getHighlightPredicate, highlight, removeChangeListener, setHighlightPredicate
private boolean enabled
public EnabledHighlighter()
public EnabledHighlighter(boolean enabled)
enabled
- the enabled propertypublic EnabledHighlighter(HighlightPredicate predicate)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.public EnabledHighlighter(HighlightPredicate predicate, boolean enabled)
predicate
- the HighlightPredicate to use, may be null to default to ALWAYS.enabled
- the enabled propertypublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- the enabled to setprotected Component doHighlight(Component renderer, ComponentAdapter adapter)
Implemented to set the rendering component's enabled property.
doHighlight
in class AbstractHighlighter
renderer
- 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