Class ContainerGUIVariable
- java.lang.Object
-
- net.ssehub.easy.producer.ui.confModel.GUIVariable
-
- net.ssehub.easy.producer.ui.confModel.AbstractExpandableGUIVariable
-
- net.ssehub.easy.producer.ui.confModel.ContainerGUIVariable
-
- All Implemented Interfaces:
java.lang.Comparable<GUIVariable>,IGUIConfigurableElement
class ContainerGUIVariable extends AbstractExpandableGUIVariable
GUI representation of container values.- Author:
- El-Sharkawy, Dennis Konoppa
-
-
Constructor Summary
Constructors Constructor Description ContainerGUIVariable(IDecisionVariable variable, org.eclipse.swt.widgets.Composite parent, GUIConfiguration config, GUIVariable varParent)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GUIEditorgetEditor()Returns the (non-cell) editor for this variable.java.lang.ObjectgetValue()Returns the value of the givenIDecisionVariableso that it can be used as return value for theEditingSupport.getValue(Object)method.java.lang.StringgetValueText()Returns a string representation of the current value.booleanisExtendable()Returns whether is variable can be extended (insert new empty values).voidremove(GUIVariable nestedVariable)Deletes a nestedGUIVariablefrom this variable.voidsetValue(java.lang.Object value)Sets the value of the wrappedIDecisionVariable.-
Methods inherited from class net.ssehub.easy.producer.ui.confModel.AbstractExpandableGUIVariable
createNestedVariables, extend, getCellEditor, getNestedElement, getNestedElementsCount, getValueAssignment, isExpandable, replace
-
Methods inherited from class net.ssehub.easy.producer.ui.confModel.GUIVariable
addErrorMessage, compareTo, freeze, getAssignmentState, getComment, getComposite, getConfiguration, getErrorMessages, getHistory, getName, getNestedDepth, getNullLabel, getParent, getTooltip, getTopLevelParent, getType, getVariable, hasErrors, hasNullValue, hasValue, isAnnotated, isEditable, isFreezable, isFrozen, isTopLevelDeclaration, removeErrorMessages, replaceValue, setEmptyValue, setNULLValue, setVariable, toString, unfreeze
-
-
-
-
Constructor Detail
-
ContainerGUIVariable
ContainerGUIVariable(IDecisionVariable variable, org.eclipse.swt.widgets.Composite parent, GUIConfiguration config, GUIVariable varParent)
Sole constructor for this class.- Parameters:
variable- TheIDecisionVariablerepresented by this GUIVariableparent- The controlling composite, needed for the creation of CellEditorsconfig- TheGUIConfigurationholding this GUIVariablevarParent- The parent GUIVariable holding this variable. Can be null if and only if this variable is a top level variable stored inside the configuration.
-
-
Method Detail
-
isExtendable
public boolean isExtendable()
Description copied from class:GUIVariableReturns whether is variable can be extended (insert new empty values). Subclasses may override this method.- Overrides:
isExtendablein classGUIVariable- Returns:
- true if this variable is extendable, otherwise false.
- See Also:
GUIVariable.extend()
-
getValueText
public java.lang.String getValueText()
Description copied from class:GUIVariableReturns a string representation of the current value. This is used when no cursor is inside the cell (if the user is not editing the variable).- Specified by:
getValueTextin classGUIVariable- Returns:
- A string representation of the current value or null.
-
remove
public void remove(GUIVariable nestedVariable)
Description copied from class:GUIVariableDeletes a nestedGUIVariablefrom this variable. This is only supported inContainerGUIVariableclass.- Overrides:
removein classGUIVariable- Parameters:
nestedVariable- The nested variable which shall be removed.
-
getValue
public java.lang.Object getValue()
Description copied from class:GUIVariableReturns the value of the givenIDecisionVariableso that it can be used as return value for theEditingSupport.getValue(Object)method.- Specified by:
getValuein classGUIVariable- Returns:
- A value as needed by the Eclipse UI.
-
getEditor
public GUIEditor getEditor()
Description copied from class:GUIVariableReturns the (non-cell) editor for this variable. The editor shall be ready to use, i.e., properly initialized.- Overrides:
getEditorin classAbstractExpandableGUIVariable- Returns:
- the editor, may be null if the variable shall not be displayed / being edited
-
setValue
public void setValue(java.lang.Object value)
Description copied from class:GUIVariableSets the value of the wrappedIDecisionVariable.- Overrides:
setValuein classAbstractExpandableGUIVariable- Parameters:
value- The value to be set.
-
-