public interface SelectionInListBindingBuilder
Examples:
binder.bind(countrySelectionInList).to(countryCombo); binder.bind(countrySelectionInList).to(countryFilterCombo, "(None)"); binder.bind(contactSelectionInList).to(contactList); binder.bind(contactSelectionInList).to(contactTable);
Modifier and Type | Method and Description |
---|---|
void |
to(JComboBox comboBox)
Binds this builder's SelectionInList to the given combo box.
|
void |
to(JComboBox comboBox,
String nullElementText)
Binds this builder's SelectionInList to the given combo box
where
null values are mapped to a special null element
that is displayed using the given nullElementText . |
void |
to(JList list)
Binds this builder's SelectionInList to the given list.
|
void |
to(JTable table)
Binds this builder's SelectionInList to the given table.
|
void to(JComboBox comboBox)
Example:
binder.bind(countrySelectionInList).to(countryCombo);
comboBox
- the combo box where the SelectionInList is set
as both data and selection model.NullPointerException
- if comboBox
is null
void to(JComboBox comboBox, String nullElementText)
null
values are mapped to a special null element
that is displayed using the given nullElementText
.Note that the Microsoft User Experience Guide (UX Guide) recommends to enclose meta-options in parentheses, e.g. "(None)".
Example:
binder.bind(countrySelectionInList).to(countryCombo, "(None)");
comboBox
- the combo box where the SelectionInList is set
as both data and selection model.nullElementText
- the text that represents the null
value
in the combo boxNullPointerException
- if comboBox
is null
void to(JList list)
Example:
binder.bind(contactSelectionInList).to(contactList);
list
- the list where the SelectionInList is set
as both data and selection model.NullPointerException
- if list
is null
void to(JTable table)
Example:
binder.bind(contactSelectionInList).to(contactTable);
table
- the table where the SelectionInList is set
as both data and selection model.NullPointerException
- if table
is null
Copyright © 2002-2015 JGoodies Software GmbH. All Rights Reserved.