psdi.workflow.diagram

Class DiagramLineChannel

  • java.lang.Object
    • psdi.workflow.diagram.DiagramLineChannel


  • public class DiagramLineChannel
    extends java.lang.Object

    This class holds a line channel. This is all the relationships to plotted in a vertical or horizontal channel

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ABOVE
      Above the row
      static int AFTER
      After the column
      static int BEFORE
      Before the column
      static int BELOW
      Below the row
      static int HORIZONTAL
      The horizontal orientation
      protected int index
      The row/column index
      static int LINE_WIDTH
      Line width
      protected int location
      The location of the start of the channel
      protected int orientation
      The orientation
      protected int position
      The position above/below/before after
      protected java.util.Vector rels
      The relationships in the channel
      protected int spacing
      The line spacing
      static int VERTICAL
      The vertical orientation
    • Constructor Summary

      Constructors 
      Constructor and Description
      DiagramLineChannel(int index, int orientation, int position)
      Constrcust a channel
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addWorkflowRelationship(WorkflowRelationship rel)
      Adds a relationship to the channel
      int getIndex()
      Returns the index of the channel this is the row/column that the channel is associated with
      protected int getIndex(WorkflowRelationship rel)
      Gets the position index of the relationship in the channel
      java.lang.Object getKey()
      Generates a unique key for this channel object
      static java.lang.Object getKey(int index, int orientation, int position)
      Generates a key for a channel object which is unique for the channel parameters
      int getLineCount()
      Returns the count of the lines in the channel
      int getLineSpacing()
      Gets the line spacing
      int getLocation()
      Returns the location of the channel.
      int getLocation(WorkflowRelationship rel)
      Returns the location of the relationship that belongs to the channel.This is y coordinate for horizontal channels and the x coordinate for vertical channels
      int getOrientation()
      Returns the orientation of the channel
      int getPosition()
      Returns the channel position
      int getSpaceRequired()
      Returns the space required to display the channel.
      java.util.Vector getWorkflowRelationships()
      Returns the list of relationships in the channel
      void setLineSpacing(int spacing)
      Sets the line spacing
      void setLocation(int location)
      Sets the location of the start of the channel
      java.lang.String toString()
      Returns the string representation of the line channel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • index

        protected int index
        The row/column index
      • orientation

        protected int orientation
        The orientation
      • position

        protected int position
        The position above/below/before after
      • location

        protected int location
        The location of the start of the channel
      • spacing

        protected int spacing
        The line spacing
      • rels

        protected java.util.Vector rels
        The relationships in the channel
      • HORIZONTAL

        public static final int HORIZONTAL
        The horizontal orientation
        See Also:
        Constant Field Values
    • Constructor Detail

      • DiagramLineChannel

        public DiagramLineChannel(int index,
                                  int orientation,
                                  int position)
        Constrcust a channel
        Parameters:
        index - The index of the channel - row/column
        orientation - The orientation - HORIZONTAL/VERTICAL
        position - The position - ABOVE/BELOW/BEFORE/AFTER
    • Method Detail

      • getIndex

        public int getIndex()
        Returns the index of the channel this is the row/column that the channel is associated with
        Returns:
        The index
      • getOrientation

        public int getOrientation()
        Returns the orientation of the channel
        Returns:
        The orientation - HORIZONTAL/VERTICAL
      • getPosition

        public int getPosition()
        Returns the channel position
        Returns:
        The position - ABOVE/BELOW/BEFORE/AFTER
      • addWorkflowRelationship

        public void addWorkflowRelationship(WorkflowRelationship rel)
        Adds a relationship to the channel
        Parameters:
        rel - The relationship to add
      • getIndex

        protected int getIndex(WorkflowRelationship rel)
        Gets the position index of the relationship in the channel
        Parameters:
        rel - The relationship
        Returns:
        The position index
      • getWorkflowRelationships

        public java.util.Vector getWorkflowRelationships()
        Returns the list of relationships in the channel
        Returns:
        The relationships
      • getKey

        public java.lang.Object getKey()
        Generates a unique key for this channel object
        Returns:
        The key
      • getLineCount

        public int getLineCount()
        Returns the count of the lines in the channel
        Returns:
        The line count
      • getSpaceRequired

        public int getSpaceRequired()
        Returns the space required to display the channel. This is the height for horizontal channels or the with for vertical channels
        Returns:
        The space required in pixels
      • getLocation

        public int getLocation()
        Returns the location of the channel. This is y coordinate for horizontal channels and the x coordinate for vertical channels
        Returns:
        The channel position
      • getLocation

        public int getLocation(WorkflowRelationship rel)
        Returns the location of the relationship that belongs to the channel.This is y coordinate for horizontal channels and the x coordinate for vertical channels
        Parameters:
        rel - The relationship to get position for
        Returns:
        The relationship position
      • setLocation

        public void setLocation(int location)
        Sets the location of the start of the channel
        Parameters:
        location - The starting location
      • setLineSpacing

        public void setLineSpacing(int spacing)
        Sets the line spacing
        Parameters:
        spacing - The line spacing
      • getLineSpacing

        public int getLineSpacing()
        Gets the line spacing
        Returns:
        The line spacing
      • toString

        public java.lang.String toString()
        Returns the string representation of the line channel
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation
      • getKey

        public static java.lang.Object getKey(int index,
                                              int orientation,
                                              int position)
        Generates a key for a channel object which is unique for the channel parameters
        Parameters:
        index - The channel index - this is the row/column
        orientation - The orientation - VERTICAL/HORIZONTAL
        position - The position - ABOVE/BELOW/BEFORE/AFTER
        Returns:
        The key