public class DecoratorListCellRenderer<O> extends Object implements ListCellRenderer<O>
ListCellRenderer which compute text with the given decorator
and leave the hand to the delegate to perform the visual renderer.| Modifier and Type | Field and Description |
|---|---|
protected org.nuiton.decorator.Decorator<O> |
decorator
Decorator to produce text to render
|
protected ListCellRenderer<O> |
delegate
Delegate cell renderer
|
| Constructor and Description |
|---|
DecoratorListCellRenderer(org.nuiton.decorator.Decorator<O> decorator) |
DecoratorListCellRenderer(ListCellRenderer<O> delegate,
org.nuiton.decorator.Decorator<O> decorator) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
decorateValue(Object value,
int index) |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus) |
protected final ListCellRenderer<O> delegate
protected final org.nuiton.decorator.Decorator<O> decorator
public DecoratorListCellRenderer(org.nuiton.decorator.Decorator<O> decorator)
public DecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator)
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRenderer<O>Copyright © 2008–2019 Ultreia.io. All rights reserved.