de.cau.cs.kieler.sim.table.views
Class TableDataEditing

java.lang.Object
  extended by org.eclipse.jface.viewers.EditingSupport
      extended by de.cau.cs.kieler.sim.table.views.TableDataEditing

public class TableDataEditing
extends EditingSupport

The class TableDataEditing implements the editing support for DataTable entries of the table. Specifically it provides a check box CellEditor for the first (present) column and String CellEditors for the second (key) and the third (value) column.

It also sets a flag that the table is currently edited to prevent disturbing updates during an ongoing editing action. Therefore it needs access to the DataTableViewer.

Rating red

Constructor Summary
TableDataEditing(DataTableViewer viewerParam, int columnIndexParam)
          Instantiates a new table data editing.
 
Method Summary
protected  boolean canEdit(Object element)
           
protected  CellEditor getCellEditor(Object element)
           
protected  Object getValue(Object element)
           
protected  void setValue(Object element, Object 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
 

Constructor Detail

TableDataEditing

public TableDataEditing(DataTableViewer viewerParam,
                        int columnIndexParam)
Instantiates a new table data editing.

Parameters:
viewerParam - the viewerParam
columnIndexParam - the column index
Method Detail

canEdit

protected boolean canEdit(Object element)
Specified by:
canEdit in class EditingSupport

getCellEditor

protected CellEditor getCellEditor(Object element)
Specified by:
getCellEditor in class EditingSupport

getValue

protected Object getValue(Object element)
Specified by:
getValue in class EditingSupport

setValue

protected void setValue(Object element,
                        Object value)
Specified by:
setValue in class EditingSupport