Package jaxx.runtime.swing.renderer
Class FilteredDecoratorListCellRenderer
- java.lang.Object
-
- jaxx.runtime.swing.renderer.DecoratorListCellRenderer
-
- jaxx.runtime.swing.renderer.FilteredDecoratorListCellRenderer
-
- All Implemented Interfaces:
ListCellRenderer
public class FilteredDecoratorListCellRenderer extends DecoratorListCellRenderer
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 jaxx.runtime.swing.renderer.DecoratorListCellRenderer
decorator, delegate
-
-
Constructor Summary
Constructors Constructor Description FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.decorator.Decorator<?> decorator)FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.decorator.Decorator<?> decorator, boolean highlightFilterText)FilteredDecoratorListCellRenderer(org.nuiton.decorator.Decorator<?> 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 jaxx.runtime.swing.renderer.DecoratorListCellRenderer
decorateValue
-
-
-
-
Constructor Detail
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(org.nuiton.decorator.Decorator<?> decorator)
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.decorator.Decorator<?> decorator)
-
FilteredDecoratorListCellRenderer
public FilteredDecoratorListCellRenderer(ListCellRenderer delegate, org.nuiton.decorator.Decorator<?> 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- Overrides:
getListCellRendererComponentin classDecoratorListCellRenderer
-
computePattern
protected void computePattern()
-
-