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:
ListCellRenderer<T>
This is a default list cell renderer for the
TextFieldAutocompleter
suitable for
extension if a user wishes to customize it.
Mostly, this just composes Swing's DefaultListCellRenderer
, 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:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a renderer owned by the given autocompleter. -
Method Summary
Modifier and TypeMethodDescriptiongetListCellRendererComponent
(JList<? extends T> list, T value, int index, boolean isSelected, boolean cellHasFocus)
-
Field Details
-
defaultRenderer
-
-
Constructor Details
-
AutocompletionCellRenderer
Create a renderer owned by the given autocompleter.- Parameters:
owner
- the autocompleter that uses (or will use) this renderer.
-
-
Method Details
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList<? extends T> list, T value, int index, boolean isSelected, boolean cellHasFocus) - Specified by:
getListCellRendererComponent
in interfaceListCellRenderer<T>
-