Updated to new SWTHelper version
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / atomic / TextComponent.java
index d864904..ca484d0 100644 (file)
@@ -22,7 +22,12 @@ public class TextComponent extends GUIComponent
 \r
        public TextComponent(ViewModelModifiable model, String text)\r
        {\r
-               super(model);\r
+               this(model, text, null);\r
+       }\r
+\r
+       public TextComponent(ViewModelModifiable model, String text, String name)\r
+       {\r
+               super(model, name);\r
                this.text = text;\r
                // If size is unset, it defaults to 0, which could prohibit this component from being rendered, which would prohibit the size being\r
                // set to a better guess\r
@@ -52,6 +57,7 @@ public class TextComponent extends GUIComponent
        static\r
        {\r
                ViewLogicModelAdapter.addComponentAdapter(new NoLogicAdapter<>(TextComponent.class));\r
-               IndirectGUIComponentCreator.setComponentProvider(TextComponent.class.getName(), (m, p) -> new TextComponent(m, p.getAsString()));\r
+               IndirectGUIComponentCreator.setComponentSupplier(TextComponent.class.getName(),\r
+                               (m, p, n) -> new TextComponent(m, p.getAsString(), n));\r
        }\r
 }\r