com.jgoodies.binding.binder
Interface SelectionInListBindingBuilder

All Known Implementing Classes:
SelectionInListBindingBuilderImpl

public interface SelectionInListBindingBuilder

Describes a binding builder that holds a SelectionInList that can be bound to combo boxes, lists, and tables.

Examples:

 binder.bind(countrySelectionInList).to(countryCombo);
 binder.bind(countrySelectionInList).to(countryFilterCombo, "(None)");
 binder.bind(contactSelectionInList).to(contactList);
 binder.bind(contactSelectionInList).to(contactTable);
 

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

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

Method Detail

to

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

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

Parameters:
comboBox - the combo box where the SelectionInList 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 SelectionInList 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(countrySelectionInList).to(countryCombo, "(None)");

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

to

void to(JList list)
Binds this builder's SelectionInList to the given list.

Example:
binder.bind(contactSelectionInList).to(contactList);

Parameters:
list - the list where the SelectionInList is set as both data and selection model.
Throws:
NullPointerException - if list is null

to

void to(JTable table)
Binds this builder's SelectionInList to the given table.

Example:
binder.bind(contactSelectionInList).to(contactTable);

Parameters:
table - the table where the SelectionInList is set as both data and selection model.
Throws:
NullPointerException - if table is null


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