|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.commons.swt.data.editors.api.PropertyEditor
public abstract class PropertyEditor
An abstract class that provides a framework for creating controls that act together to modify an attribute in the associated model.
| Constructor Summary | |
|---|---|
PropertyEditor()
Constructs a new instance of this class. |
|
PropertyEditor(IValidator validator)
Creates a new PropertyEditor instance with an associated IValidator which is used for validating the input of the PropertyEditor. |
|
| Method Summary | |
|---|---|
void |
addPropertyEditorUpdateListener(PropertyEditorUpdateListener listener)
Allows interested parties to register an event listener to this PropertyEditor. |
void |
addValidator(IValidator validator)
Adds a validator to the list of validators associated with this editor. |
java.lang.String |
callDialog(CompositeEditor parent,
java.lang.String value)
Open a dialog to edit this property. |
abstract org.eclipse.swt.widgets.Control |
createControl(CompositeEditor parent)
This method is called by the PropertyEditor during initialization. |
java.lang.Object |
getContextAttribute()
Returns the attribute associated with this editor. |
java.lang.Object |
getContextObject()
Returns the element in the model that this editor is associated with. |
static PropertyEditor |
getDefaultEditor(int type)
Given a predefinted integer value this utility method will return the associated predefined PropertyEditor. |
java.lang.String |
getDialogButtonAltText(CompositeEditor parent)
Return the alternate text to place on the dialog button if there is one to edit this property. |
org.eclipse.swt.graphics.Image |
getDialogButtonImage(CompositeEditor parent)
Optionally return an image to place on the dialog button if there is one to edit this property. |
java.lang.String |
getDialogButtonText(CompositeEditor parent)
Return the text to place on the dialog button if there is one to edit this property. |
static PropertyEditor |
getEditor(IMember member)
This static utility method returns a property editor for the given member variable. |
java.lang.String |
getRenderedValue(java.lang.String value)
Returns the 'UI Value' based on the value stored in the model. |
java.lang.String |
getScriptMode()
Returns the modes that can be used to edit the value of the attribute. |
IValidator |
getTextValidator()
Returns the validator associated with the editor. |
IValidator |
getValidator()
Returns the validator associated with this editor, as set using setValidator(IValidator). |
org.eclipse.ui.IWorkbenchPart |
getWorkBenchPart()
Returns the IWorkbenchPart that this editor is operating on. |
boolean |
hasDialogButton(CompositeEditor parent)
Return true if this property may be edited via a dialog button. |
abstract void |
initControlValue(CompositeEditor parent,
java.lang.String value)
Set the given value into the control created for this property editor. |
boolean |
isScriptModeFixed()
Returns whether or not multiple modes are allowed when editing scripts. |
protected void |
postModelUpdate()
Property editors are responsible for calling this method AFTER they update the model outside of using parent.updateValue |
protected void |
preModelUpdate()
Property editors are responsible for calling this method *BEFORE* they update the model outside of using parent.updateValue |
void |
removePropertyEditorUpdateListener(PropertyEditorUpdateListener listener)
Allows interested parties to remove an event listener from this PropertyEditor. |
void |
setContextAttribute(java.lang.Object attr)
Sets the attribute associated with this editor. |
void |
setContextObject(java.lang.Object element)
Sets the element in the model that this editor is associated with. |
abstract void |
setId(java.lang.String id)
Allows the implementor to associate an ID attribute with this control. |
void |
setScriptMode(java.lang.String mode)
Sets the modes that can be used to edit the value of the attribute. |
void |
setValidator(IValidator validator)
Sets the validator to use with this editor. |
void |
setWorkBenchPart(org.eclipse.ui.IWorkbenchPart wbPart)
Sets the IWorkbenchPart associated with this editor. |
abstract boolean |
stopEdit(CompositeEditor parent)
Called to tell the current editor to stop editing the associated attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyEditor()
public PropertyEditor(IValidator validator)
validator - - com.ibm.commons.iloader.node.IValidator The validator which is used to validate the PropertyEditor's input.com.ibm.commons.iloader.node.validators.IValidator}| Method Detail |
|---|
public static PropertyEditor getDefaultEditor(int type)
type - - int
PropertyEditorpublic static PropertyEditor getEditor(IMember member)
member - - com.ibm.commons.iloader.node.IMember
com.ibm.commons.swt.data.editors.api.PropertyEditorcom.ibm.commons.swt.data.editors.api.PropertyEditor#getDefaultEditor(int)},
com.ibm.commons.iloader.node.IMember}public void addValidator(IValidator validator)
validator - - com.ibm.commons.iloader.node.IValidator A validator which is used to validate the PropertyEditor's input.public IValidator getTextValidator()
IValidator
public java.lang.String callDialog(CompositeEditor parent,
java.lang.String value)
parent - - The parent composite editorvalue - - The current value being edited
public abstract org.eclipse.swt.widgets.Control createControl(CompositeEditor parent)
parent - - The parent of the control
public abstract void setId(java.lang.String id)
id - public java.lang.Object getContextAttribute()
IMemberpublic java.lang.Object getContextObject()
public java.lang.String getDialogButtonAltText(CompositeEditor parent)
parent - - the CompositeEditor that is the parent of this editor, may be null.
CompositeEditorpublic java.lang.String getDialogButtonText(CompositeEditor parent)
parent - - the CompositeEditor that is the parent of this editor, may be null.
public org.eclipse.swt.graphics.Image getDialogButtonImage(CompositeEditor parent)
parent - - the CompositeEditor that is the parent of this editor, may be null.
public java.lang.String getRenderedValue(java.lang.String value)
value - - the String value stored in the associated model.
public IValidator getValidator()
setValidator(IValidator).
public org.eclipse.ui.IWorkbenchPart getWorkBenchPart()
public boolean hasDialogButton(CompositeEditor parent)
public abstract void initControlValue(CompositeEditor parent,
java.lang.String value)
CompositeEditor - - the parent CompositeEditorString - - the value to set in the editorCompositeEditorpublic void setContextAttribute(java.lang.Object attr)
attr - IMemberpublic void setContextObject(java.lang.Object element)
element - public void setValidator(IValidator validator)
validator - public void setWorkBenchPart(org.eclipse.ui.IWorkbenchPart wbPart)
wbPart - public abstract boolean stopEdit(CompositeEditor parent)
parent - - CompositeEditor
public boolean isScriptModeFixed()
public void setScriptMode(java.lang.String mode)
mode - public java.lang.String getScriptMode()
public void addPropertyEditorUpdateListener(PropertyEditorUpdateListener listener)
listener - - com.ibm.commons.swt.data.editors.PropertyEditorUpdateListenercom.ibm.commons.swt.data.editors.support.PropertyEditorUpdateListener}public void removePropertyEditorUpdateListener(PropertyEditorUpdateListener listener)
listener - - com.ibm.commons.swt.data.editors.PropertyEditorUpdateListenercom.ibm.commons.swt.data.editors.support.PropertyEditorUpdateListener}protected void preModelUpdate()
protected void postModelUpdate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||