psdi.workflow.diagram

Class DiagramConfiguration

  • java.lang.Object
    • psdi.workflow.diagram.DiagramConfiguration
  • All Implemented Interfaces:
    java.lang.Cloneable


    public class DiagramConfiguration
    extends java.lang.Object
    implements java.lang.Cloneable

    This class holds information to configure the workflow diagram. It is important to distingush between the nodeBorderInsets which define the empty border around an node and the nodeInsets which define the area around the node which separate the node from the channels. The latter determines the length of the horizontal run into and out of the node. The former determines the space between the arrows and the image display.

    • Field Detail

      • background

        protected java.awt.Color background
        the background diagram color
      • lineColor

        protected java.awt.Color lineColor
        the line color
      • negativeLineColor

        protected java.awt.Color negativeLineColor
        the negative line color
      • selectedLineColor

        protected java.awt.Color selectedLineColor
        the selected line color
      • foreground

        protected java.awt.Color foreground
        the text color
      • selectedForeground

        protected java.awt.Color selectedForeground
        the selected text color
      • selectedBackground

        protected java.awt.Color selectedBackground
        the selected text background color
      • currentNodeColor

        protected java.awt.Color currentNodeColor
        The current node color
      • verticalLineSpacing

        protected int verticalLineSpacing
        The space between the vertical lines
      • horizontalLineSpacing

        protected int horizontalLineSpacing
        The space between the horizontal lines
      • nodeInsets

        protected java.awt.Insets nodeInsets
        The space around each node - this sets the space between the channels and the node
      • nodeBorderInsets

        protected java.awt.Insets nodeBorderInsets
        The border for each node
      • arrowHeight

        protected int arrowHeight
        The height of the arrow on the line ends
      • font

        protected java.awt.Font font
        The text font
      • imageScaleFactor

        protected int imageScaleFactor
        The image scale factor 1-100
      • emptyRowHeight

        protected int emptyRowHeight
        The empty row height
      • emptyColumnWidth

        protected int emptyColumnWidth
        The empty column width
    • Constructor Detail

      • DiagramConfiguration

        public DiagramConfiguration()
    • Method Detail

      • getLineColor

        public java.awt.Color getLineColor()
        Gets the line color
        Returns:
        The line color
      • setLineColor

        public void setLineColor(java.awt.Color lineColor)
        Sets the line color
        Parameters:
        lineColor - The line color
      • getSelectedLineColor

        public java.awt.Color getSelectedLineColor()
        Gets the selected line color
        Returns:
        The selected line color
      • setSelectedLineColor

        public void setSelectedLineColor(java.awt.Color selectedLineColor)
        Sets the selected line color
        Parameters:
        selectedLineColor - The selected line color
      • getNegativeLineColor

        public java.awt.Color getNegativeLineColor()
        Gets the negative line color
        Returns:
        The negative line color
      • setNegativeLineColor

        public void setNegativeLineColor(java.awt.Color negativeLineColor)
        Sets the negative line color
        Parameters:
        negativeLineColor - The negative line color
      • getForeground

        public java.awt.Color getForeground()
        Gets the foreground color
        Returns:
        The foreground color
      • setForeground

        public void setForeground(java.awt.Color foreground)
        Sets the foreground color
        Parameters:
        foreground - The foreground color
      • getBackground

        public java.awt.Color getBackground()
        Gets the background color
        Returns:
        The background color
      • setBackground

        public void setBackground(java.awt.Color background)
        Sets the background color
        Parameters:
        background - The background color
      • getSelectedForeground

        public java.awt.Color getSelectedForeground()
        Gets the selected foreground color
        Returns:
        The selected foreground color
      • setSelectedForeground

        public void setSelectedForeground(java.awt.Color selectedForeground)
        Sets the selected foreground color
        Parameters:
        selectedForeground - The selected foreground color
      • getSelectedBackground

        public java.awt.Color getSelectedBackground()
        Gets the selected background color
        Returns:
        The selected background color
      • setSelectedBackground

        public void setSelectedBackground(java.awt.Color selectedBackground)
        Sets the selected background color
        Parameters:
        selectedBackground - The selected background color
      • getCurrentNodeColor

        public java.awt.Color getCurrentNodeColor()
        Gets the current node color
        Returns:
        The current node color
      • setCurrentNodeColor

        public void setCurrentNodeColor(java.awt.Color currentNodeColor)
        Sets the current node color
        Parameters:
        currentNodeColor - The current node color
      • getFont

        public java.awt.Font getFont()
        Gets the text font
        Returns:
        The text font
      • setFont

        public void setFont(java.awt.Font font)
        Sets the text font
        Parameters:
        font - The text font
      • getVerticalLineSpacing

        public int getVerticalLineSpacing()
        Gets the vertical line spacing
        Returns:
        The vertical line spacing
      • setVerticalLineSpacing

        public void setVerticalLineSpacing(int verticalLineSpacing)
        Sets the vertical line spacing
        Parameters:
        verticalLineSpacing - The vertical line spacing
      • getHorizontalLineSpacing

        public int getHorizontalLineSpacing()
        Gets the horizontal line spacing
        Returns:
        The horizontal line spacing
      • setHorizontalLineSpacing

        public void setHorizontalLineSpacing(int horizontalLineSpacing)
        Sets the horizontal line spacing
        Parameters:
        horizontalLineSpacing - The horizontal line spacing
      • getArrowHeight

        public int getArrowHeight()
        Gets the arrow height
        Returns:
        The arrow height
      • setArrowHeight

        public void setArrowHeight(int arrowHeight)
        Sets the arrow height
        Parameters:
        arrowHeight - The arrow height
      • getNodeInsets

        public java.awt.Insets getNodeInsets()
        Gets the insets around the node which space the node from the channels
        Returns:
        The node insets
      • setNodeInsets

        public void setNodeInsets(java.awt.Insets nodeInsets)
        Sets the insets around the node which space the node from the channels
        Parameters:
        nodeInsets - The node insets
      • setNodeBorderInsets

        public void setNodeBorderInsets(java.awt.Insets nodeBorderInsets)
        Sets the insets for the node border. This allows the image etc to be spaced away from the lines.
        Parameters:
        nodeBorderInsets - The node border insets
      • getNodeBorderInsets

        public java.awt.Insets getNodeBorderInsets()
        Gets the insets for the node border. This allows the image etc to be spaced away from the lines.
        Returns:
        The node border insets
      • getEmptyRowHeight

        public int getEmptyRowHeight()
        Gets the empty row height
        Returns:
        The empty row height
      • setEmptyRowHeight

        public void setEmptyRowHeight(int emptyRowHeight)
        Sets the empty row height
        Parameters:
        emptyRowHeight - The empty row height
      • getEmptyColumnWidth

        public int getEmptyColumnWidth()
        Gets the empty column width
        Returns:
        The empty column width
      • setEmptyColumnWidth

        public void setEmptyColumnWidth(int emptyColumnWidth)
        Sets the empty column width
        Parameters:
        emptyRowHeight - The empty column width
      • getImageScaleFactor

        public int getImageScaleFactor()
        Gets the image scale factor as a percentage for the image
        Parameters:
        The - scale factor
      • setImageScaleFactor

        public void setImageScaleFactor(int imageScaleFactor)
        Sets the image size - null is allowed and means no scaling
        Parameters:
        imageSize - The image size
      • scale

        public DiagramConfiguration scale(int scaleFactor)
        Scales all the parts of the configuration by a percentage and returns a new configuration object.
        Parameters:
        scale - The scale as a percentage
        Returns:
        The new configuration object