Package com.cburch.logisim.proj

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


    // The user clicked on the background. This is a rectangular
    // selection (maybe with the shift key down).
    if ((e.getModifiers() & InputEvent.SHIFT_MASK) == 0) {
      Action act = SelectionActions.dropAll(sel);
      if (act != null) {
        proj.doAction(act);
      }
    }
    setState(proj, RECT_SELECT);
    proj.repaintCanvas();
  }
View Full Code Here


            repl = result.getReplacementMap();
          } else {
            repl = null;
          }
          Selection sel = proj.getSelection();
          proj.doAction(SelectionActions.translate(sel, dx, dy, repl));
        }
      }
      moveGesture = null;
      proj.repaintCanvas();
    } else if (state == RECT_SELECT) {
View Full Code Here

      for (Component comp : circuit.getAllWithin(bds, g)) {
        if (!in_sel.contains(comp)) sel.add(comp);
      }
      Action act = SelectionActions.drop(sel, in_sel);
      if (act != null) {
        proj.doAction(act);
      }
      setState(proj, IDLE);
      proj.repaintCanvas();
    }
  }
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

        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

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.