com.jgoodies.binding.binder
Class Binders

java.lang.Object
  extended by com.jgoodies.binding.binder.Binders

public final class Binders
extends Object

Creates binders for Objects, Beans, PresentationModels, and ActionObject, ActionBeans, and ActionPresentationModels. Since the latter three classes do not ship with the JGoodies Binding, these are described by interfaces.

Since:
2.7
Version:
$Revision: 1.3 $
Author:
Karsten Lentzsch

Method Summary
static ObjectBinder binder()
          Creates and returns a general binder for objects that can bind Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.
static ActionBeanBinder binderFor(com.jgoodies.common.internal.IActionBean bean)
          Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the binder returned by binderFor(Object).
static ActionObjectBinder binderFor(com.jgoodies.common.internal.IActionObject object)
          Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the general binder returned by binder().
static ActionPresentationModelBinder binderFor(IActionPresentationModel<?> model)
          Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the binder returned by binderFor(IPresentationModel).
static PresentationModelBinder binderFor(IPresentationModel<?> model)
          Creates and returns a binder for presentation models that can bind bean properties, (synthetic) properties of the presentation model, as well as the object bindings: Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.
static BeanBinder binderFor(Object bean)
          Creates and returns a binder for beans that can bind bean properties as well as the object bindings: Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

binder

public static ObjectBinder binder()
Creates and returns a general binder for objects that can bind Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.

Returns:
the created binder

binderFor

public static ActionObjectBinder binderFor(com.jgoodies.common.internal.IActionObject object)
Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the general binder returned by binder().

Parameters:
object - provides Actions for Action names
Returns:
the created binder

binderFor

public static BeanBinder binderFor(Object bean)
Creates and returns a binder for beans that can bind bean properties as well as the object bindings: Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.

The parameter type is Object, not ObservableBean or ObservableBean2, because any Object may be a bean. If bean is not a bean, runtime exceptions will be thrown during the execution.

Parameters:
bean - the bean used to bind bean properties
Returns:
the created binder

binderFor

public static ActionBeanBinder binderFor(com.jgoodies.common.internal.IActionBean bean)
Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the binder returned by binderFor(Object).

Parameters:
bean - the bean used to bind bean properties and to look up Actions
Returns:
the created binder

binderFor

public static PresentationModelBinder binderFor(IPresentationModel<?> model)
Creates and returns a binder for presentation models that can bind bean properties, (synthetic) properties of the presentation model, as well as the object bindings: Actions, ListModel + ListSelectionModel, ValueModels, and SelectionInLists.

Parameters:
model - the presentation model that holds a bean (used to bind bean properties) and that may provide its own synthetic properties
Returns:
the created binder

binderFor

public static ActionPresentationModelBinder binderFor(IActionPresentationModel<?> model)
Creates and returns a binder that adds the capability to bind Actions that are looked up by an Action name to the binder returned by binderFor(IPresentationModel).

Parameters:
model - the presentation model that holds a bean (used to bind bean properties), and that may provide its own synthetic properties, and that provides Actions for Action names
Returns:
the created binder


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