com.jgoodies.binding.binder
Interface ObjectBinder

All Known Subinterfaces:
ActionBeanBinder, ActionObjectBinder, ActionPresentationModelBinder, BeanBinder, PresentationModelBinder
All Known Implementing Classes:
ActionBeanBinderImpl, ActionObjectBinderImpl, ActionPresentationModelBinderImpl, BeanBinderImpl, ObjectBinderImpl, PresentationModelBinderImpl

public interface ObjectBinder

Describes a binder that can build action bindings from Actions, data bindings from ValueModels, and list bindings from ListModel/ListSelectionModel or a SelectionInList.

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

Method Summary
 ActionBindingBuilder bind(Action action)
          Creates and returns a binding builder that manages an Action that can be operated on and that can be bound to a button or text field.
 ComboBoxBindingBuilder bind(ComboBoxModel comboBoxModel)
          Creates and returns a binding builder for the given combo box model that can be bound to a combo box.
 ListBindingBuilder bind(ListModel dataModel, ListSelectionModel selectionModel)
          Creates and returns a binding builder for the given ListModel and ListSelectionModel that can be bound to a list or table.
 ListBindingBuilder bind(Object[] data, ListSelectionModel selectionModel)
          Creates and returns a binding builder for the given fixed data and selection model that can be bound to a list or table.
 SelectionInListBindingBuilder bind(SelectionInList<?> selectionInList)
          Creates and returns a binding builder that manages a SelectionInList that can be bound to a list, table, or combo box.
 ValueModelBindingBuilder bind(ValueModel valueModel)
          Creates and returns a binding builder that manages a ValueModel that can be operated on and that can be bound to a component.
 

Method Detail

bind

ActionBindingBuilder bind(Action action)
Creates and returns a binding builder that manages an Action that can be operated on and that can be bound to a button or text field.

Example:

 binder.bind(editAction).to(editButton);
 

Parameters:
action - the Action to be bound
Returns:
the action binding builder that holds the Action
Throws:
NullPointerException - if action if null

bind

ComboBoxBindingBuilder bind(ComboBoxModel comboBoxModel)
Creates and returns a binding builder for the given combo box model that can be bound to a combo box.

Example:

 binder.bind(choicesComboBoxModel).to(choicesComboBox);
 

Parameters:
comboBoxModel - provides the data and selection
Returns:
the combo box binding builder that holds the data and selection model
Throws:
NullPointerException - if comboBoxModel is null
Since:
2.7

bind

ListBindingBuilder bind(Object[] data,
                        ListSelectionModel selectionModel)
Creates and returns a binding builder for the given fixed data and selection model that can be bound to a list or table.

Example:

 binder.bind(albums, albumSelectionModel).to(albumTable);
 

Parameters:
data - provides the data
selectionModel - the selection model
Returns:
the list binding builder that holds the data and selection model
Throws:
NullPointerException - if data or selectionModel is null
Since:
2.7

bind

ListBindingBuilder bind(ListModel dataModel,
                        ListSelectionModel selectionModel)
Creates and returns a binding builder for the given ListModel and ListSelectionModel that can be bound to a list or table.

Example:

 binder.bind(albumModel, albumSelectionModel).to(albumTable);
 

Parameters:
dataModel - provides the data
selectionModel - the selection model
Returns:
the binding builder that holds the data and selection model
Throws:
NullPointerException - if dataModel or selectionModel is null

bind

SelectionInListBindingBuilder bind(SelectionInList<?> selectionInList)
Creates and returns a binding builder that manages a SelectionInList that can be bound to a list, table, or combo box.

Examples:

 binder.bind(albumSelectionInList).to(albumCombo);
 binder.bind(albumSelectionInList).to(albumTable);
 

Parameters:
selectionInList - provides both the data and selection
Returns:
the binding builder that holds the converted bean property
Throws:
NullPointerException - if selectionInList is null

bind

ValueModelBindingBuilder bind(ValueModel valueModel)
Creates and returns a binding builder that manages a ValueModel that can be operated on and that can be bound to a component.

Example: binder.bind(aValueModel).to(aTextField);

Parameters:
valueModel - the ValueModel to manage
Returns:
the binding builder that holds the ValueModel
Throws:
NullPointerException - if valueModel is null


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