Class MultiInput<C extends JComponent,T>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
is.codion.swing.common.ui.component.multi.MultiInput<C,T>
Type Parameters:
C - the wrapped component type
T - the value type
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public final class MultiInput<C extends JComponent,T> extends JPanel
A field collecting a set of values through a wrapped component: the wrapped component, untouched, beside a button showing how many values have been collected, the button toggling a non-modal, undecorated dialog listing them under the field, the caption as its border's title. The dialog stays when the focus goes elsewhere, so that the values collected remain on display while more are added, follows the field around and goes when the field does. The value is the set collected, sorted, see MultiInput.Builder.comparator(Comparator), plus whatever the wrapped component holds, last, so a single value typed into the component counts without being added. Setting the value sets the collected values and clears the wrapped component. The wrapped component keeps every key of its own.

The value of a wrapped component able to supply several values at a time implements MultiInput.MultiValueSource.

See Also: