public class MultiStringCellEditor extends StringBasedCellEditor
Modifier and Type | Class and Description |
---|---|
protected class |
MultiStringCellEditor.TargetToModelStrategy |
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
COPY_STRING_ALTERNATIVE, CUSTOM_VARIANT
Constructor and Description |
---|
MultiStringCellEditor(org.eclipse.swt.widgets.Composite parent)
The constructor which only takes a parent composite.
|
MultiStringCellEditor(org.eclipse.swt.widgets.Composite parent,
int style)
A constructor which takes a parent and the style to use, the style is ignored by this cell editor.
|
Modifier and Type | Method and Description |
---|---|
protected List<String> |
convertStringToList(String value)
Convertes a String into a list of Strings using the separator.
|
int |
getColumnWidthWeight()
The returned value is used for layouting the table columns.
|
String |
getFormatedString(Object value)
This returns the String which will be shown in the table when no cell editor is open.
|
org.eclipse.swt.graphics.Image |
getImage(Object value)
This returns the Image which will be shown in the table when no cell editor is open.
|
int |
getMinWidth()
Returns the minimum width of the cell editor.
|
org.eclipse.core.databinding.UpdateValueStrategy |
getModelToTargetStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
This
UpdateValueStrategy will be used as the model to target strategy during data binding. |
protected String |
getSeparator()
Returns the separator used to split the input string into entries of the String list.
|
org.eclipse.core.databinding.UpdateValueStrategy |
getTargetToModelStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
This
UpdateValueStrategy will be used as the target to model strategy during data binding. |
protected org.eclipse.swt.widgets.Text |
getText()
returns the
Text of the cell editor. |
org.eclipse.core.databinding.property.value.IValueProperty |
getValueProperty()
Returns the
IValueProperty for this cell editor which is used by the table to create an
IObservableValue . |
void |
instantiate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
ViewModelContext viewModelContext)
Instantiates this cell editor.
|
void |
setEditable(boolean editable)
Sets editable state of the cell editor.
|
activate, doSetFocus, fireCancelEditor, isPrintable, withPreSetValidation
createControl, dependsOnExternalFocusListener, doGetValue, doSetValue, editOccured, getLayoutData, handleDefaultSelection, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, keyReleaseOccured, performCopy, performCut, performDelete, performPaste, performSelectAll
activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dispose, fireApplyEditorValue, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStyle
public MultiStringCellEditor(org.eclipse.swt.widgets.Composite parent)
parent
- the Composite
to use as a parent.public MultiStringCellEditor(org.eclipse.swt.widgets.Composite parent, int style)
parent
- the Composite
to use as a parentstyle
- the SWT style to setprotected List<String> convertStringToList(String value)
value
- the String to splitprotected String getSeparator()
public org.eclipse.core.databinding.property.value.IValueProperty getValueProperty()
ECPCellEditor
IValueProperty
for this cell editor which is used by the table to create an
IObservableValue
.IValueProperty
for this cell editorpublic void instantiate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, ViewModelContext viewModelContext)
ECPCellEditor
ViewModelServices
.instantiate
in interface ECPCellEditor
instantiate
in class StringBasedCellEditor
eStructuralFeature
- the EStructuralFeature
displayed in this cell editorviewModelContext
- the ViewModelContext
used for the current viewpublic String getFormatedString(Object value)
ECPCellEditor
value
- the Object to get the formated String forpublic int getColumnWidthWeight()
ECPCellEditor
public org.eclipse.core.databinding.UpdateValueStrategy getTargetToModelStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
ECPCellEditor
UpdateValueStrategy
will be used as the target to model strategy during data binding.databindingContext
- The DataBindingContext
used by this strategypublic org.eclipse.core.databinding.UpdateValueStrategy getModelToTargetStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
ECPCellEditor
UpdateValueStrategy
will be used as the model to target strategy during data binding.databindingContext
- The DataBindingContext
used by this strategyprotected org.eclipse.swt.widgets.Text getText()
Text
of the cell editor.Text
public void setEditable(boolean editable)
ECPCellEditor
editable
- true
if editable, false
otherwisepublic org.eclipse.swt.graphics.Image getImage(Object value)
ECPCellEditor
value
- the Object to get the Image forpublic int getMinWidth()
ECPCellEditor
Copyright © 2020. All rights reserved.