Class DoubleArrowFootprint

java.lang.Object
org.opensourcephysics.cabrillo.tracker.LineFootprint
org.opensourcephysics.cabrillo.tracker.DoubleArrowFootprint
All Implemented Interfaces:
Cloneable, Footprint

public class DoubleArrowFootprint extends LineFootprint
An DoubleArrowFootprint returns a double arrow shape for a Point array of length 2.
Author:
Douglas Brown
  • Field Details

    • tipLength

      protected int tipLength
    • tipWidth

      protected int tipWidth
    • headStroke

      protected BasicStroke headStroke
  • Constructor Details

    • DoubleArrowFootprint

      public DoubleArrowFootprint(String name)
      Constructs a DoubleArrowFootprint.
      Parameters:
      name - the name
  • Method Details

    • getIcon

      public ResizableIcon getIcon(int w, int h)
      Gets the icon.
      Specified by:
      getIcon in interface Footprint
      Overrides:
      getIcon in class LineFootprint
      Parameters:
      w - width of the icon
      h - height of the icon
      Returns:
      the icon
    • setTipLength

      public void setTipLength(int tipLength)
      Sets the length of the arrow tip.
      Parameters:
      tipLength - the desired tip length in pixels
    • setStroke

      public void setStroke(BasicStroke stroke)
      Sets the stroke.
      Specified by:
      setStroke in interface Footprint
      Overrides:
      setStroke in class LineFootprint
      Parameters:
      stroke - the desired stroke
    • setSolidHead

      public void setSolidHead(boolean solid)
      Sets the solid arrowhead property.
      Parameters:
      solid - true for a filled arrowhead
    • getShape

      public org.opensourcephysics.cabrillo.tracker.MultiShape getShape(Point[] points, int scale)
      Gets the shape of this footprint.
      Specified by:
      getShape in interface Footprint
      Overrides:
      getShape in class LineFootprint
      Parameters:
      points - an array of Points
      scale - an integer magnification
      Returns:
      the shape