T
- the attribute value type/bindingpublic abstract class EditorChooserEditor<T> extends AbstractEditor<T> implements org.eclipse.jface.util.IPropertyChangeListener
Constructor and Description |
---|
EditorChooserEditor(org.eclipse.swt.widgets.Composite parent,
Class<? extends T> binding)
Constructs the editor chooser.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Editor<T> |
createDefaultEditor(org.eclipse.swt.widgets.Composite parent)
Create the default editor for this chooser.
|
String |
getAsText()
Get the editor value as text
|
org.eclipse.swt.widgets.Control |
getControl()
Get the editor control
|
String |
getUsedScriptId()
Returns the used script id which depends on the used editor.
|
T |
getValue()
Get the editor value
|
String |
getValueType()
Returns the type of the value edited in this editor.
|
boolean |
isValid()
Determines if the user has entered a valid value
|
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) |
void |
selectDefaultEditor()
Preselects the default editor.
|
void |
selectEditor(String scriptId)
Select the specified editor if available.
|
void |
setAsText(String text)
Set the editor value as text
|
void |
setValue(T value)
Set the editor value
|
void |
setVariables(Collection<PropertyEntityDefinition> properties)
Sets available variables.
|
fireStateChanged, fireValueChanged, setPropertyChangeListener
public void selectDefaultEditor()
protected abstract Editor<T> createDefaultEditor(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositepublic org.eclipse.swt.widgets.Control getControl()
Editor
getControl
in interface Editor<T>
Editor.getControl()
public void setValue(T value)
Editor
setValue
in interface Editor<T>
value
- the valueEditor.setValue(java.lang.Object)
public T getValue()
Editor
getValue
in interface Editor<T>
Editor.getValue()
public void setAsText(String text)
Editor
setAsText
in interface Editor<T>
text
- the value to set as textEditor.setAsText(java.lang.String)
public String getAsText()
Editor
getAsText
in interface Editor<T>
Editor.getAsText()
public boolean isValid()
Editor
isValid
in interface Editor<T>
Editor.isValid()
public String getUsedScriptId()
public void selectEditor(String scriptId)
scriptId
- the script id for which to select an editor or
ParameterValue.DEFAULT_TYPE
public void setVariables(Collection<PropertyEntityDefinition> properties)
Editor
setVariables
in interface Editor<T>
setVariables
in class AbstractEditor<T>
properties
- the property variablesAbstractEditor.setVariables(java.util.Collection)
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
IPropertyChangeListener.propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
public String getValueType()
Editor
getValueType
in interface Editor<T>
Editor.getValueType()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a