com.ibm.commons.swt.data.editors
Class ObjectEditor

java.lang.Object
  extended by com.ibm.commons.swt.data.editors.api.PropertyEditor
      extended by com.ibm.commons.swt.data.editors.api.AbstractObjectEditor
          extended by com.ibm.commons.swt.data.editors.ObjectEditor
All Implemented Interfaces:
IPropertyEditor

public class ObjectEditor
extends AbstractObjectEditor

An editor for objects whose type is known/defined via ObjectValueNode.

See Also:
ObjectValueNode

Field Summary
 
Fields inherited from class com.ibm.commons.swt.data.editors.api.AbstractObjectEditor
currentValue
 
Constructor Summary
ObjectEditor(ObjectValueNode objValueNode)
          Constructs a new instance of this class with the given ObjectValueNode.
ObjectEditor(ObjectValueNode objValueNode, java.lang.String value)
          Constructs a new instance of this class with the given ObjectValueNode and the current string value of the object.
 
Method Summary
protected  void addObject(IClassDef classDef)
          Called when the 'Add' button is pressed.
protected  java.lang.String getAddText()
          Returns the text to appear on the 'Add' button, that is the button for creating a new 'Object'.
protected  java.lang.String getDeleteText()
          Returns the text to appear on the 'Delete' button, that is the button for deleting an existing 'Object'.
protected  IClassDef getExpectedClassDef()
          Returns the com.ibm.commons.iloader.node.IClassDef required to create a new Object.
protected  void removeObject()
          Called when the 'Remove' (or delete) button is pressed.
 void setCurrentValue(java.lang.String value)
           
 
Methods inherited from class com.ibm.commons.swt.data.editors.api.AbstractObjectEditor
createControl, doAddObject, doRemoveObject, initControlValue, setId, stopEdit
 
Methods inherited from class com.ibm.commons.swt.data.editors.api.PropertyEditor
addPropertyEditorUpdateListener, addValidator, callDialog, getContextAttribute, getContextObject, getDefaultEditor, getDialogButtonAltText, getDialogButtonImage, getDialogButtonText, getEditor, getRenderedValue, getScriptMode, getTextValidator, getValidator, getWorkBenchPart, hasDialogButton, isScriptModeFixed, postModelUpdate, preModelUpdate, removePropertyEditorUpdateListener, setContextAttribute, setContextObject, setScriptMode, setValidator, setWorkBenchPart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectEditor

public ObjectEditor(ObjectValueNode objValueNode)
Constructs a new instance of this class with the given ObjectValueNode.

Parameters:
objValueNode -
See Also:
ObjectValueNode

ObjectEditor

public ObjectEditor(ObjectValueNode objValueNode,
                    java.lang.String value)
Constructs a new instance of this class with the given ObjectValueNode and the current string value of the object.

Parameters:
objValueNode -
value -
See Also:
ObjectValueNode
Method Detail

getExpectedClassDef

protected IClassDef getExpectedClassDef()
Description copied from class: AbstractObjectEditor
Returns the com.ibm.commons.iloader.node.IClassDef required to create a new Object.

Specified by:
getExpectedClassDef in class AbstractObjectEditor
Returns:
an instanceof IClassDef
See Also:
IClassDef

getAddText

protected java.lang.String getAddText()
Description copied from class: AbstractObjectEditor
Returns the text to appear on the 'Add' button, that is the button for creating a new 'Object'.

Specified by:
getAddText in class AbstractObjectEditor
Returns:

getDeleteText

protected java.lang.String getDeleteText()
Description copied from class: AbstractObjectEditor
Returns the text to appear on the 'Delete' button, that is the button for deleting an existing 'Object'.

Specified by:
getDeleteText in class AbstractObjectEditor
Returns:

addObject

protected void addObject(IClassDef classDef)
Description copied from class: AbstractObjectEditor
Called when the 'Add' button is pressed.

Specified by:
addObject in class AbstractObjectEditor
See Also:
IClassDef

removeObject

protected void removeObject()
Description copied from class: AbstractObjectEditor
Called when the 'Remove' (or delete) button is pressed.

Specified by:
removeObject in class AbstractObjectEditor

setCurrentValue

public void setCurrentValue(java.lang.String value)