jve.generated
Interface IBoundObject

All Known Subinterfaces:
IDataObject, IRowsDataObject, ITableBinder
All Known Implementing Classes:
BasicDataObject, DataSourceDataRows, ObjectReference, SwingDataServiceAction, SwingTableBinder

public interface IBoundObject

This interface represents a reference to an Object.


Field Summary
static java.lang.String DELIMITER
          Property delimiter (for example: contact.address.zip)
static java.lang.String PROPERTY_OBJ_CHANGED
          Property change property when the entire Object has changed
 
Method Summary
 void actionPerformed(IActionBinder action)
          Notify the bound object that an action was performed where the reference object was used to perform an action.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener to the listener list.
 java.lang.Object getObject()
          Get the bound object.
 java.lang.String getProperty()
          Get the property of the source object that will be used as the bound object.
 java.lang.Object getSourceObject()
          Get the source object that is used to reference the bound object.
 java.lang.Class getType()
          Get the class type of the referenced object.
 void refresh()
          Refresh the referenced object.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Remove an existing PropertyChangeListener from the listener list.
 void setProperty(java.lang.String property)
          Set the property of the source object that will be the bound object.
 void setSourceObject(java.lang.Object object)
          Set the source object that will be used as a reference for the bound object.
 void setSourceObject(java.lang.Object object, java.lang.String property)
          Set the source object and target property simultaneously.
 

Field Detail

DELIMITER

public static final java.lang.String DELIMITER
Property delimiter (for example: contact.address.zip)

See Also:
Constant Field Values

PROPERTY_OBJ_CHANGED

public static final java.lang.String PROPERTY_OBJ_CHANGED
Property change property when the entire Object has changed

See Also:
Constant Field Values
Method Detail

setProperty

public void setProperty(java.lang.String property)
Set the property of the source object that will be the bound object. This value may be null.

Parameters:
property - the property of the source object

getProperty

public java.lang.String getProperty()
Get the property of the source object that will be used as the bound object.

Returns:
the property

setSourceObject

public void setSourceObject(java.lang.Object object)
Set the source object that will be used as a reference for the bound object.

Parameters:
object - the source object

setSourceObject

public void setSourceObject(java.lang.Object object,
                            java.lang.String property)
Set the source object and target property simultaneously. Using this method will prevent multiple event firings of changing both the sourceObject and property separately.

Parameters:
object - the source object
property - the target property

getSourceObject

public java.lang.Object getSourceObject()
Get the source object that is used to reference the bound object.

Returns:
the source object

getObject

public java.lang.Object getObject()
Get the bound object. Depending on the implementation this may be the same as the sourceObject.

Returns:
referenced object

actionPerformed

public void actionPerformed(IActionBinder action)
Notify the bound object that an action was performed where the reference object was used to perform an action. Typically a binder can choose the manner of reaction, if any.

Parameters:
action - the action that used the referenced object

refresh

public void refresh()
Refresh the referenced object. A call to this method denotes to the reference object that any cached information should be discarted, or that the referenced object has changed. If the referenced object is dynamic (such as the result of a method invocation) the object will be refreshed.


getType

public java.lang.Class getType()
                        throws java.lang.IllegalStateException
Get the class type of the referenced object. This is necessary to enable design time visual support through introspection.

Returns:
the Class type of the configured object. If it is an array or a List, it will return the type of the elements that comprises the array or List rather than the type array or List type.
Throws:
java.lang.IllegalStateException - if the target object can not be determined due to a miss-configuration. The exception includes a message denoting the reason.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. The listner will be notified of any changes to bound properties on the referenced object. The listener will also be fired when the entire object is changed, with PROPERTY_OBJ_CHANGED as the property type.

Parameters:
l - the listener to add.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove an existing PropertyChangeListener from the listener list.

Parameters:
l - the listener to remove.