Package com.cburch.logisim.tools

Examples of com.cburch.logisim.tools.SetAttributeAction


      throws AttrTableSetException {
    if (!proj.getLogisimFile().contains(circ)) {
      String msg = Strings.get("cannotModifyCircuitError");
      throw new AttrTableSetException(msg);
    } else {
      SetAttributeAction act = new SetAttributeAction(circ,
          Strings.getter("changeAttributeAction"));
      act.set(comp, attr, value);
      proj.doAction(act);
    }
  }
View Full Code Here


    Circuit circuit = frame.getCanvas().getCircuit();
    if (selection.isEmpty() && circuit != null) {
      AttrTableCircuitModel circuitModel = new AttrTableCircuitModel(project, circuit);
      circuitModel.setValueRequested(attr, value);
    } else {
      SetAttributeAction act = new SetAttributeAction(circuit,
          Strings.getter("selectionAttributeAction"));
      for (Component comp : selection.getComponents()) {
        if (!(comp instanceof Wire)) {
          act.set(comp, attr, value);
        }
      }
      project.doAction(act);
    }
  }
View Full Code Here

    }
  }
 
  public Action getCommitAction(Circuit circuit, String oldText,
      String newText) {
    SetAttributeAction act = new SetAttributeAction(circuit,
        Strings.getter("changeLabelAction"));
    act.set(comp, labelAttr, newText);
    return act;
  }
View Full Code Here

    }

    @Override
    public Action getCommitAction(Circuit circuit, String oldText,
            String newText) {
        SetAttributeAction act = new SetAttributeAction(circuit,
                getFromLocale("changeLabelAction"));
        act.set(comp, labelAttr, newText);
        return act;
    }
View Full Code Here

            throws AttrTableSetException {
        if (!proj.getLogisimFile().contains(circ)) {
            String msg = getFromLocale("cannotModifyCircuitError");
            throw new AttrTableSetException(msg);
        } else {
            SetAttributeAction act = new SetAttributeAction(circ,
                    getFromLocale("changeAttributeAction"));
            act.set(comp, attr, value);
            proj.doAction(act);
        }
    }
View Full Code Here

        Circuit circuit = frame.getCanvas().getCircuit();
        if (selection.isEmpty() && circuit != null) {
            AttrTableCircuitModel circuitModel = new AttrTableCircuitModel(project, circuit);
            circuitModel.setValueRequested(attr, value);
        } else {
            SetAttributeAction act = new SetAttributeAction(circuit,
                    getFromLocale("selectionAttributeAction"));
            for (Component comp : selection.getComponents()) {
                if (!(comp instanceof Wire)) {
                    act.set(comp, attr, value);
                }
            }
            project.doAction(act);
        }
    }
View Full Code Here

TOP

Related Classes of com.cburch.logisim.tools.SetAttributeAction

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.