|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.echobinding.binding.AbstractBindingContext
public abstract class AbstractBindingContext
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,PropertyAdapter> |
_adapters
|
protected java.beans.PropertyChangeSupport |
_changes
|
| Constructor Summary | |
|---|---|
AbstractBindingContext()
|
|
| Method Summary | |
|---|---|
BindingContext |
add(java.lang.String id,
PropertyAdapter binding)
Adds a property adapter to the context. |
void |
addChild(BindingContext child)
Adds a child to the set of child contexts. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add listener for the specified property name. |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent event)
|
protected void |
firePropertyChange(java.lang.String bindingId,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.util.Set<BindingContext> |
getChilds()
Returns the child binding contexts. |
BoundControl |
getControl(java.lang.String id)
Returns the bound control that belongs to the adapter id. |
java.util.Set<BoundControl> |
getControls()
Returns all registered controls. |
Decorator |
getDecorator(java.lang.String id)
Returns the decorator for the specified binding id. |
Format |
getFormat(java.lang.String id)
Returns the format for the specified adapter. |
BindingContext |
getParent()
Returns the parent binding context. |
PresentationModel |
getPresentationModel()
Returns the pesentation model. |
java.util.List<PropertyAdapter> |
getPropertyAdapters()
Returns all property adapters for this context. |
boolean |
isDirty()
Checks if the state of any controls in this context an its sub contexts is different from the state in the model. |
boolean |
isValid()
Checks if all controls in this context and the controls in its sub contexts contain valid inputs. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
|
void |
registerControl(java.lang.String id,
BoundControl control)
Adds a control to the list of registered controls and registers the control as PropertyChangeListener at this context. |
PropertyAdapter |
remove(java.lang.String id)
Removes a binding from the context. |
boolean |
removeChild(BindingContext context)
Removes a child context from this context. |
void |
removeControl(BoundControl control)
Renoves a bound control from the context. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove listeners for the given property name. |
void |
setChilds(java.util.Set<BindingContext> childs)
Sets the child contexts. |
void |
setParent(BindingContext parent)
Sets the parent binding context. |
void |
setPresentationModel(PresentationModel presentationModel)
Sets the presentation model. |
void |
synchronize()
Synchronizes the GUI/screen state with the application state. |
void |
update()
Resets the GUI/screen state. |
void |
validate()
Validates this context and all its sub contexts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.echobinding.binding.BindingContext |
|---|
createChild, getAdapter, getModel, getValidationHandler, getValidationHandler, getValue, isDirty, setModel, setValidationHandler, setValue, validate |
| Field Detail |
|---|
protected java.util.HashMap<java.lang.String,PropertyAdapter> _adapters
protected java.beans.PropertyChangeSupport _changes
| Constructor Detail |
|---|
public AbstractBindingContext()
| Method Detail |
|---|
public BindingContext add(java.lang.String id,
PropertyAdapter binding)
BindingContext
add in interface BindingContextid - the adapter idbinding - the adapter
public PropertyAdapter remove(java.lang.String id)
BindingContext
remove in interface BindingContextid - The adapter id
public void addChild(BindingContext child)
child - public java.util.Set<BindingContext> getChilds()
BindingContext
getChilds in interface BindingContextpublic void setChilds(java.util.Set<BindingContext> childs)
childs - The childs to set.public BindingContext getParent()
BindingContext
getParent in interface BindingContextpublic void setParent(BindingContext parent)
setParent in interface BindingContextparent - The parent binding context to set.public java.util.List<PropertyAdapter> getPropertyAdapters()
BindingContext
getPropertyAdapters in interface BindingContextpublic Decorator getDecorator(java.lang.String id)
BindingContext
getDecorator in interface BindingContextid - the id
public Format getFormat(java.lang.String id)
BindingContext
getFormat in interface BindingContextid - the id
public void registerControl(java.lang.String id,
BoundControl control)
registerControl in interface BindingContextid - the adapter idcontrol - the controlpublic void removeControl(BoundControl control)
BindingContext
removeControl in interface BindingContextcontrol - the controlpublic BoundControl getControl(java.lang.String id)
BindingContext
getControl in interface BindingContextid - The adapter id
public java.util.Set<BoundControl> getControls()
BindingContext
getControls in interface BindingContext
protected void firePropertyChange(java.lang.String bindingId,
java.lang.Object oldValue,
java.lang.Object newValue)
throws BindingException
bindingId - oldValue - newValue -
BindingException
protected void firePropertyChange(java.beans.PropertyChangeEvent event)
throws BindingException
BindingExceptionpublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
BindingContext
addPropertyChangeListener in interface BindingContextlistener - the listener
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface BindingContextpropertyName - listener - public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
BindingContext
removePropertyChangeListener in interface BindingContextlistener - -
The PropertyChangeListener to be removed
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - listener - public void synchronize()
BindingContext
synchronize in interface BindingContextpublic boolean isValid()
BindingContext
isValid in interface BindingContextpublic boolean isDirty()
BindingContext
isDirty in interface BindingContextpublic void update()
BindingContext
update in interface BindingContextpublic void validate()
BindingContext
validate in interface BindingContextpublic boolean removeChild(BindingContext context)
BindingContext
removeChild in interface BindingContextcontext - the context
public PresentationModel getPresentationModel()
BindingContext
getPresentationModel in interface BindingContextpublic void setPresentationModel(PresentationModel presentationModel)
BindingContext
setPresentationModel in interface BindingContextpresentationModel - The presentationModel to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||