Class MultiReferenceCellEditor

    • Nested Class Summary

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

        org.eclipse.jface.viewers.CellEditor.LayoutData
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiReferenceCellEditor​(org.eclipse.swt.widgets.Composite parent)
      Default constructor.
      MultiReferenceCellEditor​(org.eclipse.swt.widgets.Composite parent, int style)
      Constructor allowing to specify a SWT style.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.swt.widgets.Control createControl​(org.eclipse.swt.widgets.Composite parent)  
      void dispose()  
      protected java.lang.Object doGetValue()  
      protected void doSetFocus()  
      protected void doSetValue​(java.lang.Object value)  
      int getColumnWidthWeight()
      The returned value is used for layouting the table columns.
      java.lang.String getFormatedString​(java.lang.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​(java.lang.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.
      void setTableFeature​(org.eclipse.emf.ecore.EReference tableRefrence)
      Sets the EReference of the table this cell editor is created for.
      void setTableViewer​(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
      Sets the table viewer this cell editor is created for.
      • Methods inherited from class org.eclipse.jface.viewers.CellEditor

        activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiReferenceCellEditor

        public MultiReferenceCellEditor​(org.eclipse.swt.widgets.Composite parent)
        Default constructor.
        Parameters:
        parent - the parent
      • MultiReferenceCellEditor

        public MultiReferenceCellEditor​(org.eclipse.swt.widgets.Composite parent,
                                        int style)
        Constructor allowing to specify a SWT style.
        Parameters:
        parent - the parent
        style - the SWT style
    • Method Detail

      • getValueProperty

        public org.eclipse.core.databinding.property.value.IValueProperty getValueProperty()
        Description copied from interface: ECPCellEditor
        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
      • instantiate

        public void instantiate​(org.eclipse.emf.ecore.EStructuralFeature feature,
                                ViewModelContext viewModelContext)
        Description copied from interface: ECPCellEditor
        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
      • getFormatedString

        public java.lang.String getFormatedString​(java.lang.Object value)
        Description copied from interface: ECPCellEditor
        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
      • getImage

        public org.eclipse.swt.graphics.Image getImage​(java.lang.Object value)
        Description copied from interface: ECPCellEditor
        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
      • getColumnWidthWeight

        public int getColumnWidthWeight()
        Description copied from interface: ECPCellEditor
        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
      • getTargetToModelStrategy

        public org.eclipse.core.databinding.UpdateValueStrategy getTargetToModelStrategy​(org.eclipse.core.databinding.DataBindingContext databindingContext)
        Description copied from interface: ECPCellEditor
        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
      • getModelToTargetStrategy

        public org.eclipse.core.databinding.UpdateValueStrategy getModelToTargetStrategy​(org.eclipse.core.databinding.DataBindingContext databindingContext)
        Description copied from interface: ECPCellEditor
        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
      • setEditable

        public void setEditable​(boolean editable)
        Description copied from interface: ECPCellEditor
        Sets editable state of the cell editor.
        Specified by:
        setEditable in interface ECPCellEditor
        Parameters:
        editable - true if editable, false otherwise
      • getMinWidth

        public int getMinWidth()
        Description copied from interface: ECPCellEditor
        Returns the minimum width of the cell editor.
        Specified by:
        getMinWidth in interface ECPCellEditor
        Returns:
        the minimum width
      • createControl

        protected org.eclipse.swt.widgets.Control createControl​(org.eclipse.swt.widgets.Composite parent)
        Specified by:
        createControl in class org.eclipse.jface.viewers.CellEditor
      • doGetValue

        protected java.lang.Object doGetValue()
        Specified by:
        doGetValue in class org.eclipse.jface.viewers.CellEditor
      • doSetFocus

        protected void doSetFocus()
        Specified by:
        doSetFocus in class org.eclipse.jface.viewers.CellEditor
      • doSetValue

        protected void doSetValue​(java.lang.Object value)
        Specified by:
        doSetValue in class org.eclipse.jface.viewers.CellEditor
      • dispose

        public void dispose()
        Overrides:
        dispose in class org.eclipse.jface.viewers.CellEditor
      • setTableViewer

        public void setTableViewer​(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
        Description copied from interface: ECPViewerAwareCellEditor
        Sets the table viewer this cell editor is created for.
        Specified by:
        setTableViewer in interface ECPViewerAwareCellEditor
        Parameters:
        tableViewer - The TableViewer this cell editor belongs to
      • setTableFeature

        public void setTableFeature​(org.eclipse.emf.ecore.EReference tableRefrence)
        Description copied from interface: ECPViewerAwareCellEditor
        Sets the EReference of the table this cell editor is created for.
        Specified by:
        setTableFeature in interface ECPViewerAwareCellEditor
        Parameters:
        tableRefrence - The EReference this cell editor is used for