sunw.beanbox
Class PropertyHookup
java.lang.Object
|
+--sunw.beanbox.PropertyHookup
- public class PropertyHookup
- extends java.lang.Object
- implements java.beans.PropertyChangeListener, java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
PropertyHookup(java.lang.Object source)
Constructor for a new property hookup adaptor. |
Method Summary |
void |
attach(java.lang.Object source,
java.lang.String propertyName,
java.lang.reflect.Method getter,
java.lang.Object targetObject,
java.lang.reflect.Method setter)
Create a property hookup, so that a change to the named bound
property on the source object turns into a call on the "setter"
method of the given target object. |
void |
attach(java.lang.String propertyName,
java.lang.Object targetObject,
java.lang.reflect.Method setter)
Version of the above for when the objects have been initialized somehow |
java.lang.reflect.Method |
getSetterMethod(java.lang.Object o)
|
java.lang.Object |
getTargetObject(java.lang.Object o)
|
java.util.Hashtable |
getTargetsByProperty()
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This is the method that gets called when a bound property
changes on the source object. |
void |
vetoablePropertyChange(java.beans.PropertyChangeEvent evt)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PropertyHookup
public PropertyHookup(java.lang.Object source)
- Constructor for a new property hookup adaptor.
attach
public void attach(java.lang.Object source,
java.lang.String propertyName,
java.lang.reflect.Method getter,
java.lang.Object targetObject,
java.lang.reflect.Method setter)
- Create a property hookup, so that a change to the named bound
property on the source object turns into a call on the "setter"
method of the given target object.
attach
public void attach(java.lang.String propertyName,
java.lang.Object targetObject,
java.lang.reflect.Method setter)
- Version of the above for when the objects have been initialized somehow
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- This is the method that gets called when a bound property
changes on the source object.
We map the property name to a list of targets and then
call each of the target "setter" methods.
- Specified by:
- propertyChange in interface java.beans.PropertyChangeListener
vetoablePropertyChange
public void vetoablePropertyChange(java.beans.PropertyChangeEvent evt)
throws java.beans.PropertyVetoException
getTargetsByProperty
public java.util.Hashtable getTargetsByProperty()
getTargetObject
public java.lang.Object getTargetObject(java.lang.Object o)
getSetterMethod
public java.lang.reflect.Method getSetterMethod(java.lang.Object o)