Class ConfigurationCellEditor
- java.lang.Object
-
- org.eclipse.jface.viewers.EditingSupport
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.ConfigurationCellEditor
-
public class ConfigurationCellEditor extends org.eclipse.jface.viewers.EditingSupportThe Cell Editor for the Decision Editor Table.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private ColumnTypecolumnTypeprivate org.eclipse.jface.viewers.TreeViewerviewer
-
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 booleancanEdit(java.lang.Object element)Returns if the column can be edited.protected org.eclipse.jface.viewers.CellEditorgetCellEditor(java.lang.Object element)Returns the CellEditor for the given element.protected java.lang.ObjectgetValue(java.lang.Object element)Returns the value in a column for a given element.protected voidsetValue(java.lang.Object element, java.lang.Object value)Sets the value for the given element with a given value.
-
-
-
Field Detail
-
columnType
private ColumnType columnType
-
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 tablecolumnType- Parameter for the Cell editor.
-
-
Method Detail
-
canEdit
protected boolean canEdit(java.lang.Object element)
Returns if the column can be edited.- Specified by:
canEditin classorg.eclipse.jface.viewers.EditingSupport- Parameters:
element- TheGUIVariablewhich 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:
getCellEditorin classorg.eclipse.jface.viewers.EditingSupport- Parameters:
element- TheGUIVariablewhich 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:
getValuein classorg.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:
setValuein classorg.eclipse.jface.viewers.EditingSupport- Parameters:
element- the element where the value changedvalue- the new value for the element
-
-