Exemplo n.º 1
0
 /**
  * Overrides TPoint setXY method.
  *
  * @param x the x coordinate
  * @param y the y coordinate
  */
 public void setXY(double x, double y) {
   if (track.isLocked()) return;
   super.setXY(x, y);
   repaint();
   ((PointMass) track).updateDerivatives(n);
   track.support.firePropertyChange("step", null, new Integer(n)); // $NON-NLS-1$
 }
Exemplo n.º 2
0
 /**
  * Overrides TPoint showCoordinates method.
  *
  * @param vidPanel the video panel
  */
 public void showCoordinates(VideoPanel vidPanel) {
   // put values into pointmass x and y fields
   Point2D p = getWorldPosition(vidPanel);
   track.xField.setValue(p.getX());
   track.yField.setValue(p.getY());
   track.magField.setValue(p.distance(0, 0));
   double theta = Math.atan2(p.getY(), p.getX());
   track.angleField.setValue(theta);
   super.showCoordinates(vidPanel);
 }
Exemplo n.º 3
0
 /**
  * Sets the adjusting flag.
  *
  * @param adjusting true if being dragged
  */
 @Override
 public void setAdjusting(boolean adjusting) {
   super.setAdjusting(adjusting);
   track.support.firePropertyChange("adjusting", null, adjusting); // $NON-NLS-1$
 }