Examples of Tool


Examples of com.cburch.logisim.tools.Tool

    }
  }
 
  Tool findTool(Tool query) {
    for (Library lib : getLibraries()) {
      Tool ret = findTool(lib, query);
      if (ret != null) return ret;
    }
    return null;
  }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

    public void mouseExited(MouseEvent e) {
      if (drag_tool != null) {
        drag_tool.mouseExited(Canvas.this, getGraphics(), e);
      } else {
        Tool tool = getToolFor(e);
        if (tool != null) {
          tool.mouseExited(Canvas.this, getGraphics(), e);
        }
      }
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

      if (drag_tool != null) {
        drag_tool.mouseReleased(Canvas.this, getGraphics(), e);
        drag_tool = null;
      }

      Tool tool = proj.getTool();
      if (tool != null) {
        tool.mouseMoved(Canvas.this, getGraphics(), e);
      }

      completeAction();
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

    }

    private Tool getToolFor(MouseEvent e) {
      if (menu_on) return null;

      Tool ret = mappings.getToolFor(e);
      if (ret == null) return proj.getTool();
      else return ret;
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

    //
    // KeyListener methods
    //
    public void keyPressed(KeyEvent e) {
      Tool tool = proj.getTool();
      if (tool != null) tool.keyPressed(Canvas.this, e);
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

    public void keyPressed(KeyEvent e) {
      Tool tool = proj.getTool();
      if (tool != null) tool.keyPressed(Canvas.this, e);
    }
    public void keyReleased(KeyEvent e) {
      Tool tool = proj.getTool();
      if (tool != null) tool.keyReleased(Canvas.this, e);
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

    public void keyReleased(KeyEvent e) {
      Tool tool = proj.getTool();
      if (tool != null) tool.keyReleased(Canvas.this, e);
    }
    public void keyTyped(KeyEvent e) {
      Tool tool = proj.getTool();
      if (tool != null) tool.keyTyped(Canvas.this, e);
    }
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

          mappings = file.getOptions().getMouseMappings();
        }
      } else if (act == ProjectEvent.ACTION_SET_TOOL) {
        viewport.setErrorMessage(null, null);
       
        Tool t = event.getTool();
        if (t == nullsetCursor(Cursor.getDefaultCursor());
        else            setCursor(t.getCursor());
      } else if (act == ProjectEvent.ACTION_SET_STATE) {
        CircuitState oldState = (CircuitState) event.getOldData();
        CircuitState newState = (CircuitState) event.getData();
        if (oldState != null && newState != null) {
          Propagator oldProp = oldState.getPropagator();
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

        if (t == proj.getCurrentCircuit() && t != null) {
          proj.setCurrentCircuit(proj.getLogisimFile().getMainCircuit());
        }
       
        if (proj.getTool() == event.getData()) {
          Tool next = findTool(proj.getLogisimFile().getOptions()
                    .getToolbarData().getContents());
          if (next == null) {
            for (Library lib : proj.getLogisimFile().getLibraries()) {
              next = findTool(lib.getTools());
              if (next != null) break;
View Full Code Here

Examples of com.cburch.logisim.tools.Tool

        }
      }
    }
   
    private Tool findTool(List<? extends Tool> opts) {
      Tool ret = null;
      for (Tool o : opts) {
        if (ret == null && o != null) ret = o;
        else if (o instanceof EditTool) ret = o;
      }
      return ret;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.