Package docking.widgets.autocomplete
Class AutocompletionCellRenderer<T>
- java.lang.Object
-
- docking.widgets.autocomplete.AutocompletionCellRenderer<T>
-
- Type Parameters:
T
- the type of items suggested by the autocompleter.
- All Implemented Interfaces:
javax.swing.ListCellRenderer<T>
public class AutocompletionCellRenderer<T> extends java.lang.Object implements javax.swing.ListCellRenderer<T>
This is a default list cell renderer for theTextFieldAutocompleter
suitable for extension if a user wishes to customize it. Mostly, this just composes Swing'sDefaultListCellRenderer
, except it allows each suggested item to specify its own text, font, icon, foreground color, and background color. Of course, the display text may also use HTML tags for fine formatting.- See Also:
TextFieldAutocompleter
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.ListCellRenderer<java.lang.Object>
defaultRenderer
-
Constructor Summary
Constructors Constructor Description AutocompletionCellRenderer(TextFieldAutocompleter<T> owner)
Create a renderer owned by the given autocompleter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Component
getListCellRendererComponent(javax.swing.JList<? extends T> list, T value, int index, boolean isSelected, boolean cellHasFocus)
-
-
-
Constructor Detail
-
AutocompletionCellRenderer
public AutocompletionCellRenderer(TextFieldAutocompleter<T> owner)
Create a renderer owned by the given autocompleter.- Parameters:
owner
- the autocompleter that uses (or will use) this renderer.
-
-