Class AbstractArrowShape

java.lang.Object
org.graffiti.plugins.views.defaults.AbstractArrowShape
All Implemented Interfaces:
Shape, ArrowShape
Direct Known Subclasses:
AbsoluteInhibitorArrowShape, AbsoluteStimulationArrowShape, AssignmentArrowShape, CircleArrowShape, CircleConnectArrowShape, DiamondArrowShape, InhibitorArrowShape, RectangularNodeShape, StandardArrowShape, StandardArrowShapeLeft, StandardArrowShapeRight, TriggerArrowShape

public abstract class AbstractArrowShape
extends Object
implements ArrowShape
DOCUMENT ME!
Version:
$Revision: 1.10 $ $Date: 2010/12/22 13:06:19 $
Author:
$Author: klukas $
  • Constructor Details

    • AbstractArrowShape

      public AbstractArrowShape()
  • Method Details

    • updateSize

      public void updateSize​(double sz)
      Specified by:
      updateSize in interface ArrowShape
    • getAnchor

      public Point2D getAnchor()
      Returns the anchor of the arrow, i.e. the point where the line should be attached to the arrow. This is only valid after a call to affix.
      Specified by:
      getAnchor in interface ArrowShape
      Returns:
      the anchor of the arrow.
    • getBounds

      public Rectangle getBounds()
      DOCUMENT ME!
      Specified by:
      getBounds in interface Shape
      Returns:
      DOCUMENT ME!
    • getBounds2D

      public Rectangle2D getBounds2D()
      DOCUMENT ME!
      Specified by:
      getBounds2D in interface Shape
      Returns:
      DOCUMENT ME!
    • addThickness

      public static Rectangle2D addThickness​(Rectangle2D b, double lineWidth)
    • getPathIterator

      public PathIterator getPathIterator​(AffineTransform t, double d)
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Parameters:
      t - DOCUMENT ME!
      d - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getPathIterator

      public PathIterator getPathIterator​(AffineTransform t)
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Parameters:
      t - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • affix

      public Shape affix​(Point2D target, Point2D other, double lineWidth)
      Sets this arrow to the target point and rotates it according to the line given by the connection between points target and other. Ensures that the arrow is always larger than the line.
      Specified by:
      affix in interface ArrowShape
      Parameters:
      target - the point where the arrow should be put.
      other - needed to calculate the direction in which the arrow should point to. The line is given by the two points target and other.
      lineWidth - The total width of the line. May be used to scale the arrow so as to be larger than the line.
      Returns:
      the point where the line meets the arrow
    • contains

      public boolean contains​(double x, double y, double w, double h)
      DOCUMENT ME!
      Specified by:
      contains in interface Shape
      Parameters:
      x - DOCUMENT ME!
      y - DOCUMENT ME!
      w - DOCUMENT ME!
      h - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • contains

      public boolean contains​(double x, double y)
      DOCUMENT ME!
      Specified by:
      contains in interface Shape
      Parameters:
      x - DOCUMENT ME!
      y - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • contains

      public boolean contains​(Point2D p)
      DOCUMENT ME!
      Specified by:
      contains in interface Shape
      Parameters:
      p - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • contains

      public boolean contains​(Rectangle2D r)
      DOCUMENT ME!
      Specified by:
      contains in interface Shape
      Parameters:
      r - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • intersects

      public boolean intersects​(double x, double y, double w, double h)
      DOCUMENT ME!
      Specified by:
      intersects in interface Shape
      Parameters:
      x - DOCUMENT ME!
      y - DOCUMENT ME!
      w - DOCUMENT ME!
      h - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • intersects

      public boolean intersects​(Rectangle2D r)
      DOCUMENT ME!
      Specified by:
      intersects in interface Shape
      Parameters:
      r - DOCUMENT ME!
      Returns:
      DOCUMENT ME!