com.virtualweaver.xotics.datamodel.editor
Class XoEnumPropertyEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended bycom.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
          extended bycom.virtualweaver.xotics.datamodel.editor.XoEnumPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor, XoPropertyEditor
Direct Known Subclasses:
XoXmlWSPropertyEditor

public class XoEnumPropertyEditor
extends XoAbstractPropertyEditor

Version:
4.1

Field Summary
protected  java.lang.Object[] enumSpace
           
protected  boolean partEnum
           
 
Fields inherited from class com.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
customEditor, value
 
Constructor Summary
XoEnumPropertyEditor()
           
 
Method Summary
protected  void createCustomEditor()
          This method informs this to create the graphical UI to edit the value.
protected  java.lang.Object createValue(java.lang.String str)
          Creates an instance of value object by converting string param str.
protected  java.lang.String getAsString(java.lang.Object v)
           
 java.lang.String getAsText()
          Returns current value as string representation
protected  java.beans.PropertyEditor getContentPropertyEditor()
           
protected  java.lang.Object[] getEnumSpace()
           
protected  void initCustomEditor()
          This method informs this to init or reinit the graphical UI previously created by createCustomEditor().
protected  boolean isPartEnum()
           
protected  void setCustomEditorValue()
          This method informs this to setup the graphical UI with current value.
 void setProperty(XoProperty p)
          Sets the property possibly using this editor.
 
Methods inherited from class com.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
getCustomEditor, getValue, isPaintable, setAsText, setValue, supportsCustomEditor
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getTags, paintValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getJavaInitializationString, getTags, paintValue, removePropertyChangeListener
 

Field Detail

enumSpace

protected java.lang.Object[] enumSpace

partEnum

protected boolean partEnum
Constructor Detail

XoEnumPropertyEditor

public XoEnumPropertyEditor()
Method Detail

getEnumSpace

protected java.lang.Object[] getEnumSpace()

isPartEnum

protected boolean isPartEnum()

getContentPropertyEditor

protected java.beans.PropertyEditor getContentPropertyEditor()

createValue

protected java.lang.Object createValue(java.lang.String str)
                                throws java.lang.IllegalArgumentException
Description copied from class: XoAbstractPropertyEditor
Creates an instance of value object by converting string param str.

Specified by:
createValue in class XoAbstractPropertyEditor
Parameters:
str - the string to convert into value
Returns:
an object created with str
Throws:
java.lang.IllegalArgumentException - if str is not convertible

getAsString

protected java.lang.String getAsString(java.lang.Object v)

setProperty

public void setProperty(XoProperty p)
Description copied from class: XoAbstractPropertyEditor
Sets the property possibly using this editor. This method is not mandatory, but could be used to obtain some useful data or tools to edit value, such as property class, owner object, and then DM instance and through it other functionalities.

Specified by:
setProperty in interface XoPropertyEditor
Overrides:
setProperty in class XoAbstractPropertyEditor

getAsText

public java.lang.String getAsText()
Description copied from class: XoAbstractPropertyEditor
Returns current value as string representation

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class XoAbstractPropertyEditor
Returns:
this method returns null if value is null or value.toString()

createCustomEditor

protected void createCustomEditor()
Description copied from class: XoAbstractPropertyEditor
This method informs this to create the graphical UI to edit the value. The result must be stored in customEditor field. If a customEditor instance already exists, it must be released cleanly (i.e. remove any listener on it) before creating new instance.

Specified by:
createCustomEditor in class XoAbstractPropertyEditor

initCustomEditor

protected void initCustomEditor()
Description copied from class: XoAbstractPropertyEditor
This method informs this to init or reinit the graphical UI previously created by createCustomEditor().

Specified by:
initCustomEditor in class XoAbstractPropertyEditor

setCustomEditorValue

protected void setCustomEditorValue()
Description copied from class: XoAbstractPropertyEditor
This method informs this to setup the graphical UI with current value.

Specified by:
setCustomEditorValue in class XoAbstractPropertyEditor