private void setDocument(final URL document, boolean load) throws IOException {
    final Cursor cu = switchCursor(waitc);
    try {
      log.info(document);
      final URL old = this.document;
      this.firePropertyChange("document", old, this.document = document);
      setFile(this.document);
      url.setText(this.document == null ? "{null}" : this.document.toString());
      if (!load) return;

      cm.deregister(tactics.getCurves());
      final ComputedTrajectorySet cts;
      if (this.document == null) cts = null;
      else {
        final IONode n = new JCurlSerializer().read(this.document);
        final IOTrajectories it = (IOTrajectories) n;
        final TrajectorySet ts = it.trajectories().get(0);
        cts = (ComputedTrajectorySet) ts;
      }
      change.discardAllEdits();
      if (cts != null) cts.setCurrentTime(currentTime);
      tactics.setCurves(cts);
      broomSwing.setBroom(tactics.getBroom());
      cm.register(cts);
      setModified(false);
    } finally {
      switchCursor(cu);
    }
  }
 private JCurlShotPlanner() {
   change.addUndoableEditListener(this);
   tactics.setChanger(change);
   broomSwing.setChanger(change);
   curlerSwing.setChanger(change);
   birdPiccolo.setMaster(tactics);
   // tactics.setName("tactics");
   url.setName("urlLabel");
 }