GUIComponents now have names
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / atomic / GUINotGate.java
index 6f1acd4..fdab22c 100644 (file)
@@ -10,13 +10,19 @@ public class GUINotGate extends SimpleRectangularGUIGate
 {
        public GUINotGate(ViewModelModifiable model, int logicWidth)
        {
-               super(model, logicWidth, "1", true);
+               this(model, logicWidth, null);
+       }
+
+       public GUINotGate(ViewModelModifiable model, int logicWidth, String name)
+       {
+               super(model, "1", true, logicWidth, name);
                setInputCount(1);
        }
 
        static
        {
                ViewLogicModelAdapter.addComponentAdapter(new SimpleGateAdapter<>(GUINotGate.class, (t, p, o, i) -> new NotGate(t, p, i[0], o)));
-               IndirectGUIComponentCreator.setComponentSupplier(GUINotGate.class.getCanonicalName(), (m, p) -> new GUINotGate(m, p.getAsInt()));
+               IndirectGUIComponentCreator.setComponentSupplier(GUINotGate.class.getCanonicalName(),
+                               (m, p, n) -> new GUINotGate(m, p.getAsInt(), n));
        }
 }
\ No newline at end of file