Class FilteredDecoratorListCellRenderer<O>
- java.lang.Object
-
- org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer<O>
-
- org.nuiton.jaxx.runtime.swing.renderer.FilteredDecoratorListCellRenderer<O>
-
- All Implemented Interfaces:
ListCellRenderer<O>
public class FilteredDecoratorListCellRenderer<O> extends DecoratorListCellRenderer<O>
AListCellRendererwhich compute text with the givenDecoratorListCellRenderer.decorator, highlights a part of the rendered text, and leave the hand to theDecoratorListCellRenderer.delegateto perform the visual renderer.- Since:
- 2.5.11
- Author:
- Kevin Morin - morin@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected StringfilterTexttext to highlightprotected booleanhighlightFilterTextprotected Patternpattern-
Fields inherited from class org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer
decorator, delegate
-
-
Constructor Summary
Constructors Constructor Description FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator)FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator, boolean highlightFilterText)FilteredDecoratorListCellRenderer(org.nuiton.decorator.Decorator<O> decorator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputePattern()StringgetFilterText()ComponentgetListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)booleanisHighlightFilterText()voidsetFilterText(String filterText)voidsetHighlightFilterText(boolean highlightFilterText)-
Methods inherited from class org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer
decorateValue
-
-
-
-
Constructor Detail
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(org.nuiton.decorator.Decorator<O> decorator)
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator)
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(ListCellRenderer<O> delegate, org.nuiton.decorator.Decorator<O> decorator, boolean highlightFilterText)
-
-
Method Detail
-
getFilterText
public String getFilterText()
-
setFilterText
public void setFilterText(String filterText)
-
isHighlightFilterText
public boolean isHighlightFilterText()
-
setHighlightFilterText
public void setHighlightFilterText(boolean highlightFilterText)
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
- Specified by:
getListCellRendererComponentin interfaceListCellRenderer<O>- Overrides:
getListCellRendererComponentin classDecoratorListCellRenderer<O>
-
computePattern
protected void computePattern()
-
-