Package com.cburch.logisim.circuit

Examples of com.cburch.logisim.circuit.CircuitMutation


            boolean isEmpty = (val == null || val.equals(""));
            Action a;
            Project proj = caretCanvas.getProject();
            if (caretCreatingText) {
                if (!isEmpty) {
                    CircuitMutation xn = new CircuitMutation(caretCircuit);
                    xn.add(caretComponent);
                    a = xn.toAction(getFromLocale("addComponentAction",
                            Text.FACTORY.getDisplayGetter()));
                } else {
                    // don't add the blank text field
                    a = null;
                }
            } else {
                if (isEmpty && caretComponent.getFactory() instanceof Text) {
                    CircuitMutation xn = new CircuitMutation(caretCircuit);
                    xn.add(caretComponent);
                    a = xn.toAction(getFromLocale("removeComponentAction",
                            Text.FACTORY.getDisplayGetter()));
                } else {
                    Object obj = caretComponent.getFeature(TextEditable.class);
                    // should never happen
                    if (obj == null) {
View Full Code Here


        }

        @Override
        public void doIt(Project proj) {
            Circuit circuit = proj.getCurrentCircuit();
            CircuitMutation xn = new CircuitMutation(circuit);
            for (Component comp : drops) {
                sel.remove(xn, comp);
            }
            CircuitTransactionResult result = xn.execute();
            xnReverse = result.getReverseTransaction();
        }
View Full Code Here

TOP

Related Classes of com.cburch.logisim.circuit.CircuitMutation

Copyright © 2018 www.massapicom. 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.