Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.decorator
Interface Highlighter

All Known Implementing Classes:
  AbstractHighlighter, AlignmentHighlighter, BorderHighlighter, ColorHighlighter, CompoundHighlighter, EnabledHighlighter, FontHighlighter, HighlighterFactory.UIColorHighlighter, IconHighlighter, PainterHighlighter, ResetDTCRColorHighlighter, ShadingColorHighlighter, ToolTipHighlighter

    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.

The highlightable properties are basically defined by the renderer in use: only attributes the renderer guarantees to reset on every call are safe to alter. For SwingX renderering support these are listed in `ComponentProvider`. 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.

Author:
  Ramesh Gupta, Jeanette Winzenburg
See Also:
  `ComponentAdapter`, `ComponentProvider`

Method Summary
`void` | `addChangeListener(javax.swing.event.ChangeListener l)` Adds a `ChangeListener` which are notified after changes of any attribute.
`javax.swing.event.ChangeListener[]` | `getChangeListeners()` Returns an array of all the change listeners registered on this `LegacyHighlighter`.
`java.awt.Component` | `highlight(java.awt.Component renderer, ComponentAdapter adapter)` Decorates the specified component for the given component adapter.
`void` | `removeChangeListener(javax.swing.event.ChangeListener l)` Removes a `ChangeListener`.

Method Detail

### highlight

    java.awt.Component highlight(java.awt.Component renderer,
                                 ComponentAdapter adapter)

  Decorates the specified component for the given component adapter.

  Parameters:
    `renderer` - the cell rendering component that is to be decorated
    `adapter` - the ComponentAdapter for this decorate operation
  Returns:
    the decorated cell rendering component

### addChangeListener

    void addChangeListener(javax.swing.event.ChangeListener l)

  Adds a `ChangeListener` which are notified after changes of any attribute.

  Parameters:
    `l` - the ChangeListener to add
  See Also:
    `removeChangeListener(javax.swing.event.ChangeListener)`

### removeChangeListener

    void removeChangeListener(javax.swing.event.ChangeListener l)

  Removes a `ChangeListener`.

  Parameters:
    `l` - the `ChangeListener` to remove
  See Also:
    `addChangeListener(javax.swing.event.ChangeListener)`

### getChangeListeners

    javax.swing.event.ChangeListener[] getChangeListeners()

  Returns an array of all the change listeners registered on this `LegacyHighlighter`.

  Returns:
    all of this model's `ChangeListener`s or an empty array if no change listeners are currently registered
  Since:
    1.4
  See Also:
    `addChangeListener(javax.swing.event.ChangeListener)`, `removeChangeListener(javax.swing.event.ChangeListener)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.