Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.binding.binder
Class ComboBoxBindingBuilderImpl

    java.lang.Object
      com.jgoodies.binding.binder.ComboBoxBindingBuilderImpl

All Implemented Interfaces:
  ComboBoxBindingBuilder

    public class ComboBoxBindingBuilderImpl

extends Object
implements ComboBoxBindingBuilder

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

Constructor Summary
`ComboBoxBindingBuilderImpl(ComboBoxModel comboBoxModel)` Creates a ComboBoxBindingBuilderImpl for the given combo box model.

Method Summary
`protected ComboBoxModel` | `getComboBoxModel()`
`void` | `to(JComboBox comboBox)` Binds this builder's ComboBoxModel to the given combo box.
`void` | `to(JComboBox comboBox, String nullText)` 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`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComboBoxBindingBuilderImpl

    public ComboBoxBindingBuilderImpl(ComboBoxModel comboBoxModel)

  Creates a ComboBoxBindingBuilderImpl for the given combo box model.

  Parameters:
    `comboBoxModel` - provides both the data and the selection
  Throws:
    `NullPointerException` - if `comboBoxModel` is `null`

Method Detail

### to

    public void to(JComboBox comboBox)

  Description copied from interface: `ComboBoxBindingBuilder`
  Binds this builder's ComboBoxModel to the given combo box.

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

  Specified by:
    `to` in interface `ComboBoxBindingBuilder`
  Parameters:
    `comboBox` - the combo box where the combo box model is set as both data and selection model.

### to

    public void to(JComboBox comboBox,
                   String nullText)

  Description copied from interface: `ComboBoxBindingBuilder`
  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`.

  Example:
  `binder.bind(countryComboBoxModel).to(countryCombo, "---");`

  Specified by:
    `to` in interface `ComboBoxBindingBuilder`
  Parameters:
    `comboBox` - the combo box where the combo box model is set as both data and selection model.
    `nullText` - the text that represents the `null` value in the combo box

### getComboBoxModel

    protected final ComboBoxModel getComboBoxModel()

  Returns:
    this builder's SelectionInList

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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