Class PSDArrow

    • Constructor Summary

      Constructors 
      Constructor Description
      PSDArrow​(java.lang.String source, java.lang.String destination)
      constructor to initialize arrow
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void drawArrow​(java.util.Map<java.lang.String,​PSDLifeLine> lifeLines, java.awt.Color thisColor, java.awt.Graphics2D g)
      Draws the arrow
      java.lang.String getDestination()
      Returns the name of the data element instance in which the arrow ends.
      PSDBlock getDestinationBlock()
      Returns the block in which the arrow ends.
      double getEndAt()
      Returns the end position of the arrow
      java.lang.String getSource()
      Returns the name of the data element instance from which the arrow originates.
      PSDBlock getSourceBlock()
      Returns the block from which the arrow originates.
      double getStartAt()
      Returns the starting position of the arrow
      boolean isOnLine​(java.awt.Point p, java.util.Map<java.lang.String,​PSDLifeLine> lifeLines, double scale)
      Returns true if point p is on the line of the arrow (or at most 2 pixels away)
      void setDestinationBlock​(PSDBlock destinationBlock)
      Sets the block in which the arrow ends to destinationBlock
      void setEndAt​(double endAt)
      Sets the end position of the arrow.
      void setSourceBlock​(PSDBlock sourceBlock)
      Sets the block from which the arrow originates to sourceBlock
      void setStartAt​(double startAt)
      Sets the starting position of the arrow.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PSDArrow

        public PSDArrow​(java.lang.String source,
                        java.lang.String destination)
        constructor to initialize arrow
        Parameters:
        source - String
        destination - String
    • Method Detail

      • getSource

        public java.lang.String getSource()
        Returns the name of the data element instance from which the arrow originates.
        Returns:
        String
      • getDestination

        public java.lang.String getDestination()
        Returns the name of the data element instance in which the arrow ends.
        Returns:
        String
      • getStartAt

        public double getStartAt()
        Returns the starting position of the arrow
        Returns:
        double
      • getEndAt

        public double getEndAt()
        Returns the end position of the arrow
        Returns:
        double
      • setStartAt

        public void setStartAt​(double startAt)
        Sets the starting position of the arrow.
        Parameters:
        startAt - double
      • setEndAt

        public void setEndAt​(double endAt)
        Sets the end position of the arrow.
        Parameters:
        endAt - double
      • getSourceBlock

        public PSDBlock getSourceBlock()
        Returns the block from which the arrow originates.
        Returns:
        PSDBlock
      • setSourceBlock

        public void setSourceBlock​(PSDBlock sourceBlock)
        Sets the block from which the arrow originates to sourceBlock
        Parameters:
        sourceBlock - PSDBlock
      • getDestinationBlock

        public PSDBlock getDestinationBlock()
        Returns the block in which the arrow ends.
        Returns:
        PSDBlock
      • setDestinationBlock

        public void setDestinationBlock​(PSDBlock destinationBlock)
        Sets the block in which the arrow ends to destinationBlock
        Parameters:
        destinationBlock - PSDBlock
      • drawArrow

        public void drawArrow​(java.util.Map<java.lang.String,​PSDLifeLine> lifeLines,
                              java.awt.Color thisColor,
                              java.awt.Graphics2D g)
        Draws the arrow
        Parameters:
        lifeLines - Map
        thisColor - Color
        g - Graphics2D
      • isOnLine

        public boolean isOnLine​(java.awt.Point p,
                                java.util.Map<java.lang.String,​PSDLifeLine> lifeLines,
                                double scale)
        Returns true if point p is on the line of the arrow (or at most 2 pixels away)
        Parameters:
        p - Point
        lifeLines - Map
        scale - double
        Returns:
        boolean