public interface ComboBoxBindingBuilder
Examples:
binder.bind(countryComboBoxModel).to(countryCombo); binder.bind(countryComboBoxModel).to(countryFilterCombo, "(None)");
| Modifier and Type | Method and Description |
|---|---|
void |
to(JComboBox comboBox)
Binds this builder's ComboBoxModel to the given combo box.
|
void |
to(JComboBox comboBox,
String nullElementText)
Binds this builder's ComboBoxModel to the given combo box
where
null values are mapped to a special null element
that is displayed using the given nullElementText. |
void to(JComboBox comboBox)
Example:
binder.bind(countryComboBoxModel).to(countryCombo);
comboBox - the combo box where the combo box model is set
as both data and selection model.NullPointerException - if comboBox is nullvoid 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(countryComboBoxModel).to(countryCombo, "(None)");
comboBox - the combo box where the combo box model is set
as both data and selection model.nullElementText - the text that represents the null value
in the combo boxNullPointerException - if comboBox or nullElementText is nullIllegalArgumentException - if nullElementText is empty or whitespaceCopyright © 2002-2015 JGoodies Software GmbH. All Rights Reserved.