org.viewaframework.binding.core
Class AbstractSelectionBinding<SS,SP,TS,TP>

java.lang.Object
  extended by org.viewaframework.binding.core.AbstractSelectionBinding<SS,SP,TS,TP>
Type Parameters:
SS - Source
TS - Target
All Implemented Interfaces:
Binding<SS>, SelectionBinding<SS,SP,TS,TP>
Direct Known Subclasses:
BeanAdapterBinding, ButtonBinding, ComboBoxSelectionBinding, ComboBoxSelectionPropertyBinding, LabelBinding, ListSelectionBinding, TableSelectionBinding, TextFieldBinding

public abstract class AbstractSelectionBinding<SS,SP,TS,TP>
extends Object
implements SelectionBinding<SS,SP,TS,TP>

Abstract implementation of the SelectionBinding interface.

Author:
Mario Garcia

Constructor Summary
AbstractSelectionBinding(BeanAdapter<SS> source, Property<SP> sourceProperty, BeanAdapter<TS> target, Property<TP> targetProperty)
          Here is a BeanAdapter as a source but implementations should hide this from the user and allow them to introduce any kind of JavaBean, the constructors will do something like new BasicBeanAdapter(source).
 
Method Summary
 BeanAdapter<SS> getSource()
           
 AbstractBindingListener<TS,TP,SP> getSourceListener()
           
 Property<SP> getSourceProperty()
           
 BeanAdapter<TS> getTarget()
           
 AbstractBindingListener<SS,SP,TP> getTargetListener()
           
 Property<TP> getTargetProperty()
           
 void setSource(BeanAdapter<SS> source)
           
 void setSourceListener(AbstractBindingListener<TS,TP,SP> sourceListener)
           
 void setSourceProperty(Property<SP> sourceProperty)
           
 void setTarget(BeanAdapter<TS> target)
           
 void setTargetListener(AbstractBindingListener<SS,SP,TP> targetListener)
           
 void setTargetProperty(Property<TP> targetProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.viewaframework.binding.core.Binding
bind, unbind
 

Constructor Detail

AbstractSelectionBinding

public AbstractSelectionBinding(BeanAdapter<SS> source,
                                Property<SP> sourceProperty,
                                BeanAdapter<TS> target,
                                Property<TP> targetProperty)
Here is a BeanAdapter as a source but implementations should hide this from the user and allow them to introduce any kind of JavaBean, the constructors will do something like new BasicBeanAdapter(source).

Parameters:
source - Source.
sourceProperty - Source property
target - Target
targetProperty - Target property
Method Detail

getSource

public BeanAdapter<SS> getSource()
Specified by:
getSource in interface SelectionBinding<SS,SP,TS,TP>
Returns:

getSourceListener

public AbstractBindingListener<TS,TP,SP> getSourceListener()
Returns:

getSourceProperty

public Property<SP> getSourceProperty()
Specified by:
getSourceProperty in interface SelectionBinding<SS,SP,TS,TP>
Returns:

getTarget

public BeanAdapter<TS> getTarget()
Specified by:
getTarget in interface SelectionBinding<SS,SP,TS,TP>
Returns:

getTargetListener

public AbstractBindingListener<SS,SP,TP> getTargetListener()
Returns:

getTargetProperty

public Property<TP> getTargetProperty()
Specified by:
getTargetProperty in interface SelectionBinding<SS,SP,TS,TP>
Returns:

setSource

public void setSource(BeanAdapter<SS> source)
Specified by:
setSource in interface SelectionBinding<SS,SP,TS,TP>

setSourceListener

public void setSourceListener(AbstractBindingListener<TS,TP,SP> sourceListener)
Parameters:
sourceListener -

setSourceProperty

public void setSourceProperty(Property<SP> sourceProperty)
Specified by:
setSourceProperty in interface SelectionBinding<SS,SP,TS,TP>

setTarget

public void setTarget(BeanAdapter<TS> target)
Specified by:
setTarget in interface SelectionBinding<SS,SP,TS,TP>

setTargetListener

public void setTargetListener(AbstractBindingListener<SS,SP,TP> targetListener)
Parameters:
targetListener -

setTargetProperty

public void setTargetProperty(Property<TP> targetProperty)
Specified by:
setTargetProperty in interface SelectionBinding<SS,SP,TS,TP>


Copyright © 2010. All Rights Reserved.