Made comments about @SuppressWarnings uniform
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / examples / SubmodelExample.java
1 package net.mograsim.logic.ui.examples;
2
3 import net.mograsim.logic.ui.SimpleLogicUIStandalone;
4 import net.mograsim.logic.ui.model.ViewModelModifiable;
5 import net.mograsim.logic.ui.model.components.GUIBitDisplay;
6 import net.mograsim.logic.ui.model.components.GUIManualSwitch;
7 import net.mograsim.logic.ui.model.components.TestSubmodelNANDComponent;
8 import net.mograsim.logic.ui.model.wires.GUIWire;
9
10 public class SubmodelExample
11 {
12         public static void main(String[] args)
13         {
14                 SimpleLogicUIStandalone.executeVisualisation(SubmodelExample::createSubmodelExample);
15         }
16
17         @SuppressWarnings("unused") // for GUIWires being created
18         public static void createSubmodelExample(ViewModelModifiable model)
19         {
20                 GUIManualSwitch swA = new GUIManualSwitch(model);
21                 swA.moveTo(0, 0);
22                 GUIManualSwitch swB = new GUIManualSwitch(model);
23                 swB.moveTo(0, 25);
24                 TestSubmodelNANDComponent nand = new TestSubmodelNANDComponent(model);
25                 nand.moveTo(30, 10);
26                 GUIBitDisplay bdY = new GUIBitDisplay(model);
27                 bdY.moveTo(70, 12.5);
28
29                 new GUIWire(model, swA.getOutputPin(), nand.getPins().get(0));
30                 new GUIWire(model, swB.getOutputPin(), nand.getPins().get(1));
31                 new GUIWire(model, nand.getPins().get(2), bdY.getInputPin());
32         }
33 }