Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / GUIAndGate.java
index 716d210..adba60f 100644 (file)
@@ -1,6 +1,9 @@
 package net.mograsim.logic.ui.model.components;
 
+import net.mograsim.logic.core.components.gates.AndGate;
 import net.mograsim.logic.ui.model.ViewModelModifiable;
+import net.mograsim.logic.ui.modeladapter.ViewLogicModelAdapter;
+import net.mograsim.logic.ui.modeladapter.componentadapters.SimpleGateAdapter;
 
 public class GUIAndGate extends SimpleRectangularGUIGate
 {
@@ -9,4 +12,9 @@ public class GUIAndGate extends SimpleRectangularGUIGate
                super(model, logicWidth, "&", false);
                setInputCount(2);// TODO make variable
        }
+
+       static
+       {
+               ViewLogicModelAdapter.addComponentAdapter(new SimpleGateAdapter<>(GUIAndGate.class, AndGate::new));
+       }
 }
\ No newline at end of file