Class ConfigurationCellEditor


  • public class ConfigurationCellEditor
    extends org.eclipse.jface.viewers.EditingSupport
    The Cell Editor for the Decision Editor Table.
    Author:
    El-Sharkawy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ColumnType columnType  
      private org.eclipse.jface.viewers.TreeViewer viewer  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigurationCellEditor​(org.eclipse.jface.viewers.TreeViewer viewer, ColumnType columnType)
      Constructs a CellEditor with a given viewer for the given column.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canEdit​(java.lang.Object element)
      Returns if the column can be edited.
      protected org.eclipse.jface.viewers.CellEditor getCellEditor​(java.lang.Object element)
      Returns the CellEditor for the given element.
      protected java.lang.Object getValue​(java.lang.Object element)
      Returns the value in a column for a given element.
      protected void setValue​(java.lang.Object element, java.lang.Object value)
      Sets the value for the given element with a given value.
      • Methods inherited from class org.eclipse.jface.viewers.EditingSupport

        getViewer, initializeCellEditorValue, saveCellEditorValue
      • Methods inherited from class java.lang.Object

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

      • viewer

        private org.eclipse.jface.viewers.TreeViewer viewer
    • Constructor Detail

      • ConfigurationCellEditor

        public ConfigurationCellEditor​(org.eclipse.jface.viewers.TreeViewer viewer,
                                       ColumnType columnType)
        Constructs a CellEditor with a given viewer for the given column.
        Parameters:
        viewer - for the table
        columnType - Parameter for the Cell editor.
    • Method Detail

      • canEdit

        protected boolean canEdit​(java.lang.Object element)
        Returns if the column can be edited.
        Specified by:
        canEdit in class org.eclipse.jface.viewers.EditingSupport
        Parameters:
        element - The GUIVariable which is assigned to the current row
        Returns:
        true if editable
      • getCellEditor

        protected org.eclipse.jface.viewers.CellEditor getCellEditor​(java.lang.Object element)
        Returns the CellEditor for the given element. Eclipse creates a new CellEditor on demand, i.e. if the user enters a specific cell.
        Specified by:
        getCellEditor in class org.eclipse.jface.viewers.EditingSupport
        Parameters:
        element - The GUIVariable which is assigned to the current row
        Returns:
        the CellEditor for the element
      • getValue

        protected java.lang.Object getValue​(java.lang.Object element)
        Returns the value in a column for a given element.
        Specified by:
        getValue in class org.eclipse.jface.viewers.EditingSupport
        Parameters:
        element - The object which is assigned to the current row
        Returns:
        the value for the element
      • setValue

        protected void setValue​(java.lang.Object element,
                                java.lang.Object value)
        Sets the value for the given element with a given value.
        Specified by:
        setValue in class org.eclipse.jface.viewers.EditingSupport
        Parameters:
        element - the element where the value changed
        value - the new value for the element