X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fexamples%2FPlayground.java;h=74da19ccfa557bf142862f771d20b61f57197476;hb=f2886cbd57dd08b797921fc2421b41bd92915799;hp=eafa1a58ec41c24b3792ea4b7db3a3a90fe4dc4c;hpb=4d29cabdc45d68b5e5f210266dc4fbc5560dbcdd;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/examples/Playground.java b/LogicUI/src/era/mi/gui/examples/Playground.java index eafa1a58..74da19cc 100644 --- a/LogicUI/src/era/mi/gui/examples/Playground.java +++ b/LogicUI/src/era/mi/gui/examples/Playground.java @@ -5,6 +5,7 @@ import era.mi.gui.LogicUIStandalone; import era.mi.gui.model.ViewModel; import era.mi.gui.model.components.GUIAndGate; import era.mi.gui.model.components.GUINotGate; +import era.mi.gui.model.wires.GUIWire; public class Playground { @@ -22,11 +23,11 @@ public class Playground public static void addComponentsAndWires(LogicUICanvas ui, ViewModel model) { - GUIAndGate andGate = ui.addComponent(new GUIAndGate(model)); + GUIAndGate andGate = new GUIAndGate(model); andGate.moveTo(10, 10); - GUINotGate notGate = ui.addComponent(new GUINotGate(model)); + GUINotGate notGate = new GUINotGate(model); notGate.moveTo(10, 40); - ui.addWire(andGate.getPins().get(0), notGate.getPins().get(1)); + new GUIWire(model, andGate.getPins().get(0), notGate.getPins().get(1)); } } \ No newline at end of file