Class AbstractConfigMenu
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- net.ssehub.easy.producer.ui.productline_editor.AbstractHeaderMenu
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.AbstractConfigMenu
-
- All Implemented Interfaces:
IConfigurationChangeListener,org.eclipse.swt.graphics.Drawable
- Direct Known Subclasses:
ConfigurationHeaderMenu,FilterMenu
public abstract class AbstractConfigMenu extends AbstractHeaderMenu implements IConfigurationChangeListener
Abstract super class for menu modifying theGUIConfiguration.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private GUIConfigurationFilterfiltersprivate IGUIConfigurationContainerguiConfigContainer
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConfigMenu(org.eclipse.swt.widgets.Composite parent, ProductLineProject plp)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearErrorMessages()Removes the error messages of all storedGUIVariable.voidconfigurationRefreshed(Configuration config)Notification that the whole configuration was refreshed, e.g.protected IGUIConfigurationContainergetConfigContainer()Returns theIGUIConfigurationContainerwhich will be manipulated by this menu.voiditemChanged(Configuration config, IDecisionVariable changedVariable, Value oldValue)Notification that aDecisionVariablechanged inside theConfiguration.protected voidsetErrorMessages(Message[] errorMessages)Removes all errors appended to the current configuration and adds the specified error messages.protected voidsetFilter(GUIConfigurationFilter filters)Sets the filters, replacing any previous filters, and triggers refiltering and resorting of the elements.voidsetGUIConfiguration(IGUIConfigurationContainer guiConfigContainer)Setter for theIGUIConfigurationContainer.voidstateChanged(Configuration config, IDecisionVariable changedVariable)Notification that the state of aDecisionVariablehas been changed inside theConfiguration.-
Methods inherited from class net.ssehub.easy.producer.ui.productline_editor.AbstractHeaderMenu
close, getProductLineProject, revalidateButtons, setLayout
-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
-
-
-
Field Detail
-
guiConfigContainer
private IGUIConfigurationContainer guiConfigContainer
-
filters
private GUIConfigurationFilter filters
-
-
Constructor Detail
-
AbstractConfigMenu
protected AbstractConfigMenu(org.eclipse.swt.widgets.Composite parent, ProductLineProject plp)Sole constructor for this class.- Parameters:
parent- The parent holding this menu.plp- The current editedProductLineProject
-
-
Method Detail
-
setGUIConfiguration
public final void setGUIConfiguration(IGUIConfigurationContainer guiConfigContainer)
Setter for theIGUIConfigurationContainer.- Parameters:
guiConfigContainer- Sets theIGUIConfigurationContainer(Can be null, but than errorMessages from the reasoning steps will not be passed to theIGUIConfigurationContainer, also ViewerFilters will not be handled).
-
getConfigContainer
protected final IGUIConfigurationContainer getConfigContainer()
Returns theIGUIConfigurationContainerwhich will be manipulated by this menu.- Returns:
- The related
IGUIConfigurationContainer, can be null if no container was set via thesetGUIConfiguration(IGUIConfigurationContainer)method.
-
setFilter
protected final void setFilter(GUIConfigurationFilter filters)
Sets the filters, replacing any previous filters, and triggers refiltering and resorting of the elements.- Parameters:
filters- A set of filters which shall be applied to the current configuration, must not be null- See Also:
IGUIConfigurationContainer.setFilters(org.eclipse.jface.viewers.ViewerFilter[])
-
setErrorMessages
protected final void setErrorMessages(Message[] errorMessages)
Removes all errors appended to the current configuration and adds the specified error messages.- Parameters:
errorMessages- A list of error/warning messages, produced by a reasoning step.- See Also:
GUIConfiguration.setErrorMessages(Message[])
-
clearErrorMessages
protected final void clearErrorMessages()
Removes the error messages of all storedGUIVariable. This method should be called after a reasoning was performed and no error was detected.
-
itemChanged
public void itemChanged(Configuration config, IDecisionVariable changedVariable, Value oldValue)
Description copied from interface:IConfigurationChangeListenerNotification that aDecisionVariablechanged inside theConfiguration.- Specified by:
itemChangedin interfaceIConfigurationChangeListener- Parameters:
config- TheConfigurationwhere the change occurred.changedVariable- TheDecisionVariablewhich changed.oldValue- the old value ofchangedVariablebefore the change
-
stateChanged
public void stateChanged(Configuration config, IDecisionVariable changedVariable)
Description copied from interface:IConfigurationChangeListenerNotification that the state of aDecisionVariablehas been changed inside theConfiguration.- Specified by:
stateChangedin interfaceIConfigurationChangeListener- Parameters:
config- TheConfigurationwhere the change occurred.changedVariable- TheDecisionVariablewhich changed.
-
configurationRefreshed
public void configurationRefreshed(Configuration config)
Description copied from interface:IConfigurationChangeListenerNotification that the whole configuration was refreshed, e.g. because the project was reparsed.- Specified by:
configurationRefreshedin interfaceIConfigurationChangeListener- Parameters:
config- The configuration which was refreshed.
-
-