GUIComponents now serialize and deserialize parameters (where needed)
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / atomic / GUIManualSwitch.java
index 5ab078a..285cd16 100644 (file)
@@ -17,6 +17,7 @@ import net.mograsim.logic.ui.model.components.GUIComponent;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.modeladapter.ViewLogicModelAdapter;
 import net.mograsim.logic.ui.modeladapter.componentadapters.ManualSwitchAdapter;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 import net.mograsim.preferences.Preferences;
 
 public class GUIManualSwitch extends GUIComponent
@@ -137,5 +138,6 @@ public class GUIManualSwitch extends GUIComponent
        static
        {
                ViewLogicModelAdapter.addComponentAdapter(new ManualSwitchAdapter());
+               IndirectGUIComponentCreator.setComponentProvider(GUIManualSwitch.class.getName(), (m, p) -> new GUIManualSwitch(m));
        }
 }
\ No newline at end of file