GUIComponents now have names
[Mograsim.git] / net.mograsim.logic.ui.am2900 / src / net / mograsim / logic / ui / model / components / mi / nandbased / GUIdemux2.java
index 1f1940b..1198dde 100644 (file)
@@ -13,7 +13,12 @@ public class GUIdemux2 extends SimpleRectangularSubmodelComponent
 {
        public GUIdemux2(ViewModelModifiable model)
        {
-               super(model, 1, "GUIdemux2");
+               this(model, null);
+       }
+
+       public GUIdemux2(ViewModelModifiable model, String name)
+       {
+               super(model, 1, "GUIdemux2", name);
                setSubmodelScale(.4);
                setInputPins("S0", "S1");
                setOutputPins("Y00", "Y01", "Y10", "Y11");
@@ -89,6 +94,6 @@ public class GUIdemux2 extends SimpleRectangularSubmodelComponent
 
        static
        {
-               IndirectGUIComponentCreator.setComponentProvider(GUIdemux2.class.getCanonicalName(), (m, p) -> new GUIdemux2(m));
+               IndirectGUIComponentCreator.setComponentSupplier(GUIdemux2.class.getCanonicalName(), (m, p, n) -> new GUIdemux2(m, n));
        }
 }
\ No newline at end of file