|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 BindingContext
id
- the adapter idbinding
- the adapter
public PropertyAdapter remove(java.lang.String id)
BindingContext
remove
in interface BindingContext
id
- The adapter id
public void addChild(BindingContext child)
child
- public java.util.Set<BindingContext> getChilds()
BindingContext
getChilds
in interface BindingContext
public void setChilds(java.util.Set<BindingContext> childs)
childs
- The childs to set.public BindingContext getParent()
BindingContext
getParent
in interface BindingContext
public void setParent(BindingContext parent)
setParent
in interface BindingContext
parent
- The parent binding context to set.public java.util.List<PropertyAdapter> getPropertyAdapters()
BindingContext
getPropertyAdapters
in interface BindingContext
public Decorator getDecorator(java.lang.String id)
BindingContext
getDecorator
in interface BindingContext
id
- the id
public Format getFormat(java.lang.String id)
BindingContext
getFormat
in interface BindingContext
id
- the id
public void registerControl(java.lang.String id, BoundControl control)
registerControl
in interface BindingContext
id
- the adapter idcontrol
- the controlpublic void removeControl(BoundControl control)
BindingContext
removeControl
in interface BindingContext
control
- the controlpublic BoundControl getControl(java.lang.String id)
BindingContext
getControl
in interface BindingContext
id
- 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
BindingException
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
BindingContext
addPropertyChangeListener
in interface BindingContext
listener
- the listenerpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface BindingContext
propertyName
- listener
- public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
BindingContext
removePropertyChangeListener
in interface BindingContext
listener
- -
The PropertyChangeListener to be removedpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- listener
- public void synchronize()
BindingContext
synchronize
in interface BindingContext
public boolean isValid()
BindingContext
isValid
in interface BindingContext
public boolean isDirty()
BindingContext
isDirty
in interface BindingContext
public void update()
BindingContext
update
in interface BindingContext
public void validate()
BindingContext
validate
in interface BindingContext
public boolean removeChild(BindingContext context)
BindingContext
removeChild
in interface BindingContext
context
- the context
public PresentationModel getPresentationModel()
BindingContext
getPresentationModel
in interface BindingContext
public void setPresentationModel(PresentationModel presentationModel)
BindingContext
setPresentationModel
in interface BindingContext
presentationModel
- The presentationModel to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |