com.jgoodies.binding.binder
Interface ComboBoxBindingBuilder

All Known Implementing Classes:
ComboBoxBindingBuilderImpl

public interface ComboBoxBindingBuilder

Describes a binding builder that holds a ComboBoxModel that can be bound to combo boxes.

Examples:

 binder.bind(countryComboBoxModel).to(countryCombo);
 binder.bind(countryComboBoxModel).to(countryFilterCombo, "(None)");
 

Since:
2.7
Version:
$Revision: 1.2 $
Author:
Karsten Lentzsch

Method Summary
 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.
 

Method Detail

to

void to(JComboBox comboBox)
Binds this builder's ComboBoxModel to the given combo box.

Example:
binder.bind(countryComboBoxModel).to(countryCombo);

Parameters:
comboBox - the combo box where the combo box model is set as both data and selection model.
Throws:
NullPointerException - if comboBox is null

to

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.

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)");

Parameters:
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 box
Throws:
NullPointerException - if comboBox is null


Copyright © 2002-2013 JGoodies Software GmbH. All Rights Reserved.