// <snip> JXTree rollover
// custom implementation of Highlighter which highlights
// by changing the node icon on rollover
private Highlighter createRolloverIconHighlighter(IconValue delegate) {
// the icon look-up is left to an IconValue
final IconValue iv = new FilteredIconValue(delegate);
AbstractHighlighter hl = new AbstractHighlighter(HighlightPredicate.ROLLOVER_ROW) {
/**
* {@inheritDoc} <p>
*
* Implemented to highlight by setting the node icon.
*/
@Override
protected Component doHighlight(Component component,
ComponentAdapter adapter) {
Icon icon = iv.getIcon(adapter.getValue());
if (icon != null) {
((WrappingIconPanel) component).setIcon(icon);
}
return component;
}