コード例 #1
0
 /**
  * Clones this Step.
  *
  * @return a cloned step
  */
 public Object clone() {
   PositionStep step = (PositionStep) super.clone();
   if (step != null) step.points[0] = step.p = step.new Position(p.getX(), p.getY());
   step.textLayouts = new HashMap<TrackerPanel, TextLayout>();
   step.layoutBounds = new HashMap<TrackerPanel, Rectangle>();
   return step;
 }
コード例 #2
0
 /**
  * Constructs a PositionStep with specified image coordinates.
  *
  * @param track the PointMass track
  * @param n the frame number
  * @param x the x coordinate
  * @param y the y coordinate
  */
 public PositionStep(PointMass track, int n, double x, double y) {
   super(track, n);
   p = new Position(x, y);
   p.setTrackEditTrigger(true);
   points = new TPoint[] {p};
   screenPoints = new Point[getLength()];
 }
コード例 #3
0
 /**
  * Gets TextLayout screen position.
  *
  * @param trackerPanel the tracker panel
  * @return the screen position point
  */
 protected Point getLayoutPosition(TrackerPanel trackerPanel) {
   Point pt = p.getScreenPosition(trackerPanel);
   pt.setLocation(pt.x - 4 - textLayoutFont.getSize(), pt.y - 6);
   return pt;
 }