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