Package com.cburch.logisim.proj

Examples of com.cburch.logisim.proj.Project.doAction()


      caretCircuit = null;
      caretComponent = null;
      caretCreatingText = false;
      caret = null;
     
      if (a != null) proj.doAction(a);
    }

    public void circuitChanged(CircuitEvent event) {
      if (event.getCircuit() != caretCircuit) {
        event.getCircuit().removeCircuitListener(this);
View Full Code Here


    Tool next = determineNext(proj);
    if (next != null) {
      proj.setTool(next);
      Action act = SelectionActions.dropAll(canvas.getSelection());
      if (act != null) {
        proj.doAction(act);
      }
      if (added != null) canvas.getSelection().add(added);
    }
  }
 
View Full Code Here

 
  @Override
  public void cut() {
    Project proj = frame.getProject();
    Selection sel = frame.getCanvas().getSelection();
    proj.doAction(SelectionActions.cut(sel));
  }
 
  @Override
  public void copy() {
    Project proj = frame.getProject();
View Full Code Here

 
  @Override
  public void copy() {
    Project proj = frame.getProject();
    Selection sel = frame.getCanvas().getSelection();
    proj.doAction(SelectionActions.copy(sel));
  }
 
  @Override
  public void paste() {
    Project proj = frame.getProject();
View Full Code Here

    Project proj = frame.getProject();
    Selection sel = frame.getCanvas().getSelection();
    selectSelectTool(proj);
    Action action = SelectionActions.pasteMaybe(proj, sel);
    if (action != null) {
      proj.doAction(action);
    }
  }
 
  @Override
  public void delete() {
View Full Code Here

 
  @Override
  public void delete() {
    Project proj = frame.getProject();
    Selection sel = frame.getCanvas().getSelection();
    proj.doAction(SelectionActions.clear(sel));
  }
 
  @Override
  public void duplicate() {
    Project proj = frame.getProject();
View Full Code Here

 
  @Override
  public void duplicate() {
    Project proj = frame.getProject();
    Selection sel = frame.getCanvas().getSelection();
    proj.doAction(SelectionActions.duplicate(sel));
  }

  @Override
  public void selectAll() {
    Project proj = frame.getProject();
View Full Code Here

      } else if (src == LogisimMenuBar.VIEW_TOOLBOX) {
        frame.setExplorerView(Frame.VIEW_TOOLBOX);
      } else if (src == LogisimMenuBar.VIEW_SIMULATION) {
        frame.setExplorerView(Frame.VIEW_SIMULATION);
      } else if (src == LogisimMenuBar.REVERT_APPEARANCE) {
        proj.doAction(new RevertAppearanceAction(cur));
      } else if (src == LogisimMenuBar.ANALYZE_CIRCUIT) {
        ProjectCircuitActions.doAnalyze(proj, cur);
      } else if (src == LogisimMenuBar.CIRCUIT_STATS) {
        StatisticsDialog.show(frame, proj.getLogisimFile(), cur);
      }
View Full Code Here

        proj.repaintCanvas();
        return;
      } else {
        Action act = SelectionActions.drop(sel, in_sel);
        if (act != null) {
          proj.doAction(act);
        }
      }
    }

    // if the user clicks into a component outside selection, user
View Full Code Here

    if (!clicked.isEmpty()) {
      if ((e.getModifiers() & InputEvent.SHIFT_MASK) == 0) {
        if (sel.getComponentsContaining(start).isEmpty()) {
          Action act = SelectionActions.dropAll(sel);
          if (act != null) {
            proj.doAction(act);
          }
        }
      }
      for (Component comp : clicked) {
        if (!in_sel.contains(comp)) {
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.