public class BooleanCellEditor extends org.eclipse.jface.viewers.CellEditor implements ECPCellEditor, ECPCustomUpdateCellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
COPY_STRING_ALTERNATIVE, CUSTOM_VARIANT
Constructor and Description |
---|
BooleanCellEditor(org.eclipse.swt.widgets.Composite parent)
A constructor which takes only a parent.
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
activate(org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent activationEvent) |
protected org.eclipse.swt.widgets.Control |
createControl(org.eclipse.swt.widgets.Composite parent) |
protected Object |
doGetValue() |
protected void |
doSetFocus() |
protected void |
doSetValue(Object value) |
int |
getColumnWidthWeight()
The returned value is used for layouting the table columns.
|
protected Map<Integer,String> |
getCopyMap(org.eclipse.swt.widgets.Widget widget)
Get the copy map of the given
widget . |
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. |
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.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 feature,
ViewModelContext viewModelContext)
Instantiates this cell editor.
|
protected void |
setCopyTextMarker(org.eclipse.jface.viewers.ViewerCell cell,
Object value)
Sets the copy text marker for the given
cell and value . |
void |
setEditable(boolean editable)
Sets editable state of the cell editor.
|
void |
updateCell(org.eclipse.jface.viewers.ViewerCell cell,
Object value)
Update the label and image for the given cell.
|
addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getLayoutData, getStyle, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStyle
public BooleanCellEditor(org.eclipse.swt.widgets.Composite parent)
parent
- the Composite
to use as a parent.public org.eclipse.core.databinding.property.value.IValueProperty getValueProperty()
IValueProperty
for this cell editor which is used by the table to create an
IObservableValue
.getValueProperty
in interface ECPCellEditor
IValueProperty
for this cell editorECPCellEditor.getValueProperty()
public void instantiate(org.eclipse.emf.ecore.EStructuralFeature feature, ViewModelContext viewModelContext)
ViewModelServices
.instantiate
in interface ECPCellEditor
feature
- the EStructuralFeature
displayed in this cell editorviewModelContext
- the ViewModelContext
used for the current viewECPCellEditor.instantiate(org.eclipse.emf.ecore.EStructuralFeature,
org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
public String getFormatedString(Object value)
getFormatedString
in interface ECPCellEditor
value
- the Object to get the formated String forECPCellEditor.getFormatedString(java.lang.Object)
public int getColumnWidthWeight()
getColumnWidthWeight
in interface ECPCellEditor
ECPCellEditor.getColumnWidthWeight()
public org.eclipse.core.databinding.UpdateValueStrategy getTargetToModelStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
UpdateValueStrategy
will be used as the target to model strategy during data binding.getTargetToModelStrategy
in interface ECPCellEditor
databindingContext
- The DataBindingContext
used by this strategyECPCellEditor.getTargetToModelStrategy(org.eclipse.core.databinding.DataBindingContext)
public org.eclipse.core.databinding.UpdateValueStrategy getModelToTargetStrategy(org.eclipse.core.databinding.DataBindingContext databindingContext)
UpdateValueStrategy
will be used as the model to target strategy during data binding.getModelToTargetStrategy
in interface ECPCellEditor
databindingContext
- The DataBindingContext
used by this strategyECPCellEditor.getModelToTargetStrategy(org.eclipse.core.databinding.DataBindingContext)
public void setEditable(boolean editable)
setEditable
in interface ECPCellEditor
editable
- true
if editable, false
otherwiseECPCellEditor.setEditable(boolean)
public org.eclipse.swt.graphics.Image getImage(Object value)
getImage
in interface ECPCellEditor
value
- the Object to get the Image forECPCellEditor.getImage(java.lang.Object)
public void activate()
activate
in class org.eclipse.jface.viewers.CellEditor
CheckboxCellEditor.activate()
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in class org.eclipse.jface.viewers.CellEditor
CellEditor.createControl(org.eclipse.swt.widgets.Composite)
protected Object doGetValue()
doGetValue
in class org.eclipse.jface.viewers.CellEditor
CellEditor.doGetValue()
protected void doSetFocus()
doSetFocus
in class org.eclipse.jface.viewers.CellEditor
CellEditor.doSetFocus()
protected void doSetValue(Object value)
doSetValue
in class org.eclipse.jface.viewers.CellEditor
CellEditor.doSetValue(java.lang.Object)
public void activate(org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent activationEvent)
activate
in class org.eclipse.jface.viewers.CellEditor
public void updateCell(org.eclipse.jface.viewers.ViewerCell cell, Object value)
updateCell
in interface ECPCustomUpdateCellEditor
cell
- the ViewerCell
value
- the new value of the cellECPCustomUpdateCellEditor.updateCell(org.eclipse.jface.viewers.ViewerCell,
java.lang.Object)
protected void setCopyTextMarker(org.eclipse.jface.viewers.ViewerCell cell, Object value)
cell
and value
.cell
- the ViewerCell
.value
- the Object
value.protected Map<Integer,String> getCopyMap(org.eclipse.swt.widgets.Widget widget)
widget
. If it does not exist it will be created.widget
- the Widget
to check.public int getMinWidth()
getMinWidth
in interface ECPCellEditor
ECPCellEditor.getMinWidth()
Copyright © 2019. All rights reserved.