public class SingleReferenceCellEditor extends org.eclipse.jface.viewers.CellEditor implements ECPCellEditor, ECPElementAwareCellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
COPY_STRING_ALTERNATIVE, CUSTOM_VARIANT
Constructor and Description |
---|
SingleReferenceCellEditor(org.eclipse.swt.widgets.Composite parent)
The constructor.
|
SingleReferenceCellEditor(org.eclipse.swt.widgets.Composite parent,
int style)
Alternate constructor with SWT style bits.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Control |
createControl(org.eclipse.swt.widgets.Composite parent) |
void |
dispose() |
protected Object |
doGetValue() |
protected void |
doSetFocus() |
protected void |
doSetValue(Object value) |
int |
getColumnWidthWeight()
The returned value is used for layouting the table columns.
|
protected org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain(org.eclipse.emf.ecore.EObject domainModel)
Get the
EditingDomain for the given EObject . |
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. |
int |
getStyle()
The SWT style bits.
|
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. |
org.eclipse.core.databinding.property.value.SimpleValueProperty |
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 feature,
ViewModelContext viewModelContext)
Instantiates this cell editor.
|
void |
setEditable(boolean editable)
Sets editable state of the cell editor.
|
void |
updateRowElement(Object element)
Called to notify that a new element will be edited.
|
activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getLayoutData, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, keyReleaseOccured, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
public SingleReferenceCellEditor(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositepublic SingleReferenceCellEditor(org.eclipse.swt.widgets.Composite parent, int style)
parent
- the parent compositestyle
- SWT style bitspublic org.eclipse.core.databinding.property.value.SimpleValueProperty getValueProperty()
ECPCellEditor
IValueProperty
for this cell editor which is used by the table to create an
IObservableValue
.getValueProperty
in interface ECPCellEditor
IValueProperty
for this cell editorpublic void instantiate(org.eclipse.emf.ecore.EStructuralFeature feature, ViewModelContext viewModelContext)
ECPCellEditor
ViewModelServices
.instantiate
in interface ECPCellEditor
feature
- the EStructuralFeature
displayed in this cell editorviewModelContext
- the ViewModelContext
used for the current viewpublic int getStyle()
ECPCellEditor
getStyle
in interface ECPCellEditor
getStyle
in class org.eclipse.jface.viewers.CellEditor
public String getFormatedString(Object value)
ECPCellEditor
getFormatedString
in interface ECPCellEditor
value
- the Object to get the formated String forpublic org.eclipse.swt.graphics.Image getImage(Object value)
ECPCellEditor
getImage
in interface ECPCellEditor
value
- the Object to get the Image forpublic int getColumnWidthWeight()
ECPCellEditor
getColumnWidthWeight
in interface 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.getTargetToModelStrategy
in interface ECPCellEditor
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.getModelToTargetStrategy
in interface ECPCellEditor
databindingContext
- The DataBindingContext
used by this strategypublic void setEditable(boolean editable)
ECPCellEditor
setEditable
in interface ECPCellEditor
editable
- true
if editable, false
otherwisepublic int getMinWidth()
ECPCellEditor
getMinWidth
in interface ECPCellEditor
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in class org.eclipse.jface.viewers.CellEditor
public void dispose()
dispose
in class org.eclipse.jface.viewers.CellEditor
protected final org.eclipse.emf.edit.domain.EditingDomain getEditingDomain(org.eclipse.emf.ecore.EObject domainModel)
EditingDomain
for the given EObject
.domainModel
- the eObjectEditingDomain
protected Object doGetValue()
doGetValue
in class org.eclipse.jface.viewers.CellEditor
protected void doSetFocus()
doSetFocus
in class org.eclipse.jface.viewers.CellEditor
protected void doSetValue(Object value)
doSetValue
in class org.eclipse.jface.viewers.CellEditor
public void updateRowElement(Object element)
ECPElementAwareCellEditor
updateRowElement
in interface ECPElementAwareCellEditor
element
- the row elementCopyright © 2019. All rights reserved.