|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.beans.selectors.ComponentDelegateAdapter
This is an adapter class which provides default implementations of many
of the methods required for the ComponentDelegate interface. It is intended
to be subclassed by concrete implementations of the ComponentDelegate
interface.
Supported API: true
Extendable: true
Field Summary | |
private static String |
CLASSNAME
|
private Component |
currentComponent
|
private ComponentContext |
currentComponentContext
|
private Object |
currentObject
|
private PropertyDescriptor |
currentPropertyDescriptor
|
private Object |
currentValue
|
private Vector |
objectPropertyChangeListeners
|
private PropertyItem |
propertyItem
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static String |
versionID
|
Constructor Summary | |
ComponentDelegateAdapter()
|
Method Summary | |
void |
addObjectPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener which should be notified when the attribute value changes in the component. |
protected void |
firePropertyChangeEvent(Object oldValue,
Object newValue)
|
Component |
getComponent()
Return the component to be used. |
Dimension |
getComponentPreferredGridSize()
Return the preferred grid size of the component. |
protected Component |
getCurrentComponent()
Gets the value of the attribute: currentComponent. |
protected ComponentContext |
getCurrentComponentContext()
Gets the value of the attribute: currentComponentContext. |
protected Object |
getCurrentObject()
Gets the value of the attribute: currentObject. |
protected PropertyDescriptor |
getCurrentPropertyDescriptor()
Gets the value of the attribute: currentPropertyDescriptor. |
protected Object |
getCurrentValue()
Gets the value of the attribute: currentValue. |
Object |
getObject()
|
protected Vector |
getObjectPropertyChangeListeners()
Gets the value of the attribute: objectPropertyChangeListeners. |
protected PropertyItem |
getPropertyItem()
Gets the value of the attribute: propertyItem. |
Object |
getValue()
Return the current value for the attribute as contained in the component used to display the attribute value. |
boolean |
hasOwnLabel()
Returns true if the component supplies its own label and one should not be created for it by the AttributesForm. |
boolean |
isDirect()
Return true if the ComponentDelegate works directly with the object containing the attribute, instead of with the individual attribute. |
boolean |
isDirty()
Return true if the value of the attribute has been modified in user interface. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private void |
readOldVersion(ObjectInput input,
long readSerialVersionUID)
Reads the non-transient fields of this class from an external source, which is not the current version. |
void |
removeObjectPropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener. |
void |
setComponentContext(ComponentContext context)
Set the context for the component. |
protected void |
setCurrentComponent(Component a_CurrentComponent)
Sets the value of the attribute: currentComponent. |
protected void |
setCurrentComponentContext(ComponentContext a_CurrentComponentContext)
Sets the value of the attribute: currentComponentContext. |
protected void |
setCurrentObject(Object a_CurrentObject)
Sets the value of the attribute: currentObject. |
protected void |
setCurrentPropertyDescriptor(PropertyDescriptor a_CurrentPropertyDescriptor)
Sets the value of the attribute: currentPropertyDescriptor. |
protected void |
setCurrentValue(Object a_CurrentValue)
Sets the value of the attribute: currentValue. |
void |
setObject(Object object)
|
protected void |
setObjectPropertyChangeListeners(Vector a_ObjectPropertyChangeListeners)
Sets the value of the attribute: objectPropertyChangeListeners. |
void |
setPropertyDescriptor(PropertyDescriptor descriptor)
Sets the property descriptor for the attribute. |
protected void |
setPropertyItem(PropertyItem a_PropertyItem)
Sets the value of the attribute: propertyItem. |
void |
setValue(Object value)
Sets the current value for the attribute. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final String versionID
static final long serialVersionUID
private Component currentComponent
private Object currentValue
private Object currentObject
private PropertyDescriptor currentPropertyDescriptor
private ComponentContext currentComponentContext
private transient Vector objectPropertyChangeListeners
private PropertyItem propertyItem
Constructor Detail |
public ComponentDelegateAdapter()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
private void readOldVersion(ObjectInput input, long readSerialVersionUID) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
-
IOException
ClassNotFoundException
protected Component getCurrentComponent()
protected void setCurrentComponent(Component a_CurrentComponent) throws WTPropertyVetoException
a_CurrentComponent
-
WTPropertyVetoException
protected Object getCurrentValue()
protected void setCurrentValue(Object a_CurrentValue) throws WTPropertyVetoException
a_CurrentValue
-
WTPropertyVetoException
protected Object getCurrentObject()
protected void setCurrentObject(Object a_CurrentObject) throws WTPropertyVetoException
a_CurrentObject
-
WTPropertyVetoException
protected PropertyDescriptor getCurrentPropertyDescriptor()
protected void setCurrentPropertyDescriptor(PropertyDescriptor a_CurrentPropertyDescriptor) throws WTPropertyVetoException
a_CurrentPropertyDescriptor
-
WTPropertyVetoException
protected ComponentContext getCurrentComponentContext()
protected void setCurrentComponentContext(ComponentContext a_CurrentComponentContext) throws WTPropertyVetoException
a_CurrentComponentContext
-
WTPropertyVetoException
protected Vector getObjectPropertyChangeListeners()
protected void setObjectPropertyChangeListeners(Vector a_ObjectPropertyChangeListeners) throws WTPropertyVetoException
a_ObjectPropertyChangeListeners
-
WTPropertyVetoException
protected PropertyItem getPropertyItem()
protected void setPropertyItem(PropertyItem a_PropertyItem) throws WTPropertyVetoException
a_PropertyItem
-
WTPropertyVetoException
protected void firePropertyChangeEvent(Object oldValue, Object newValue)
oldValue
- newValue
- public Component getComponent()
getComponent
in interface ComponentDelegate
public boolean isDirect()
isDirect
in interface ComponentDelegate
public boolean isDirty()
isDirty
in interface ComponentDelegate
public Object getValue() throws WTException, WTPropertyVetoException
getValue
in interface ComponentDelegate
WTException
WTPropertyVetoException
public void setValue(Object value) throws WTException
setValue
in interface ComponentDelegate
value
-
WTException
public Object getObject() throws WTException
getObject
in interface ComponentDelegate
WTException
public void setObject(Object object) throws WTException
setObject
in interface ComponentDelegate
object
-
WTException
public void setPropertyDescriptor(PropertyDescriptor descriptor)
setPropertyDescriptor
in interface ComponentDelegate
descriptor
- public void setComponentContext(ComponentContext context)
setComponentContext
in interface ComponentDelegate
context
- public boolean hasOwnLabel()
hasOwnLabel
in interface ComponentDelegate
public Dimension getComponentPreferredGridSize()
getComponentPreferredGridSize
in interface ComponentDelegate
public void addObjectPropertyChangeListener(PropertyChangeListener listener)
addObjectPropertyChangeListener
in interface ComponentDelegate
listener
- public void removeObjectPropertyChangeListener(PropertyChangeListener listener)
removeObjectPropertyChangeListener
in interface ComponentDelegate
listener
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |