Class UISettings
java.lang.Object
de.aristaflow.adept2.ui.processvisualisation.UISettings
Store all UI Settings that can change at runtime.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the advanced option in the render options for the ID of the graph figure provider.static final StringThe name of the advanced option in the render options for the process graph orientation.static final StringFields for the graph orientationstatic final Stringstatic final StringThe name of the advanced option in the render options for horizontal spacing.static final StringProperty IDprotected final LoggerThe logger for UI settings.static final StringProperty value for the user preference of using anti aliasing ("advanced graphics") and also the name of the corresponding advanced option in the render options.static final StringThe name of the advanced option in the render options for vertical spacing. -
Constructor Summary
ConstructorsConstructorDescriptionUISettings(RenderOptions options) Creates new UI settings for rendering process templates and instances.UISettings(org.eclipse.gef.GraphicalViewer viewer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUIListener(PropertyChangeListener listener) protected voidfirePropertyChange(String preferenceConstantID, Object oldValue, Object newValue) Fired if the uiSettings changedbooleangetBooleanValue(String preferenceName) Returns the implementation of the graph elements which are used to visualise the process graphintintgetIntValue(String preferenceName) Gets the locale to be used for the UI.getStringValue(String preferenceName) intbooleanbooleanbooleanGets whether the data flow lane (part displaying data elements and edges) is visible.booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidremoveUIListener(PropertyChangeListener listener) booleanvoidsetBooleanValue(String preferenceName, boolean booleanValue) voidsetDataEdgesVisible(boolean dataEdgesVisible) voidsetDataElementsVisible(boolean dataElementsVisible) voidsetDecisionDataEdgesVisible(boolean decisionDataEdgesVisible) voidsetDecisionDataElementsVisible(boolean decisionDataElementsVisible) voidsetDependencyVisiblityMode(boolean dependencyVisibilityMode) voidsetFigureProviderID(String figureProviderID) voidsetGraphOrientation(String graphOrientation) voidsetHiddenNodesVisible(boolean hiddenNodesVisible) voidsetHorizontalSpacing(int horizontalSpacing) voidsetIntValue(String preferenceName, int intValue) voidsetScrollToChanges(boolean booleanValue) Set the scrolling behaviour.voidsetSpacing(int horizontal, int vertical) Set the horizontal and vertical spacingvoidsetStringValue(String preferenceName, String stringValue) voidsetSyncEdgeVisible(boolean syncEdgeVisible) voidsetSystemDataEdgesVisible(boolean systemDataEdgesVisible) voidsetSystemDataElementsVisible(boolean systemDataElementsVisible) voidsetVerticalSpacing(int verticalSpacing) voidshowConfigDialog(org.eclipse.swt.widgets.Shell parent) Open modal config dialogbooleanGets whether it is save to trigger usage of advanced graphics capabilities.
-
Field Details
-
HORIZONTAL_SPACING
The name of the advanced option in the render options for horizontal spacing.- See Also:
-
VERTICAL_SPACING
The name of the advanced option in the render options for vertical spacing.- See Also:
-
GRAPH_FIGURE_PROVIDER_ID
The name of the advanced option in the render options for the ID of the graph figure provider.- See Also:
-
GRAPH_ORIENTATION
The name of the advanced option in the render options for the process graph orientation.- See Also:
-
GRAPH_ORIENTATION_H
Fields for the graph orientation- See Also:
-
GRAPH_ORIENTATION_V
- See Also:
-
PROP_USE_ANTIALIASING
Property value for the user preference of using anti aliasing ("advanced graphics") and also the name of the corresponding advanced option in the render options.- See Also:
-
ID
Property ID -
logger
The logger for UI settings. It is protected for extensibility.
-
-
Constructor Details
-
UISettings
public UISettings(org.eclipse.gef.GraphicalViewer viewer) - Parameters:
viewer- the Graphical Viewer
-
UISettings
Creates new UI settings for rendering process templates and instances.This supports the following advanced options from the designated render options:
- "GraphOrientation" (
GRAPH_ORIENTATION):- h: horizontal orientation of the process image (default)
- v: vertical orientation of the process image
- "HorizontalSpacing" (
HORIZONTAL_SPACING):
The space (int) between nodes and data elements on the horizontal axis. The default is60. - "VerticalSpacing" (
VERTICAL_SPACING):
The space (int) between nodes and data elements on the vertical axis. The default is20. - "GraphFigureProviderID" (
GRAPH_FIGURE_PROVIDER_ID):
The full name of the class implementingGraphFigureProvider. This class provides the figures used for the process elements, i. e. nodes, data elements and alike.
The default isModelGlue.
- Parameters:
options- The options to set for rendering process templates and instances.
- "GraphOrientation" (
-
-
Method Details
-
getGraphElements
Returns the implementation of the graph elements which are used to visualise the process graph- Returns:
- the graph elements
-
firePropertyChange
Fired if the uiSettings changed- Parameters:
preferenceConstantID- the ID of the Preference Constant which changedoldValue- the value before the changenewValue- the value after the change
-
addUIListener
- Parameters:
listener- the listener to receive events
-
removeUIListener
- Parameters:
listener- the listener to stop receiving events
-
isDataEdgesVisible
public boolean isDataEdgesVisible()- Returns:
- Returns the dataEdgesVisible.
-
setDataEdgesVisible
public void setDataEdgesVisible(boolean dataEdgesVisible) - Parameters:
dataEdgesVisible- The dataEdgesVisible to set.
-
isSystemDataEdgeVisible
public boolean isSystemDataEdgeVisible()- Returns:
- Returns the systemDataEdgesVisible.
-
setSystemDataEdgesVisible
public void setSystemDataEdgesVisible(boolean systemDataEdgesVisible) - Parameters:
systemDataEdgesVisible- The systemDataEdgesVisible to set.
-
isDataElementsVisible
public boolean isDataElementsVisible()- Returns:
- Returns the dataElementsVisible.
-
setDataElementsVisible
public void setDataElementsVisible(boolean dataElementsVisible) - Parameters:
dataElementsVisible- The dataElementsVisible to set.
-
isSystemDataElementVisible
public boolean isSystemDataElementVisible()- Returns:
- Returns the systemDataElementsVisible.
-
setSystemDataElementsVisible
public void setSystemDataElementsVisible(boolean systemDataElementsVisible) - Parameters:
systemDataElementsVisible- The systemDataElementsVisible to set.
-
isDecisionDataElementVisible
public boolean isDecisionDataElementVisible()- Returns:
- Returns the decisionDataElementsVisible.
-
setDecisionDataElementsVisible
public void setDecisionDataElementsVisible(boolean decisionDataElementsVisible) - Parameters:
decisionDataElementsVisible- The decisionDataElementsVisible to set.
-
isDecisionDataEdgeVisible
public boolean isDecisionDataEdgeVisible()- Returns:
- Returns the decisionDataEdgesVisible.
-
setDecisionDataEdgesVisible
public void setDecisionDataEdgesVisible(boolean decisionDataEdgesVisible) - Parameters:
decisionDataEdgesVisible- The decisionDataEdgesVisible to set.
-
isDataFlowLaneVisible
public boolean isDataFlowLaneVisible()Gets whether the data flow lane (part displaying data elements and edges) is visible. If not, there will be no whitespace for data elements and edges. This is only allowed if all data elements and edges are hidden.- Returns:
- Whether the data flow lane (part displaying data elements and edges) is visible
-
isSyncEdgeVisible
public boolean isSyncEdgeVisible()- Returns:
- Returns the syncEdgeVisible.
-
setSyncEdgeVisible
public void setSyncEdgeVisible(boolean syncEdgeVisible) - Parameters:
syncEdgeVisible- The syncEdgeVisible to set.
-
isHiddenNodesVisible
public boolean isHiddenNodesVisible()- Returns:
- Returns the hiddenNodesVisible state.
-
setHiddenNodesVisible
public void setHiddenNodesVisible(boolean hiddenNodesVisible) - Parameters:
hiddenNodesVisible- True to show the hidden nodes.
-
isDependencyVisibilityModeOn
public boolean isDependencyVisibilityModeOn()- Returns:
- Returns the value of the dependency visibility mode field.
-
setDependencyVisiblityMode
public void setDependencyVisiblityMode(boolean dependencyVisibilityMode) - Parameters:
dependencyVisibilityMode- The setter for the dependency visibility mode field.
-
getGraphOrientation
- Returns:
- Returns the graph orientation.
-
setGraphOrientation
- Parameters:
graphOrientation- Sets the orientation of the process graph.
-
getHorizontalSpacing
public int getHorizontalSpacing()- Returns:
- Returns the horizontalSpacing.
-
setHorizontalSpacing
public void setHorizontalSpacing(int horizontalSpacing) - Parameters:
horizontalSpacing- The horizontalSpacing to set.
-
getVerticalSpacing
public int getVerticalSpacing()- Returns:
- Returns the verticalSpacing.
-
setVerticalSpacing
public void setVerticalSpacing(int verticalSpacing) - Parameters:
verticalSpacing- The verticalSpacing to set.
-
showConfigDialog
public void showConfigDialog(org.eclipse.swt.widgets.Shell parent) Open modal config dialog- Parameters:
parent- the parent Shell
-
setSpacing
public void setSpacing(int horizontal, int vertical) Set the horizontal and vertical spacing- Parameters:
horizontal- the horizontal distancevertical- the vertical distance
-
setFigureProviderID
- Parameters:
figureProviderID- The figure provider name to set.
-
getFigureProviderID
- Returns:
- Returns the figure provider id.
-
getIntValue
- Parameters:
preferenceName-PreferenceConstants- Returns:
- the integer value of the Preference preferenceName or 0 if preference is unknown
- See Also:
-
PreferenceConstants
-
getStringValue
- Parameters:
preferenceName-PreferenceConstants- Returns:
- the string value of the Preference preferenceName or an empty string if preference is unknown
- See Also:
-
PreferenceConstants
-
setStringValue
- Parameters:
preferenceName-PreferenceConstantsstringValue- sets the Preference preferenceName to the given value- See Also:
-
PreferenceConstants
-
getBooleanValue
- Parameters:
preferenceName-PreferenceConstants- Returns:
- the Boolean value of the Preference preferenceName or false if preference is unkown
- See Also:
-
PreferenceConstants
-
setIntValue
- Parameters:
preferenceName-PreferenceConstantsintValue- sets the Preference preferenceName to the given value- See Also:
-
PreferenceConstants
-
setBooleanValue
- Parameters:
preferenceName-PreferenceConstantsbooleanValue- sets the Preference preferenceName to the given value- See Also:
-
PreferenceConstants
-
setScrollToChanges
public void setScrollToChanges(boolean booleanValue) Set the scrolling behaviour.- Parameters:
booleanValue-
-
scrollToChanges
public boolean scrollToChanges()- Returns:
- the scrolling behaviour
-
useAdvancedGraphics
public boolean useAdvancedGraphics()Gets whether it is save to trigger usage of advanced graphics capabilities. Setting the anti-aliasing mode of the graphics used will enable the advanced graphics, which can cause problems with some graphic operations.- Returns:
- Whether it is save to trigger usage of advanced graphics capabilities.
-
getLocale
Gets the locale to be used for the UI.- Returns:
- The locale to be used for the UI.
-