Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / GUINotGate.java
index 76d2450..f439f89 100644 (file)
@@ -1,6 +1,9 @@
 package net.mograsim.logic.ui.model.components;
 
+import net.mograsim.logic.core.components.gates.NotGate;
 import net.mograsim.logic.ui.model.ViewModelModifiable;
+import net.mograsim.logic.ui.modeladapter.ViewLogicModelAdapter;
+import net.mograsim.logic.ui.modeladapter.componentadapters.SimpleGateAdapter;
 
 public class GUINotGate extends SimpleRectangularGUIGate
 {
@@ -9,4 +12,9 @@ public class GUINotGate extends SimpleRectangularGUIGate
                super(model, logicWidth, "1", true);
                setInputCount(1);
        }
+
+       static
+       {
+               ViewLogicModelAdapter.addComponentAdapter(new SimpleGateAdapter<>(GUINotGate.class, (t, p, o, i) -> new NotGate(t, p, i[0], o)));
+       }
 }
\ No newline at end of file