ewe.data
Class EditableObject

java.lang.Object
  extended byewe.data.DataObject
      extended byewe.data.EditableObject
All Implemented Interfaces:
Comparable, Copyable, DataUnit, EditableData, Encodable, Textable, Transferrable

public abstract class EditableObject
extends DataObject
implements EditableData, Encodable

This is an implementation of EditableData that is only missing the getControl() method.


Constructor Summary
EditableObject()
           
 
Method Summary
 void fromSaveableData(Wrapper data)
          This retrieves the state from the data in the wrapper.
 Object getProperty(String name, Object defaultValue)
          By default, this returns the default value.
 boolean getSetTransferData(Object transferTo, Wrapper data, boolean isGet)
           
 String getText()
          By default, this calls the ewe.util.Utils.textEncode(Encodable e) on itself.
 void setText(String encoded)
          By default, this calls the ewe.util.Utils.textDecode(String text,Encodable e) on itself.
 void toSaveableData(Wrapper data)
          This asks the object to set the Wrapper to be a value that can be used to save the state of this object.
 
Methods inherited from class ewe.data.DataObject
_getSetField, appendAllFields, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getDeclaredFieldValue, getFieldList, getFieldList, getMyFieldList, getNew
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, toString
 
Methods inherited from interface ewe.data.EditableData
getControl
 
Methods inherited from interface ewe.data.DataUnit
copyFrom, getNew
 
Methods inherited from interface ewe.util.Copyable
getCopy
 
Methods inherited from interface ewe.util.Comparable
compareTo
 

Constructor Detail

EditableObject

public EditableObject()
Method Detail

getProperty

public Object getProperty(String name,
                          Object defaultValue)
By default, this returns the default value.

Specified by:
getProperty in interface EditableData

getText

public String getText()
By default, this calls the ewe.util.Utils.textEncode(Encodable e) on itself.

Specified by:
getText in interface Textable

setText

public void setText(String encoded)
By default, this calls the ewe.util.Utils.textDecode(String text,Encodable e) on itself.

Specified by:
setText in interface Textable

toSaveableData

public void toSaveableData(Wrapper data)
Description copied from interface: EditableData
This asks the object to set the Wrapper to be a value that can be used to save the state of this object. The value set in the Wrapper should be If you are calling setObject() for one of the specified types, you must NOT provide a null object.

Specified by:
toSaveableData in interface EditableData

fromSaveableData

public void fromSaveableData(Wrapper data)
                      throws IllegalArgumentException
Description copied from interface: EditableData
This retrieves the state from the data in the wrapper. See toSaveableData() for acceptable data types that should be stored in the Wrapper.

Specified by:
fromSaveableData in interface EditableData
Throws:
IllegalArgumentException

getSetTransferData

public boolean getSetTransferData(Object transferTo,
                                  Wrapper data,
                                  boolean isGet)
Specified by:
getSetTransferData in interface Transferrable