Interface ListSelectionDialogBuilder<T>
- Type Parameters:
T- the value type
- All Superinterfaces:
DialogBuilder<ListSelectionDialogBuilder<T>>, SelectionDialogBuilder<T, ListSelectionDialogBuilder<T>>
public interface ListSelectionDialogBuilder<T>
extends SelectionDialogBuilder<T, ListSelectionDialogBuilder<T>>
A builder for a
JList based selection dialog.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides selection for single or multiple items. -
Method Summary
Modifier and TypeMethodDescriptioncomparator(@Nullable Comparator<? super T> comparator) Ignored in case a renderer is specified, seeSelectionDialogBuilder.renderer(javax.swing.ListCellRenderer).select()selectedItem(@Nullable T item) selectedItems(Collection<? extends T> items) Methods inherited from interface DialogBuilder
icon, keyEvent, location, locationRelativeTo, onBuild, owner, owner, title, title, undecorated, windowFocusListenerMethods inherited from interface SelectionDialogBuilder
allowEmptySelection, renderer
-
Method Details
-
selectedItem
- Parameters:
item- the item selected initially, null for none- Returns:
- this builder instance
- Throws:
IllegalArgumentException- in case the selection values do not contain the item
-
selectedItems
- Parameters:
items- the items selected initially, empty for none- Returns:
- this builder instance
- Throws:
IllegalArgumentException- in case the selection values do not contain the items
-
size
- Parameters:
size- the preferred dialog size- Returns:
- this builder instance
-
comparator
- Parameters:
comparator- the comparator to use to sort the items- Returns:
- this builder instance
-
formatter
Ignored in case a renderer is specified, seeSelectionDialogBuilder.renderer(javax.swing.ListCellRenderer).- Parameters:
formatter- formats the items to select from, null forObject.toString()- Returns:
- this builder instance
-
select
ListSelectionDialogBuilder.SelectionStep<T> select()- Returns:
- a
ListSelectionDialogBuilder.SelectionStep
-