Пример #1
0
 /** Handles mouse up events. The events are forwarded to the current tracker. */
 public void mouseUp(MouseEvent e, int x, int y) {
   view().unfreezeView();
   if (fChild != null) { // JDK1.1 doesn't guarantee mouseDown, mouseDrag, mouseUp
     fChild.mouseUp(e, x, y);
     fChild.deactivate();
     fChild = null;
   }
 }
Пример #2
0
 /**
  * Sets the active Tool for this EditDomain. If a current Tool is active, it is deactivated. The
  * new Tool is told its EditDomain, and is activated.
  *
  * @param tool the Tool
  */
 public void setActiveTool(Tool tool) {
   if (activeTool != null) activeTool.deactivate();
   activeTool = tool;
   if (activeTool != null) {
     activeTool.setEditDomain(this);
     activeTool.activate();
   }
 }
Пример #3
0
 private void setTool(Tool t, String name) {
   if (fTool != null) {
     fTool.deactivate();
   }
   fTool = t;
   if (fTool != null) {
     showStatus(name);
     fTool.activate();
   }
 }
Пример #4
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);
   }
 }
Пример #5
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();
  }
Пример #6
0
 public void deactivate(DrawingEditor editor) {
   super.deactivate(editor);
   tracker.deactivate(editor);
 }