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%2FGUIram4.java;h=da1314b28087ad911c6a987893cce83da7475dad;hb=5b66e19c7dcae146d504e9fe3899486d46c86639;hp=de4e2e7b0c1b50acef457178f5cf157e926fa76f;hpb=a393b0a2a9899707af54c9ee77a01f28ac967bd1;p=Mograsim.git diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram4.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram4.java index de4e2e7b..da1314b2 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram4.java +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/model/components/mi/nandbased/GUIram4.java @@ -15,8 +15,6 @@ import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.subcomp public class GUIram4 extends SimpleRectangularSubmodelComponent { - private StandardHighLevelStateHandler highLevelStateHandler; - public GUIram4(ViewModelModifiable model) { this(model, null); @@ -293,7 +291,7 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, andorA11.getPin("Y4"), QA4 , new Point(195, 770), new Point(195, 895), new Point(325, 895), new Point(325, 350)); //@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); @@ -317,19 +315,8 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent highLevelStateHandler.addSubcomponentHighLevelState("c1111", DelegatingSubcomponentHighLevelStateHandler::new).set(cell11, "c11"); highLevelStateHandler.addAtomicHighLevelState("q", BitVectorSplittingAtomicHighLevelStateHandler::new) - .set(Arrays.asList("c00.q", "c01.q", "c10.q", "c11.q"), Arrays.asList(16, 16, 16, 16)); - } - - @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(16, 16, 16, 16)); + setHighLevelStateHandler(highLevelStateHandler); } static