Class UISettings


  • public class UISettings
    extends Object
    Store all UI Settings that can change at runtime.
    • Field Detail

      • HORIZONTAL_SPACING

        public static final String HORIZONTAL_SPACING
        The name of the advanced option in the render options for horizontal spacing.
        See Also:
        Constant Field Values
      • VERTICAL_SPACING

        public static final String VERTICAL_SPACING
        The name of the advanced option in the render options for vertical spacing.
        See Also:
        Constant Field Values
      • GRAPH_FIGURE_PROVIDER_ID

        public static final String GRAPH_FIGURE_PROVIDER_ID
        The name of the advanced option in the render options for the ID of the graph figure provider.
        See Also:
        Constant Field Values
      • GRAPH_ORIENTATION

        public static final String GRAPH_ORIENTATION
        The name of the advanced option in the render options for the process graph orientation.
        See Also:
        Constant Field Values
      • ID

        public static final String ID
        Property ID
      • logger

        protected final Logger logger
        The logger for UI settings. It is protected for extensibility.
    • Constructor Detail

      • UISettings

        public UISettings​(org.eclipse.gef.GraphicalViewer viewer)
        Parameters:
        viewer - the Graphical Viewer
    • Method Detail

      • getGraphElements

        public GraphFigureProvider getGraphElements()
        Returns the implementation of the graph elements which are used to visualise the process graph
        Returns:
        the graph elements
      • firePropertyChange

        protected void firePropertyChange​(String preferenceConstantID,
                                          Object oldValue,
                                          Object newValue)
        Fired if the uiSettings changed
        Parameters:
        preferenceConstantID - the ID of the Preference Constant which changed
        oldValue - the value before the change
        newValue - the value after the change
      • addUIListener

        public void addUIListener​(PropertyChangeListener listener)
        Parameters:
        listener - the listener to receive events
      • removeUIListener

        public void removeUIListener​(PropertyChangeListener listener)
        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

        public String getGraphOrientation()
        Returns:
        Returns the graph orientation.
      • setGraphOrientation

        public void setGraphOrientation​(String graphOrientation)
        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 distance
        vertical - the vertical distance
      • setFigureProviderID

        public void setFigureProviderID​(String figureProviderID)
        Parameters:
        figureProviderID - The figure provider name to set.
      • getFigureProviderID

        public String getFigureProviderID()
        Returns:
        Returns the figure provider id.
      • getIntValue

        public int getIntValue​(String preferenceName)
        Parameters:
        preferenceName - PreferenceConstants
        Returns:
        the integer value of the Preference preferenceName or 0 if preference is unknown
        See Also:
        PreferenceConstants
      • getStringValue

        public String getStringValue​(String preferenceName)
        Parameters:
        preferenceName - PreferenceConstants
        Returns:
        the string value of the Preference preferenceName or an empty string if preference is unknown
        See Also:
        PreferenceConstants
      • setStringValue

        public void setStringValue​(String preferenceName,
                                   String stringValue)
        Parameters:
        preferenceName - PreferenceConstants
        stringValue - sets the Preference preferenceName to the given value
        See Also:
        PreferenceConstants
      • getBooleanValue

        public boolean getBooleanValue​(String preferenceName)
        Parameters:
        preferenceName - PreferenceConstants
        Returns:
        the Boolean value of the Preference preferenceName or false if preference is unkown
        See Also:
        PreferenceConstants
      • setIntValue

        public void setIntValue​(String preferenceName,
                                int intValue)
        Parameters:
        preferenceName - PreferenceConstants
        intValue - sets the Preference preferenceName to the given value
        See Also:
        PreferenceConstants
      • setBooleanValue

        public void setBooleanValue​(String preferenceName,
                                    boolean booleanValue)
        Parameters:
        preferenceName - PreferenceConstants
        booleanValue - 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
      • getLocale

        public Locale getLocale()
        Gets the locale to be used for the UI.
        Returns:
        The locale to be used for the UI.