public class FilteredDecoratorListCellRenderer extends DecoratorListCellRenderer
ListCellRenderer which compute text with the given DecoratorListCellRenderer.decorator,
highlights a part of the rendered text,
and leave the hand to the DecoratorListCellRenderer.delegate to perform the visual renderer.| Modifier and Type | Field and Description |
|---|---|
protected String |
filterText
text to highlight
|
protected boolean |
highlightFilterText |
protected Pattern |
pattern |
decorator, delegate| Constructor and Description |
|---|
FilteredDecoratorListCellRenderer(org.nuiton.util.decorator.Decorator<?> decorator) |
FilteredDecoratorListCellRenderer(ListCellRenderer delegate,
org.nuiton.util.decorator.Decorator<?> decorator) |
FilteredDecoratorListCellRenderer(ListCellRenderer delegate,
org.nuiton.util.decorator.Decorator<?> decorator,
boolean highlightFilterText) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computePattern() |
String |
getFilterText() |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus) |
boolean |
isHighlightFilterText() |
void |
setFilterText(String filterText) |
void |
setHighlightFilterText(boolean highlightFilterText) |
protected String filterText
protected Pattern pattern
protected boolean highlightFilterText
public FilteredDecoratorListCellRenderer(org.nuiton.util.decorator.Decorator<?> decorator)
public FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.util.decorator.Decorator<?> decorator)
public FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.util.decorator.Decorator<?> decorator, boolean highlightFilterText)
public String getFilterText()
public void setFilterText(String filterText)
public boolean isHighlightFilterText()
public void setHighlightFilterText(boolean highlightFilterText)
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRenderergetListCellRendererComponent in class DecoratorListCellRendererprotected void computePattern()
Copyright © 2008-2013 CodeLutin. All Rights Reserved.