1 package era.mi.gui.examples;
3 import era.mi.gui.LogicUICanvas;
4 import era.mi.gui.LogicUIStandalone;
5 import era.mi.gui.model.ViewModel;
6 import era.mi.gui.model.components.GUIAndGate;
7 import era.mi.gui.model.components.GUINotGate;
8 import era.mi.gui.model.wires.GUIWire;
10 public class Playground
12 private static final int WIRE_DELAY = 10;
13 private static final int OR_DELAY = 50;
14 private static final int NOT_DELAY = 50;
16 public static void main(String[] args)
18 ViewModel model = new ViewModel();
19 LogicUIStandalone ui = new LogicUIStandalone(model);
20 addComponentsAndWires(ui.getLogicUICanvas(), model);
24 public static void addComponentsAndWires(LogicUICanvas ui, ViewModel model)
26 GUIAndGate andGate = new GUIAndGate(model);
27 andGate.moveTo(10, 10);
28 GUINotGate notGate = new GUINotGate(model);
29 notGate.moveTo(10, 40);
31 new GUIWire(model, andGate.getPins().get(0), notGate.getPins().get(1));