|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Highlighter
Highlighter
provide a mechanism to modify visual
attributes of cell rendering components. The mechanism is uniform across
both rendered and rendering component types: it is the same for
SwingX collection views (JXTable, JXList, JXTree/Table) and independent
of the concrete component type used for rendering the cell. The view
cell state is factored into a ComponentAdapter
.
For example, in data visualization components
that support multiple columns with potentially different types of data, a
ColorHighlighter
imparts the same background color consistently across all
columns of the rendered component
regardless of the actual cell renderer registered for any specific column.
Implementations supporting mutable internal state which effects
the decoration must notify its listeners about the change. Typically,
the rendered component installs a listener to its Highlighter
s
and triggeres a repaint on notification.
ComponentAdapter
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener which are
notified after changes of any attribute. |
ChangeListener[] |
getChangeListeners()
Returns an array of all the change listeners registered on this LegacyHighlighter . |
Component |
highlight(Component renderer,
ComponentAdapter adapter)
Decorates the specified component for the given component adapter. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener . |
Method Detail |
---|
Component highlight(Component renderer, ComponentAdapter adapter)
renderer
- the cell rendering component that is to be decoratedadapter
- the ComponentAdapter for this decorate operation
void addChangeListener(ChangeListener l)
ChangeListener
which are
notified after changes of any attribute.
l
- the ChangeListener to addremoveChangeListener(javax.swing.event.ChangeListener)
void removeChangeListener(ChangeListener l)
ChangeListener
.
l
- the ChangeListener
to removeaddChangeListener(javax.swing.event.ChangeListener)
ChangeListener[] getChangeListeners()
LegacyHighlighter
.
ChangeListener
s
or an empty
array if no change listeners are currently registeredaddChangeListener(javax.swing.event.ChangeListener)
,
removeChangeListener(javax.swing.event.ChangeListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |