From 91aa124db32be30fdf0294285512fcdc6223d728 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Wed, 5 Jun 2019 19:18:50 +0200 Subject: [PATCH 1/1] Removed obsolete classes SubmodelExample and TestSubmodelNANDComponent --- .../logic/ui/examples/SubmodelExample.java | 33 ------------------ .../components/TestSubmodelNANDComponent.java | 34 ------------------- 2 files changed, 67 deletions(-) delete mode 100644 net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelExample.java delete mode 100644 net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TestSubmodelNANDComponent.java diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelExample.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelExample.java deleted file mode 100644 index e4b515a9..00000000 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelExample.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.mograsim.logic.ui.examples; - -import net.mograsim.logic.ui.SimpleLogicUIStandalone; -import net.mograsim.logic.ui.model.ViewModelModifiable; -import net.mograsim.logic.ui.model.components.GUIBitDisplay; -import net.mograsim.logic.ui.model.components.GUIManualSwitch; -import net.mograsim.logic.ui.model.components.TestSubmodelNANDComponent; -import net.mograsim.logic.ui.model.wires.GUIWire; - -public class SubmodelExample -{ - public static void main(String[] args) - { - SimpleLogicUIStandalone.executeVisualisation(SubmodelExample::createSubmodelExample); - } - - @SuppressWarnings("unused") // for GUIWires being created - public static void createSubmodelExample(ViewModelModifiable model) - { - GUIManualSwitch swA = new GUIManualSwitch(model); - swA.moveTo(0, 0); - GUIManualSwitch swB = new GUIManualSwitch(model); - swB.moveTo(0, 25); - TestSubmodelNANDComponent nand = new TestSubmodelNANDComponent(model); - nand.moveTo(30, 10); - GUIBitDisplay bdY = new GUIBitDisplay(model); - bdY.moveTo(70, 12.5); - - new GUIWire(model, swA.getOutputPin(), nand.getPins().get(0)); - new GUIWire(model, swB.getOutputPin(), nand.getPins().get(1)); - new GUIWire(model, nand.getPins().get(2), bdY.getInputPin()); - } -} \ No newline at end of file diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TestSubmodelNANDComponent.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TestSubmodelNANDComponent.java deleted file mode 100644 index 0c84f4f5..00000000 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TestSubmodelNANDComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.mograsim.logic.ui.model.components; - -import net.mograsim.logic.ui.model.ViewModelModifiable; -import net.mograsim.logic.ui.model.wires.GUIWire; -import net.mograsim.logic.ui.model.wires.Pin; - -public class TestSubmodelNANDComponent extends SubmodelComponent -{ - public TestSubmodelNANDComponent(ViewModelModifiable model) - { - super(model, "TestNAND"); - setSize(30, 20); - setSubmodelScale(.5); - initSubmodelComponents(); - } - - @SuppressWarnings("unused") // for GUIWires being created - private void initSubmodelComponents() - { - Pin A = addSubmodelInterface(1, 0, 5); - Pin B = addSubmodelInterface(1, 0, 15); - Pin Y = addSubmodelInterface(1, 30, 10); - - GUIAndGate and = new GUIAndGate(submodelModifiable, 1); - and.moveTo(5, 10); - GUINotGate not = new GUINotGate(submodelModifiable, 1); - not.moveTo(30, 15); - - new GUIWire(submodelModifiable, A, and.getInputPins().get(0)); - new GUIWire(submodelModifiable, B, and.getInputPins().get(1)); - new GUIWire(submodelModifiable, and.getOutputPin(), not.getInputPins().get(0)); - new GUIWire(submodelModifiable, not.getOutputPin(), Y); - } -} \ No newline at end of file -- 2.17.1