info.joseluismartin.gui.bind
Class CompositeBinder<T>

java.lang.Object
  extended by info.joseluismartin.gui.bind.CompositeBinder<T>
Type Parameters:
T - model
All Implemented Interfaces:
Binder<T>, ModelHolder<T>

public class CompositeBinder<T>
extends Object
implements Binder<T>

Composite Binder methods to a collection of PropertyBinders that bind on the same model

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
CompositeBinder()
           
CompositeBinder(T model)
           
 
Method Summary
 void addBinder(Binder<?> binder, String name)
           
 void bind(Object component, String propertyName)
           
 void bind(Object component, String propertyName, boolean readOnly)
           
 void bind(Object component, String propertyName, T model, boolean readOnly)
           
 Binder<?> getBinder(String propertyName)
           
 BinderFactory getBinderFactory()
           
 org.springframework.validation.BindingResult getBindingResult()
          Get binding result
 T getModel()
          Gets model
 Collection<Binder<T>> getPropertyBinders()
           
 Set<String> getPropertyNames()
           
 void refresh()
          Update Component from model
 void setBinderFactory(BinderFactory binderFactory)
           
 void setModel(T model)
          Sets model
 void update()
          Update Model from Component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeBinder

public CompositeBinder()

CompositeBinder

public CompositeBinder(T model)
Parameters:
T - model
Method Detail

bind

public void bind(Object component,
                 String propertyName)

bind

public void bind(Object component,
                 String propertyName,
                 boolean readOnly)

bind

public void bind(Object component,
                 String propertyName,
                 T model,
                 boolean readOnly)

refresh

public void refresh()
Description copied from interface: Binder
Update Component from model

Specified by:
refresh in interface Binder<T>

addBinder

public void addBinder(Binder<?> binder,
                      String name)

update

public void update()
Description copied from interface: Binder
Update Model from Component

Specified by:
update in interface Binder<T>

getBinder

public Binder<?> getBinder(String propertyName)

getPropertyNames

public Set<String> getPropertyNames()

getPropertyBinders

public Collection<Binder<T>> getPropertyBinders()

getBinderFactory

public BinderFactory getBinderFactory()
Returns:
the binderFactory

setBinderFactory

public void setBinderFactory(BinderFactory binderFactory)
Parameters:
binderFactory - the binderFactory to set

getModel

public T getModel()
Description copied from interface: ModelHolder
Gets model

Specified by:
getModel in interface ModelHolder<T>
Returns:
the model

setModel

public void setModel(T model)
Description copied from interface: ModelHolder
Sets model

Specified by:
setModel in interface ModelHolder<T>

getBindingResult

public org.springframework.validation.BindingResult getBindingResult()
Get binding result

Specified by:
getBindingResult in interface Binder<T>
Returns:
the binding result


Copyright © 2012 JDAL. All Rights Reserved.