Package com.cburch.logisim.circuit

Examples of com.cburch.logisim.circuit.CircuitMutation.execute()


        @Override
        public void doIt(Project proj) {
            Circuit circuit = proj.getCurrentCircuit();
            CircuitMutation xn = new CircuitMutation(circuit);
            sel.dropAll(xn);
            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }

        @Override
        public void undo(Project proj) {
View Full Code Here


        @Override
        public void doIt(Project proj) {
            Circuit circuit = proj.getCurrentCircuit();
            CircuitMutation xn = new CircuitMutation(circuit);
            sel.deleteAllHelper(xn);
            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }

        @Override
        public void undo(Project proj) {
View Full Code Here

        public void doIt(Project proj) {
            Circuit circuit = proj.getCurrentCircuit();
            CircuitMutation xn = new CircuitMutation(circuit);
            sel.duplicateHelper(xn);

            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
            after = SelectionSave.create(sel);
        }

        @Override
View Full Code Here

            CircuitMutation xn = new CircuitMutation(circuit);
            Collection<Component> comps = clip.getComponents();
            Collection<Component> toAdd = computeAdditions(comps);
            if (toAdd.size() > 0) {
                sel.pasteHelper(xn, toAdd);
                CircuitTransactionResult result = xn.execute();
                xnReverse = result.getReverseTransaction();
                after = SelectionSave.create(sel);
            } else {
                xnReverse = null;
            }
View Full Code Here

            sel.translateHelper(xn, dx, dy);
            if (replacements != null) {
                xn.replace(replacements);
            }

            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }

        @Override
        public void undo(Project proj) {
View Full Code Here

                compAttrs.setValue(attr, value);
            }
        }

        if (!xn.isEmpty()) {
            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }
    }

    @Override
View Full Code Here

            Circuit circuit = proj.getCurrentCircuit();
            CircuitMutation xn = new CircuitMutation(circuit);
            for (Component comp : drops) {
                sel.remove(xn, comp);
            }
            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }

        @Override
        public void undo(Project proj) {
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.