Exemple #1
0
  @Override
  public void setProperties(Property[] properties) {
    super.setProperties(properties);

    for (Property p : properties) {

      if (p.getName().equals("Duration")) {
        setDuration((Integer) p.getValue());
        continue;
      }

      if (p.getName().equals("Speed")) {
        setSpeed((Double) p.getValue());
        continue;
      }

      if (p.getName().equalsIgnoreCase("Speed Units")) {
        setSpeedUnits((String) p.getValue());
        continue;
      }

      if (p.getName().equals("Radius")) {
        setRadius((Double) p.getValue());
        continue;
      }
    }
  }
Exemple #2
0
 @Override
 public Object clone() {
   StationKeeping l = new StationKeeping();
   super.clone(l);
   l.setDuration(getDuration());
   l.setManeuverLocation(getManeuverLocation().clone());
   l.setRadius(getRadius());
   l.setSpeed(getSpeed());
   l.setSpeedUnits(getSpeedUnits());
   return l;
 }
Exemple #3
0
 @Override
 public void paintOnMap(Graphics2D g2d, PlanElement planElement, StateRenderer2D renderer) {
   super.paintOnMap(g2d, planElement, renderer);
   AffineTransform at = g2d.getTransform();
   // x marks the spot...
   g2d.drawLine(-4, -4, 4, 4);
   g2d.drawLine(-4, 4, 4, -4);
   double radius = this.getRadius() * renderer.getZoom();
   g2d.setColor(new Color(255, 255, 255, 100));
   g2d.fill(new Ellipse2D.Double(-radius, -radius, radius * 2, radius * 2));
   g2d.setColor(Color.RED);
   g2d.draw(new Ellipse2D.Double(-radius, -radius, radius * 2, radius * 2));
   g2d.setTransform(at);
 }
Exemple #4
0
  public Object clone() {

    Unconstrained u = new Unconstrained();
    super.clone(u);
    return u;
  }