use of com.cburch.logisim.gui.generic.AttrTableSetException in project logisim-evolution by reds-heig.
the class AttrTableCircuitModel method setValueRequested.
@Override
public void setValueRequested(Attribute<Object> attr, Object value) throws AttrTableSetException {
if (!proj.getLogisimFile().contains(circ)) {
String msg = Strings.get("cannotModifyCircuitError");
throw new AttrTableSetException(msg);
} else {
CircuitMutation xn = new CircuitMutation(circ);
xn.setForCircuit(attr, value);
proj.doAction(xn.toAction(Strings.getter("changeCircuitAttrAction")));
}
}
use of com.cburch.logisim.gui.generic.AttrTableSetException in project logisim-evolution by reds-heig.
the class AttrTableComponentModel method setValueRequested.
@Override
public void setValueRequested(Attribute<Object> attr, Object value) 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);
}
}
Aggregations