wt.clients.beans.selectors
Class StringComponentDelegate

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

public class StringComponentDelegate
extends ComponentDelegateAdapter
implements TextListener, Externalizable

Component delegate for String attributes.

See Also:
Serialized Form

Nested Class Summary
(package private)  class StringComponentDelegate.KeyValidator
           
 
Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  StringComponentDelegate.KeyValidator validator
           
private static String versionID
           
 
Fields inherited from class wt.clients.beans.selectors.ComponentDelegateAdapter
 
Constructor Summary
StringComponentDelegate()
           
 
Method Summary
 Component getComponent()
          Return the component to be used.
 Dimension getComponentPreferredGridSize()
          Return the preferred grid size of the component.
 Object getValue()
          Return the current value for the attribute as contained in the component used to display the attribute value.
 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 setValue(Object value)
          Sets the current value for the attribute.
 void textValueChanged(TextEvent e)
           
 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, getObject, getObjectPropertyChangeListeners, getPropertyItem, hasOwnLabel, isDirect, isDirty, removeObjectPropertyChangeListener, setComponentContext, setCurrentComponent, setCurrentComponentContext, setCurrentObject, setCurrentPropertyDescriptor, setCurrentValue, setObject, setObjectPropertyChangeListeners, setPropertyDescriptor, setPropertyItem
 
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

validator

private StringComponentDelegate.KeyValidator validator
Constructor Detail

StringComponentDelegate

public StringComponentDelegate()
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

textValueChanged

public void textValueChanged(TextEvent e)
Specified by:
textValueChanged in interface TextListener
Parameters:
e -

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

getValue

public Object getValue()
Description copied from class: ComponentDelegateAdapter
Return the current value for the attribute as contained in the component used to display the attribute value.

Specified by:
getValue in interface ComponentDelegate
Overrides:
getValue in class ComponentDelegateAdapter
Returns:
Object

setValue

public void setValue(Object value)
Description copied from class: ComponentDelegateAdapter
Sets the current value for the attribute.

Specified by:
setValue in interface ComponentDelegate
Overrides:
setValue in class ComponentDelegateAdapter
Parameters:
value -

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