public class FilteredDecoratorListCellRenderer<O> extends DecoratorListCellRenderer<O>
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.decorator.Decorator<O> decorator) |
FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate,
org.nuiton.decorator.Decorator<O> decorator) |
FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate,
org.nuiton.decorator.Decorator<O> 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) |
decorateValueprotected String filterText
protected Pattern pattern
protected boolean highlightFilterText
public FilteredDecoratorListCellRenderer(org.nuiton.decorator.Decorator<O> decorator)
public FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator)
public FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> 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 ListCellRenderer<O>getListCellRendererComponent in class DecoratorListCellRenderer<O>protected void computePattern()
Copyright © 2008–2020 Ultreia.io. All rights reserved.