add image property in xml loader 62/14062/2
Antoine ELIAS [Tue, 18 Mar 2014 13:46:01 +0000 (14:46 +0100)]
Change-Id: I607defff0e8dad6f89d818c157ca6f02a3e88898

scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/GOBuilder.java

index b5a40ed..30d6593 100644 (file)
@@ -1,7 +1,8 @@
 package org.scilab.modules.graphic_objects.xmlloader;
 
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_BORDER_OPT_PADDING__;
-import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_FOREGROUNDCOLOR__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_IMAGE__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_AXES_SIZE__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_CALLBACKTYPE__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_FOREGROUNDCOLOR__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_BORDER_OPT_PADDING__;
@@ -428,6 +429,14 @@ public class GOBuilder {
                     }
                     break;
                 }
+                case __GO_UI_IMAGE__: {
+                    String[] text = new String[1];
+                    text[0] = xmlAttributes.get("image");
+                    if (text[0] != null) {
+                        controller.setProperty(uic, __GO_UI_STRING__, text);
+                    }
+                    break;
+                }
                 case __GO_UI_CHECKBOX__: {
                     String[] text = new String[1];
                     text[0] = xmlAttributes.get("text");