net.sf.doolin.bus.bean
Class Bean
java.lang.Object
net.sf.doolin.bus.bean.Bean
- All Implemented Interfaces:
- Serializable, IBean
- Direct Known Subclasses:
- AbstractActionContext, AbstractFieldDescriptor, AbstractGUIEdit, BusMonitoringLog, BusMonitoringModel, Column, SelectableItem, SystemInformationModel, ValidationSupportImpl, Value, WizardState
public abstract class Bean
- extends Object
- implements Serializable, IBean
This class defines an object that can notify its changes to the bus.
Notification of changes can be done on the spot, or buffered or completely
stopped.
Any Bean can have a parent and we can therefore define a hierarchy of
beans. Each level in the hierarchy participates in the
notification of changes.
For example, in the following hierarchy:
A {
B b;
}
B {
C c;
}
C {
String name;
}
If C notifies a change on name as in:
C {
...
notify("name", "Old value", "A new name");
...
}
Following events are generated on the bus:
C.name := "A new name";
B.c.name := "A new name";
A.b.c.name := "A new name";
- Author:
- Damien Coraboeuf
- See Also:
- Serialized Form
|
Constructor Summary |
Bean()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Bean
public Bean()
getBeanNotificationSupport
public BeanNotificationSupport getBeanNotificationSupport()
- Specified by:
getBeanNotificationSupport in interface IBean
getParentBean
public IParentBean getParentBean()
- Specified by:
getParentBean in interface IBean
notify
protected void notify(String propertyName,
Object oldValue,
Object newValue)
- Notifies to the bus that a simple property (non-
Bean) has
changed. If the notification mode is BUFFERED, the change will be
actually sent when notification mode is restored to NORMAL.
- Parameters:
propertyName - Name of the propertyoldValue - Old value of the propertynewValue - New value of the property- See Also:
PropertyChangeMessage
setParentBean
public void setParentBean(IParentBean parentBean)
- Sets the parent bean for this bean.
- Specified by:
setParentBean in interface IBean
- Parameters:
parentBean - New parent bean
Copyright © 2011. All Rights Reserved.