org.eclipse.emf.ecp.edit.internal.swt.util
Interface ECPCellEditor

All Known Implementing Classes:
DateCellEditor, LinkCellEditor, NumberCellEditor, StringCellEditor, XmlDateCellEditor

public interface ECPCellEditor

A common super interface for all CellEditors contributed to ECP.

Author:
Eugen Neufeld

Field Summary
static String CUSTOM_VARIANT
          RAP theming variable.
 
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.core.databinding.UpdateValueStrategy getModelToTargetStrategy()
           
 int getStyle()
           
 org.eclipse.core.databinding.UpdateValueStrategy getTargetToModelStrategy()
           
 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)
           
 

Field Detail

CUSTOM_VARIANT

static final String CUSTOM_VARIANT
RAP theming variable.

See Also:
Constant Field Values
Method Detail

getValueProperty

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.

Returns:
the IValueProperty for this cell editor

instantiate

void instantiate(org.eclipse.emf.ecore.EStructuralFeature feature,
                 ViewModelContext viewModelContext)
Instantiates this cell editor. This allows the cell editor to use ViewModelServices.

Parameters:
feature - the EStructuralFeature displayed in this cell editor
viewModelContext - the ViewModelContext used for the current view

getStyle

int getStyle()

getFormatedString

String getFormatedString(Object value)
This returns the String which will be shown in the table when no cell editor is open.

Parameters:
value - the Object to get the formated String for
Returns:
the formated String

getColumnWidthWeight

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.

Returns:
the relative column width

getTargetToModelStrategy

org.eclipse.core.databinding.UpdateValueStrategy getTargetToModelStrategy()

getModelToTargetStrategy

org.eclipse.core.databinding.UpdateValueStrategy getModelToTargetStrategy()

setEditable

void setEditable(boolean editable)


Copyright © 2014. All Rights Reserved.