예제 #1
0
 protected void setTracker(Tool newTracker) {
   if (tracker != null) {
     tracker.deactivate(getEditor());
     tracker.removeToolListener(this);
   }
   tracker = newTracker;
   if (tracker != null) {
     tracker.activate(getEditor());
     tracker.addToolListener(this);
   }
 }
예제 #2
0
  public void toolDone(ToolEvent event) {
    // Empty
    Tool newTracker = getSelectAreaTracker();

    if (newTracker != null) {
      if (tracker != null) {
        tracker.deactivate(getEditor());
        tracker.removeToolListener(this);
      }
      tracker = newTracker;
      tracker.activate(getEditor());
      tracker.addToolListener(this);
    }
    fireToolDone();
  }