Class DoubleCrosshairFootprint

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

public class DoubleCrosshairFootprint extends LineFootprint
A double crosshair footprint for a Point array of length 2.
Author:
Douglas Brown
  • Field Details

    • targetShape

      protected Shape targetShape
    • size

      protected int size
    • hitShape

      protected Shape hitShape
  • Constructor Details

    • DoubleCrosshairFootprint

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

    • setCrosshairSize

      public void setCrosshairSize(int out, int in)
      /** Sets the size of the crosshair.
      Parameters:
      out - the outside end of the crosshair
      in - the inside end of the crosshair
    • 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
    • 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
    • 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