Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
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<T> comparator) defaultSelection(Collection<T> defaultSelection) defaultSelection(T defaultSelection) Ignored in case a renderer is specified, seeSelectionDialogBuilder.renderer(javax.swing.ListCellRenderer).select()Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, onBuild, owner, owner, title, title, undecorated, windowFocusListenerMethods inherited from interface is.codion.swing.common.ui.dialog.SelectionDialogBuilder
allowEmptySelection, renderer
-
Method Details
-
defaultSelection
- Parameters:
defaultSelection- the item selected by default- Returns:
- this builder instance
- Throws:
IllegalArgumentException- in case the selection values do not contain the default selection item
-
defaultSelection
- Parameters:
defaultSelection- the items selected by default- Returns:
- this builder instance
- Throws:
IllegalArgumentException- in case the selection values do not contain the default selection 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
-