|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.binding.binder.SelectionInListBindingBuilderImpl
public class SelectionInListBindingBuilderImpl
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);
| Constructor Summary | |
|---|---|
SelectionInListBindingBuilderImpl(SelectionInList<?> selectionInList)
Creates a SelectionInListBindingBuilderImpl for the given selection in list. |
|
SelectionInListBindingBuilderImpl(SelectionInList<?> selectionInList,
String propertyName)
Creates a SelectionInListBindingBuilderImpl for the given selection in list. |
|
| Method Summary | |
|---|---|
protected String |
getPropertyName()
|
protected SelectionInList |
getSelectionInList()
|
protected void |
setValidationMessageKey(JComponent comp)
Sets this builder's property name - if any - as the component's validation message key. |
void |
to(JComboBox comboBox)
Binds this builder's SelectionInList to the given combo box. |
void |
to(JComboBox comboBox,
String nullText)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectionInListBindingBuilderImpl(SelectionInList<?> selectionInList)
selectionInList - provides both the data and the selection
NullPointerException - if selectionInList is null
public SelectionInListBindingBuilderImpl(SelectionInList<?> selectionInList,
String propertyName)
selectionInList - provides both the data and the selectionpropertyName - an optional bean property name that has
been used to create selectionInList. Used to set
a validation message key for combo boxes.
NullPointerException - if selectionInList is null
IllegalArgumentException - if propertyName is empty or whitespace| Method Detail |
|---|
public void to(JComboBox comboBox)
SelectionInListBindingBuilder
Example:
binder.bind(countrySelectionInList).to(countryCombo);
to in interface SelectionInListBindingBuildercomboBox - the combo box where the SelectionInList is set
as both data and selection model.
public void to(JComboBox comboBox,
String nullText)
SelectionInListBindingBuildernull values are mapped to a special null element
that is displayed using the given nullElementText.
Example:
binder.bind(countrySelectionInList).to(countryCombo, "---");
to in interface SelectionInListBindingBuildercomboBox - the combo box where the SelectionInList is set
as both data and selection model.nullText - the text that represents the null value
in the combo boxpublic void to(JList list)
SelectionInListBindingBuilder
Example:
binder.bind(contactSelectionInList).to(contactList);
to in interface SelectionInListBindingBuilderlist - the list where the SelectionInList is set
as both data and selection model.public void to(JTable table)
SelectionInListBindingBuilder
Example:
binder.bind(contactSelectionInList).to(contactTable);
to in interface SelectionInListBindingBuildertable - the table where the SelectionInList is set
as both data and selection model.protected final SelectionInList getSelectionInList()
protected final String getPropertyName()
protected final void setValidationMessageKey(JComponent comp)
comp - the component where the validation message key shall be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||