(double x, double y)
| 82 | } |
| 83 | |
| 84 | @Override |
| 85 | public void setXY(double x, double y) { |
| 86 | double x0 = this.x, y0 = this.y; // save current value |
| 87 | super.setXY(x, y); // set value |
| 88 | double dx = this.x - x0, dy = this.y - y0; |
| 89 | for (int i = 0, n = cluster.size(); i < n; i++) { |
| 90 | AbstractTrajectory t = cluster.get(i); |
| 91 | if (t != this) { |
| 92 | t.setX(t.getX() + dx); |
| 93 | t.setY(t.getY() + dy); |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Displays the shell particle's initial conditions in an editor. |