Class TextGUICellEditor
- java.lang.Object
-
- org.eclipse.jface.viewers.CellEditor
-
- org.eclipse.jface.viewers.TextCellEditor
-
- net.ssehub.easy.producer.ui.confModel.TextGUICellEditor
-
- All Implemented Interfaces:
IRefreshableEditor,IUpdateProvider
public class TextGUICellEditor extends org.eclipse.jface.viewers.TextCellEditor implements IUpdateProvider
Implements an updating text cell editor.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classTextGUICellEditor.AbstractStringValueConverter<T>Implements an abstract string value converter for turning an object into an UI string.private static classTextGUICellEditor.DoubleValueConverterImplements a simple double converter (currently ignoring input failures).private static classTextGUICellEditor.FloatValueConverterImplements a simple float converter (currently ignoring input failures).private static classTextGUICellEditor.IntegerValueConverterImplements a simple integer converter (currently ignoring input failures).private static interfaceTextGUICellEditor.ValueConverter<T>Allows to perform specific value conversions to/from strings behind UI elements.
-
Field Summary
Fields Modifier and Type Field Description private TextGUICellEditor.ValueConverter<?>converterprivate static java.util.Map<java.lang.Class<?>,TextGUICellEditor.ValueConverter<?>>CONVERTERSStores all value converters.private IUpdateListenerlistenerprivate BasisGUIVariablevariable
-
Constructor Summary
Constructors Constructor Description TextGUICellEditor(org.eclipse.swt.widgets.Composite parent, BasisGUIVariable variable)Creates a new text string cell editor parented under the given control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()protected java.lang.ObjectdoGetValue()TheTextCellEditorimplementation of thisCellEditorframework method returns the text string.protected voiddoSetValue(java.lang.Object value)IDecisionVariablegetVariable()Returns the underlying decision variable.voidrefresh()Refreshes the contents of the editor.voidsetUpdateListener(IUpdateListener listener)Defines the update listener.-
Methods inherited from class org.eclipse.jface.viewers.TextCellEditor
createControl, dependsOnExternalFocusListener, doSetFocus, editOccured, getLayoutData, handleDefaultSelection, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, keyReleaseOccured, performCopy, performCut, performDelete, performPaste, performSelectAll
-
Methods inherited from class org.eclipse.jface.viewers.CellEditor
activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCorrect, isDirty, isFindEnabled, isRedoEnabled, isUndoEnabled, isValueValid, markDirty, performFind, performRedo, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
-
-
-
-
Field Detail
-
CONVERTERS
private static final java.util.Map<java.lang.Class<?>,TextGUICellEditor.ValueConverter<?>> CONVERTERS
Stores all value converters. Value converters aim at returning the same value type as it has been set on this UI object. Actually, it might be better to equip EASy with specific editors or, in case of tabbed values, on the internal editors rather than the EASy editors.
-
variable
private BasisGUIVariable variable
-
listener
private IUpdateListener listener
-
converter
private TextGUICellEditor.ValueConverter<?> converter
-
-
Constructor Detail
-
TextGUICellEditor
public TextGUICellEditor(org.eclipse.swt.widgets.Composite parent, BasisGUIVariable variable)Creates a new text string cell editor parented under the given control.- Parameters:
parent- the parent controlvariable- the variable this editor was created for
-
-
Method Detail
-
refresh
public void refresh()
Description copied from interface:IRefreshableEditorRefreshes the contents of the editor.- Specified by:
refreshin interfaceIRefreshableEditor- Specified by:
refreshin interfaceIUpdateProvider
-
setUpdateListener
public void setUpdateListener(IUpdateListener listener)
Description copied from interface:IUpdateProviderDefines the update listener. The update listener will be disposed automatically .- Specified by:
setUpdateListenerin interfaceIUpdateProvider- Parameters:
listener- the update listener
-
getVariable
public IDecisionVariable getVariable()
Description copied from interface:IUpdateProviderReturns the underlying decision variable.- Specified by:
getVariablein interfaceIUpdateProvider- Returns:
- the decision variable
-
doSetValue
protected void doSetValue(java.lang.Object value)
- Overrides:
doSetValuein classorg.eclipse.jface.viewers.TextCellEditor
-
doGetValue
protected java.lang.Object doGetValue()
TheTextCellEditorimplementation of thisCellEditorframework method returns the text string.- Overrides:
doGetValuein classorg.eclipse.jface.viewers.TextCellEditor- Returns:
- the text string
-
dispose
public void dispose()
- Overrides:
disposein classorg.eclipse.jface.viewers.CellEditor
-
-