|
||||||||||
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.PainterHighlighter
public class PainterHighlighter
Highlighter implementation which uses Painter.
NOTE: this will change once the Painter api is stable.
Field Summary |
---|
Fields inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter |
---|
listenerList |
Constructor Summary | |
---|---|
PainterHighlighter()
Instantiates a PainterHighlighter with null painter and default predicate. |
|
PainterHighlighter(Painter painter)
Instantiates a PainterHighlighter with the given Painter and default predicate. |
|
PainterHighlighter(Painter painter,
HighlightPredicate predicate)
Instantiates a PainterHighlighter with the given painter and predicate. |
Method Summary | |
---|---|
protected Component |
doHighlight(Component component,
ComponentAdapter adapter)
Apply the highlights. |
Painter |
getPainter()
Returns to Painter used in this Highlighter. |
Component |
highlight(Component component,
ComponentAdapter adapter)
Decorates the specified component for the given component adapter. This implementation checks the HighlightPredicate and calls doHighlight to apply the decoration. Overridden to type check the component. |
void |
setPainter(Painter painter)
Sets the Painter to use in this Highlighter, may be null. |
Methods inherited from class org.jdesktop.swingx.decorator.AbstractHighlighter |
---|
addChangeListener, fireStateChanged, getChangeListeners, getHighlightPredicate, removeChangeListener, setHighlightPredicate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PainterHighlighter()
public PainterHighlighter(Painter painter)
painter
- the painter to usepublic PainterHighlighter(Painter painter, HighlightPredicate predicate)
painter
- predicate
- Method Detail |
---|
public void setPainter(Painter painter)
painter
- public Painter getPainter()
public Component highlight(Component component, ComponentAdapter adapter)
highlight
in interface Highlighter
highlight
in class AbstractHighlighter
component
- the cell renderer component that is to be decoratedadapter
- the ComponentAdapter for this decorate operation
AbstractHighlighter.doHighlight(Component, ComponentAdapter)
,
AbstractHighlighter.getHighlightPredicate()
protected Component doHighlight(Component component, ComponentAdapter adapter)
This implementation sets the painter if it is not null. Does nothing otherwise.
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 |