use of com.cburch.logisim.circuit.CircuitState in project logisim-evolution by reds-heig.
the class ComponentSelector method setLogModel.
public void setLogModel(Model value) {
this.logModel = value;
DefaultTreeModel model = (DefaultTreeModel) getModel();
CircuitNode curRoot = (CircuitNode) model.getRoot();
CircuitState state = logModel == null ? null : logModel.getCircuitState();
if (state == null) {
if (curRoot != null)
model.setRoot(null);
return;
}
if (curRoot == null || curRoot.circuitState != state) {
curRoot = new CircuitNode(null, state, null);
model.setRoot(curRoot);
}
}
Aggregations