wt.clients.beans.selectors
Class ProjectComponentDelegate

java.lang.Object
  extended bywt.clients.beans.selectors.ComponentDelegateAdapter
      extended bywt.clients.beans.selectors.ProjectComponentDelegate
All Implemented Interfaces:
ComponentDelegate, Externalizable, Serializable

public class ProjectComponentDelegate
extends ComponentDelegateAdapter
implements Externalizable

Component delegate for wt.project.ProjectReference attributes.

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static String versionID
           
 
Fields inherited from class wt.clients.beans.selectors.ComponentDelegateAdapter
 
Constructor Summary
ProjectComponentDelegate()
           
 
Method Summary
 Component getComponent()
          Return the component to be used.
 Dimension getComponentPreferredGridSize()
          Return the preferred grid size of the component.
 Object getObject()
           
 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.
 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 setObject(Object object)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.clients.beans.selectors.ComponentDelegateAdapter
addObjectPropertyChangeListener, firePropertyChangeEvent, getCurrentComponent, getCurrentComponentContext, getCurrentObject, getCurrentPropertyDescriptor, getCurrentValue, getObjectPropertyChangeListeners, getPropertyItem, getValue, isDirty, removeObjectPropertyChangeListener, setComponentContext, setCurrentComponent, setCurrentComponentContext, setCurrentObject, setCurrentPropertyDescriptor, setCurrentValue, setObjectPropertyChangeListeners, setPropertyDescriptor, setPropertyItem, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

versionID

private static final String versionID
See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ProjectComponentDelegate

public ProjectComponentDelegate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class ComponentDelegateAdapter
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class ComponentDelegateAdapter
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readOldVersion

private void readOldVersion(ObjectInput input,
                            long readSerialVersionUID)
                     throws IOException,
                            ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
Throws:
IOException
ClassNotFoundException

getComponent

public Component getComponent()
Description copied from class: ComponentDelegateAdapter
Return the component to be used. The delegate is responsible for creating a component appropriate for the datatype and context.

Specified by:
getComponent in interface ComponentDelegate
Overrides:
getComponent in class ComponentDelegateAdapter
Returns:
Component

isDirect

public boolean isDirect()
Description copied from class: ComponentDelegateAdapter
Return true if the ComponentDelegate works directly with the object containing the attribute, instead of with the individual attribute. If this method returns true, the setObject() and getObject() methods should be invoked instead of the getValue() and setValue() methods.

Specified by:
isDirect in interface ComponentDelegate
Overrides:
isDirect in class ComponentDelegateAdapter
Returns:
boolean

getObject

public Object getObject()
                 throws WTException
Specified by:
getObject in interface ComponentDelegate
Overrides:
getObject in class ComponentDelegateAdapter
Returns:
Object
Throws:
WTException

setObject

public void setObject(Object object)
Specified by:
setObject in interface ComponentDelegate
Overrides:
setObject in class ComponentDelegateAdapter
Parameters:
object -

getComponentPreferredGridSize

public Dimension getComponentPreferredGridSize()
Description copied from class: ComponentDelegateAdapter
Return the preferred grid size of the component. The default value is (1,1) which gives it a grid width and height of 1 in the AttributesForm. To take up two grid positions horizontally, return a preferred grid size of (2,1).

Specified by:
getComponentPreferredGridSize in interface ComponentDelegate
Overrides:
getComponentPreferredGridSize in class ComponentDelegateAdapter
Returns:
Dimension

hasOwnLabel

public boolean hasOwnLabel()
Description copied from class: ComponentDelegateAdapter
Returns true if the component supplies its own label and one should not be created for it by the AttributesForm.

Specified by:
hasOwnLabel in interface ComponentDelegate
Overrides:
hasOwnLabel in class ComponentDelegateAdapter
Returns:
boolean