com.jgoodies.binding.binder
Class ObjectBinderImpl

java.lang.Object
  extended by com.jgoodies.binding.binder.ObjectBinderImpl
All Implemented Interfaces:
ObjectBinder
Direct Known Subclasses:
ActionObjectBinderImpl, BeanBinderImpl

public class ObjectBinderImpl
extends Object
implements ObjectBinder

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

Constructor Summary
ObjectBinderImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectBinderImpl

public ObjectBinderImpl()
Method Detail

bind

public ActionBindingBuilder bind(Action action)
Description copied from interface: ObjectBinder
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);
 

Specified by:
bind in interface ObjectBinder
Parameters:
action - the Action to be bound
Returns:
the action binding builder that holds the Action

bind

public ComboBoxBindingBuilder bind(ComboBoxModel comboBoxModel)
Description copied from interface: ObjectBinder
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);
 

Specified by:
bind in interface ObjectBinder
Parameters:
comboBoxModel - provides the data and selection
Returns:
the combo box binding builder that holds the data and selection model

bind

public ListBindingBuilder bind(Object[] data,
                               ListSelectionModel selectionModel)
Description copied from interface: ObjectBinder
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);
 

Specified by:
bind in interface ObjectBinder
Parameters:
data - provides the data
selectionModel - the selection model
Returns:
the list binding builder that holds the data and selection model

bind

public ListBindingBuilder bind(ListModel dataModel,
                               ListSelectionModel selectionModel)
Description copied from interface: ObjectBinder
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);
 

Specified by:
bind in interface ObjectBinder
Parameters:
dataModel - provides the data
selectionModel - the selection model
Returns:
the binding builder that holds the data and selection model

bind

public SelectionInListBindingBuilder bind(SelectionInList<?> selectionInList)
Description copied from interface: ObjectBinder
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);
 

Specified by:
bind in interface ObjectBinder
Parameters:
selectionInList - provides both the data and selection
Returns:
the binding builder that holds the converted bean property

bind

public ValueModelBindingBuilder bind(ValueModel valueModel)
Description copied from interface: ObjectBinder
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);

Specified by:
bind in interface ObjectBinder
Parameters:
valueModel - the ValueModel to manage
Returns:
the binding builder that holds the ValueModel


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