X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIram2.java;h=2f45cb7d104b0648d05d7cbf3ae72e0061ca755d;hb=5b66e19c7dcae146d504e9fe3899486d46c86639;hp=6a01d5344d37356d059352d3c81ac894fab433bf;hpb=c5c0d07286a29994a11ba8b01eaffb21964b6c1b;p=Mograsim.git diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram2.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram2.java index 6a01d534..2f45cb7d 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram2.java +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram2.java @@ -15,8 +15,6 @@ import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.subcomp public class GUIram2 extends SimpleRectangularSubmodelComponent { - private StandardHighLevelStateHandler highLevelStateHandler; - public GUIram2(ViewModelModifiable model) { this(model, null); @@ -285,25 +283,14 @@ public class GUIram2 extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, andorB11.getPin("Y4"), QB4 , new Point(175, 770), new Point(175, 895), new Point(340, 895), new Point(340, 750)); //@formatter:on - this.highLevelStateHandler = new StandardHighLevelStateHandler(this); + StandardHighLevelStateHandler highLevelStateHandler = new StandardHighLevelStateHandler(this); highLevelStateHandler.addSubcomponentHighLevelState("c00", DelegatingSubcomponentHighLevelStateHandler::new).set(cell00, null); highLevelStateHandler.addSubcomponentHighLevelState("c01", DelegatingSubcomponentHighLevelStateHandler::new).set(cell01, null); highLevelStateHandler.addSubcomponentHighLevelState("c10", DelegatingSubcomponentHighLevelStateHandler::new).set(cell10, null); highLevelStateHandler.addSubcomponentHighLevelState("c11", DelegatingSubcomponentHighLevelStateHandler::new).set(cell11, null); highLevelStateHandler.addAtomicHighLevelState("q", BitVectorSplittingAtomicHighLevelStateHandler::new) - .set(Arrays.asList("c00.q", "c01.q", "c10.q", "c11.q"), Arrays.asList(4, 4, 4, 4)); - } - - @Override - public Object getHighLevelState(String stateID) - { - return highLevelStateHandler.getHighLevelState(stateID); - } - - @Override - public void setHighLevelState(String stateID, Object newState) - { - highLevelStateHandler.setHighLevelState(stateID, newState); + .set(Arrays.asList("c11.q", "c10.q", "c01.q", "c00.q"), Arrays.asList(4, 4, 4, 4)); + setHighLevelStateHandler(highLevelStateHandler); } static