Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.emf.ecp.edit.spi.swt.table
Class StringCellEditor

    java.lang.Object
      org.eclipse.jface.viewers.CellEditor
          org.eclipse.jface.viewers.TextCellEditor
              org.eclipse.emf.ecp.edit.spi.swt.table.StringCellEditor

All Implemented Interfaces:
  ECPCellEditor

    public class StringCellEditor

extends org.eclipse.jface.viewers.TextCellEditor
implements ECPCellEditor

A String cell editor which displays strings.

Since:
  1.5
Author:
  Eugen Neufeld

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor
`org.eclipse.jface.viewers.CellEditor.LayoutData`

Field Summary

Fields inherited from class org.eclipse.jface.viewers.CellEditor
`COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO`

Fields inherited from interface org.eclipse.emf.ecp.edit.spi.swt.table.ECPCellEditor
`CUSTOM_VARIANT`

Constructor Summary
`StringCellEditor()` Default constructor.
`StringCellEditor(org.eclipse.swt.widgets.Composite parent)` A constructor which takes only a parent.
`StringCellEditor(org.eclipse.swt.widgets.Composite parent, int style)` A constructor which takes the parent and the style.

Method Summary
`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.
`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.
`void` | `setEditable(boolean editable)` Sets editable state of the cell editor.

Methods inherited from class org.eclipse.jface.viewers.TextCellEditor
`getLayoutData, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, performCopy, performCut, performDelete, performPaste, performSelectAll`

Methods inherited from class org.eclipse.jface.viewers.CellEditor
`activate, activate, addListener, addPropertyChangeListener, create, deactivate, dispose, getControl, getErrorMessage, getStyle, getValidator, getValue, isActivated, isDirty, isFindEnabled, isRedoEnabled, isUndoEnabled, isValueValid, performFind, performRedo, performUndo, removeListener, removePropertyChangeListener, setFocus, setStyle, setValidator, setValue`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.emf.ecp.edit.spi.swt.table.ECPCellEditor
`getStyle`

Constructor Detail

### StringCellEditor

    public StringCellEditor()

  Default constructor.

### StringCellEditor

    public StringCellEditor(org.eclipse.swt.widgets.Composite parent)

  A constructor which takes only a parent.

  Parameters:
    `parent` - the `Composite` to use as a parent.

### StringCellEditor

    public StringCellEditor(org.eclipse.swt.widgets.Composite parent,
                            int style)

  A constructor which takes the parent and the style.

  Parameters:
    `parent` - the `Composite` to use as a parent
    `style` - the Style to set

Method Detail

### getValueProperty

    public 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`.

  Specified by:
    `getValueProperty` in interface `ECPCellEditor`
  Returns:
    the `IValueProperty` for this cell editor
  See Also:
    `ECPCellEditor.getValueProperty()`

### instantiate

    public void instantiate(org.eclipse.emf.ecore.EStructuralFeature feature,
                            ViewModelContext viewModelContext)

  Instantiates this cell editor. This allows the cell editor to use `ViewModelServices`.

  Specified by:
    `instantiate` in interface `ECPCellEditor`
  Parameters:
    `feature` - the `EStructuralFeature` displayed in this cell editor
    `viewModelContext` - the `ViewModelContext` used for the current view
  See Also:
    `ECPCellEditor.instantiate(org.eclipse.emf.ecore.EStructuralFeature, org.eclipse.emf.ecp.view.spi.context.ViewModelContext)`

### getFormatedString

    public String getFormatedString(Object value)

  This returns the String which will be shown in the table when no cell editor is open.

  Specified by:
    `getFormatedString` in interface `ECPCellEditor`
  Parameters:
    `value` - the Object to get the formated String for
  Returns:
    the formated String
  See Also:
    `ECPCellEditor.getFormatedString(java.lang.Object)`

### getColumnWidthWeight

    public int getColumnWidthWeight()

  The returned value is used for layouting the table columns. The value is a relative column weight. A column containing text has a weight of 100. Please consider this when defining you weight. E.g if you return 200 your column will be twice the width of a text column.

  Specified by:
    `getColumnWidthWeight` in interface `ECPCellEditor`
  Returns:
    the relative column width
  See Also:
    `ECPCellEditor.getColumnWidthWeight()`

### getTargetToModelStrategy

    public 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.

  Specified by:
    `getTargetToModelStrategy` in interface `ECPCellEditor`
  Parameters:
    `databindingContext` - The `DataBindingContext` used by this strategy
  Returns:
    the strategy
  Since:
    1.6
  See Also:
    `ECPCellEditor.getTargetToModelStrategy(org.eclipse.core.databinding.DataBindingContext)`

### getModelToTargetStrategy

    public 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.

  Specified by:
    `getModelToTargetStrategy` in interface `ECPCellEditor`
  Parameters:
    `databindingContext` - The `DataBindingContext` used by this strategy
  Returns:
    the strategy
  Since:
    1.6
  See Also:
    `ECPCellEditor.getModelToTargetStrategy(org.eclipse.core.databinding.DataBindingContext)`

### setEditable

    public void setEditable(boolean editable)

  Sets editable state of the cell editor.

  Specified by:
    `setEditable` in interface `ECPCellEditor`
  Parameters:
    `editable` - `true` if editable, `false` otherwise
  See Also:
    `ECPCellEditor.setEditable(boolean)`

### getImage

    public 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.

  Specified by:
    `getImage` in interface `ECPCellEditor`
  Parameters:
    `value` - the Object to get the Image for
  Returns:
    the image
  See Also:
    `ECPCellEditor.getImage(java.lang.Object)`

### getMinWidth

    public int getMinWidth()

  Returns the minimum width of the cell editor.

  Specified by:
    `getMinWidth` in interface `ECPCellEditor`
  Returns:
    the minimum width
  Since:
    1.6
  See Also:
    `ECPCellEditor.getMinWidth()`

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015. All Rights Reserved.