add title_position and title_scroll in tab uicontrol 88/13588/3
Antoine ELIAS [Wed, 29 Jan 2014 09:02:37 +0000 (10:02 +0100)]
Change-Id: I178ce5889179914834ea852c899e8f7db3dd0493

18 files changed:
scilab/modules/graphic_objects/includes/graphicObjectProperties.h
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicObject/GraphicObjectProperties.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/uicontrol/Uicontrol.java
scilab/modules/graphic_objects/src/scripts/propertiesMap.properties
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/graphics/graphics.vcxproj
scilab/modules/graphics/graphics.vcxproj.filters
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/TitlePositionType.h [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/get_tabtitle_property.c [new file with mode: 0644]
scilab/modules/graphics/src/c/getHandleProperty/setHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c [new file with mode: 0644]
scilab/modules/gui/sci_gateway/c/sci_uicontrol.c
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/tab/SwingScilabTabGroup.java

index f967fb6..0fea149 100755 (executable)
 #define __GO_UI_FRAME_BORDER_POSITION__ 366
 #define __GO_UI_FRAME_BORDER_STYLE__ 367
 #define __GO_UI_GROUP_NAME__ 368
+#define __GO_UI_TITLE_POSITION__ 369
+#define __GO_UI_TITLE_SCROLL__ 370
 
 #endif /* !__GRAPHIC_OBJECT_PROPERTIES_H__ */
index 8dd8ee5..0cbb4c0 100755 (executable)
@@ -389,5 +389,7 @@ public class GraphicObjectProperties {
     public static final int __GO_UI_FRAME_BORDER_POSITION__ = 366;
     public static final int __GO_UI_FRAME_BORDER_STYLE__ = 367;
     public static final int __GO_UI_GROUP_NAME__ = 368;
+    public static final int __GO_UI_TITLE_POSITION__ = 369;
+    public static final int __GO_UI_TITLE_SCROLL__ = 370;
 
 }
index feb9045..21e0a52 100644 (file)
@@ -67,6 +67,8 @@ import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProp
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_VALUE_SIZE__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_VALUE__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_VERTICALALIGNMENT__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_TITLE_POSITION__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_TITLE_SCROLL__;
 
 import java.util.Arrays;
 import java.util.StringTokenizer;
@@ -81,6 +83,23 @@ import org.scilab.modules.graphic_objects.utils.LayoutType;
  */
 public class Uicontrol extends GraphicObject {
 
+    public enum TitlePositionType {
+        TOP, LEFT, BOTTOM, RIGHT;
+        public static TitlePositionType intToEnum(Integer value) {
+            switch (value) {
+                case 0:
+                    return TOP;
+                case 1:
+                    return LEFT;
+                default:
+                case 2:
+                    return BOTTOM;
+                case 3:
+                    return RIGHT;
+            }
+        }
+    }
+
     public enum BorderLayoutType {
         SOUTH, NORTH, CENTER, WEST, EAST;
         public static BorderLayoutType intToEnum(Integer value) {
@@ -300,6 +319,9 @@ public class Uicontrol extends GraphicObject {
     /** groupname for radiobutton */
     private String groupName = "";
 
+    /** tab properties */
+    private Boolean titleScroll = false;
+    private TitlePositionType titlePosition = TitlePositionType.TOP;
     /**
      * All uicontrol properties
      */
@@ -345,7 +367,9 @@ public class Uicontrol extends GraphicObject {
         GRIDOPT_PADDING,
         BORDEROPT_PADDING,
         FRAMEBORDER,
-        GROUPNAME
+        GROUPNAME,
+        TITLE_POSITION,
+        TITLE_SCROLL
     };
 
     /**
@@ -548,6 +572,10 @@ public class Uicontrol extends GraphicObject {
                 return UicontrolProperty.FRAMEBORDER;
             case __GO_UI_GROUP_NAME__:
                 return UicontrolProperty.GROUPNAME;
+            case __GO_UI_TITLE_POSITION__:
+                return UicontrolProperty.TITLE_POSITION;
+            case __GO_UI_TITLE_SCROLL__:
+                return UicontrolProperty.TITLE_SCROLL;
             default :
                 return super.getPropertyFromName(propertyName);
         }
@@ -639,6 +667,10 @@ public class Uicontrol extends GraphicObject {
             return getFrameBorder();
         } else if (property == UicontrolProperty.GROUPNAME) {
             return getGroupName();
+        } else if (property == UicontrolProperty.TITLE_POSITION) {
+            return getTitlePosition();
+        } else if (property == UicontrolProperty.TITLE_SCROLL) {
+            return getTitleScroll();
         } else {
             return super.getProperty(property);
         }
@@ -727,15 +759,19 @@ public class Uicontrol extends GraphicObject {
                 return setFrameBorder((Integer) value);
             case GROUPNAME:
                 return setGroupName((String) value);
+            case TITLE_POSITION:
+                return setTitlePosition((Integer) value);
+            case TITLE_SCROLL:
+                return setTitleScroll((Boolean) value);
             default:
                 return super.setProperty(property, value);
         }
     }
 
     /**
-     * Get the style
-     * @return the style
-     */
+         * Get the style
+         * @return the style
+         */
     public Integer getStyle() {
         return styleEnumToInt(this.style);
     }
@@ -1327,6 +1363,42 @@ public class Uicontrol extends GraphicObject {
         return UpdateStatus.Success;
     }
 
+    public Boolean getTitleScroll() {
+        return titleScroll;
+    }
+
+    public UpdateStatus setTitleScroll(Boolean value) {
+        if (titleScroll == value) {
+            return UpdateStatus.NoChange;
+        }
+
+        titleScroll = value;
+        return UpdateStatus.Success;
+    }
+
+    public Integer getTitlePosition() {
+        return titlePosition.ordinal();
+    }
+
+    public TitlePositionType getTitlePositionAsEnum() {
+        return titlePosition;
+    }
+
+
+    public UpdateStatus setTitlePosition(Integer value) {
+        return setTitlePosition(TitlePositionType.intToEnum(value));
+    }
+
+    public UpdateStatus setTitlePosition(TitlePositionType value) {
+        if (titlePosition == value) {
+            return UpdateStatus.NoChange;
+        }
+
+        titlePosition = value;
+        return UpdateStatus.Success;
+    }
+
+
     public void accept(Visitor visitor) {
     }
 }
index a9d1453..9144199 100755 (executable)
@@ -418,4 +418,6 @@ __GO_UI_FRAME_BORDER_SHADOW_OUT__
 __GO_UI_FRAME_BORDER_TITLE__
 __GO_UI_FRAME_BORDER_POSITION__
 __GO_UI_FRAME_BORDER_STYLE__
-__GO_UI_GROUP_NAME__
\ No newline at end of file
+__GO_UI_GROUP_NAME__
+__GO_UI_TITLE_POSITION__
+__GO_UI_TITLE_SCROLL__
index 1ea90f5..23e6663 100644 (file)
@@ -337,6 +337,8 @@ src/c/getHandleProperty/get_borders_property.c \
 src/c/getHandleProperty/set_borders_property.c \
 src/c/getHandleProperty/get_groupname_property.c \
 src/c/getHandleProperty/set_groupname_property.c \
+src/c/getHandleProperty/get_tabtitle_property.c \
+src/c/getHandleProperty/set_tabtitle_property.c \
 src/c/DefaultCommandArg.c \
 src/c/Axes.c \
 src/c/sciMatrix.c \
index f70196c..f549ce6 100644 (file)
@@ -484,6 +484,8 @@ am__objects_1 = src/c/libscigraphics_algo_la-GetCommandArg.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-set_borders_property.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-get_groupname_property.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-set_groupname_property.lo \
+       src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo \
+       src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo \
        src/c/libscigraphics_algo_la-DefaultCommandArg.lo \
        src/c/libscigraphics_algo_la-Axes.lo \
        src/c/libscigraphics_algo_la-sciMatrix.lo \
@@ -1270,6 +1272,8 @@ src/c/getHandleProperty/get_borders_property.c \
 src/c/getHandleProperty/set_borders_property.c \
 src/c/getHandleProperty/get_groupname_property.c \
 src/c/getHandleProperty/set_groupname_property.c \
+src/c/getHandleProperty/get_tabtitle_property.c \
+src/c/getHandleProperty/set_tabtitle_property.c \
 src/c/DefaultCommandArg.c \
 src/c/Axes.c \
 src/c/sciMatrix.c \
@@ -2565,6 +2569,12 @@ src/c/getHandleProperty/libscigraphics_algo_la-get_groupname_property.lo:  \
 src/c/getHandleProperty/libscigraphics_algo_la-set_groupname_property.lo:  \
        src/c/getHandleProperty/$(am__dirstamp) \
        src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
+src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo:  \
+       src/c/getHandleProperty/$(am__dirstamp) \
+       src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
+src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo:  \
+       src/c/getHandleProperty/$(am__dirstamp) \
+       src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigraphics_algo_la-DefaultCommandArg.lo:  \
        src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigraphics_algo_la-Axes.lo: src/c/$(am__dirstamp) \
@@ -3113,6 +3123,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sub_tics_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_surface_color_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_surface_mode_property.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_tabtitle_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_tag_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_text_box_mode_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_text_box_property.Plo@am__quote@
@@ -3272,6 +3283,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sub_tics_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_surface_color_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_surface_mode_property.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_tabtitle_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_tag_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_text_box_mode_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_text_box_property.Plo@am__quote@
@@ -5517,6 +5529,20 @@ src/c/getHandleProperty/libscigraphics_algo_la-set_groupname_property.lo: src/c/
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-set_groupname_property.lo `test -f 'src/c/getHandleProperty/set_groupname_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_groupname_property.c
 
+src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo: src/c/getHandleProperty/get_tabtitle_property.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo -MD -MP -MF src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_tabtitle_property.Tpo -c -o src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo `test -f 'src/c/getHandleProperty/get_tabtitle_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_tabtitle_property.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_tabtitle_property.Tpo src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_tabtitle_property.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/getHandleProperty/get_tabtitle_property.c' object='src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-get_tabtitle_property.lo `test -f 'src/c/getHandleProperty/get_tabtitle_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_tabtitle_property.c
+
+src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo: src/c/getHandleProperty/set_tabtitle_property.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo -MD -MP -MF src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_tabtitle_property.Tpo -c -o src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo `test -f 'src/c/getHandleProperty/set_tabtitle_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_tabtitle_property.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_tabtitle_property.Tpo src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_tabtitle_property.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/getHandleProperty/set_tabtitle_property.c' object='src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-set_tabtitle_property.lo `test -f 'src/c/getHandleProperty/set_tabtitle_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_tabtitle_property.c
+
 src/c/libscigraphics_algo_la-DefaultCommandArg.lo: src/c/DefaultCommandArg.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscigraphics_algo_la-DefaultCommandArg.lo -MD -MP -MF src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Tpo -c -o src/c/libscigraphics_algo_la-DefaultCommandArg.lo `test -f 'src/c/DefaultCommandArg.c' || echo '$(srcdir)/'`src/c/DefaultCommandArg.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Tpo src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Plo
index 27c333f..2acfc0e 100644 (file)
@@ -337,6 +337,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_sub_tics_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_surface_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_surface_mode_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\get_tabtitle_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_tag_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_text_box_mode_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_text_box_property.c" />
@@ -368,6 +369,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\set_resize_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_specular_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_image_type_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\set_tabtitle_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_tag_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_toolbar_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_use_color_material_property.c" />
@@ -642,6 +644,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClInclude Include="src\c\getHandleProperty\FrameBorderType.h" />
     <ClInclude Include="src\c\getHandleProperty\get_data_property.h" />
     <ClInclude Include="src\c\getHandleProperty\LayoutType.h" />
+    <ClInclude Include="src\c\getHandleProperty\TitlePositionType.h" />
     <ClInclude Include="src\c\get_ticks_utils.h" />
     <ClInclude Include="includes\GetCommandArg.h" />
     <ClInclude Include="includes\getDictionaryGetProperties.h" />
index f2056ed..715027b 100644 (file)
     <ClCompile Include="src\c\getHandleProperty\set_groupname_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="src\c\getHandleProperty\set_tabtitle_property.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="src\c\getHandleProperty\get_tabtitle_property.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="includes\Axes.h">
     <ClInclude Include="src\c\getHandleProperty\FrameBorderType.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="src\c\getHandleProperty\TitlePositionType.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="Gui_Import.def">
index a52785c..54a529d 100755 (executable)
@@ -962,26 +962,7 @@ function %h_p(h)
                 b = b(1);
                 b = b(1);
             end
-            if h.style == "tabgroup" then
-                t=[t;
-                "Parent: "+h.parent.type
-                "Children: "+fmtchildren(h.children)
-                "Enable = "+sci2exp(h.enable)
-                "Position = "+sci2exp(h.position,0)
-                "Relief = "+h.relief
-                "Style = "+h.style
-                "Visible = "+sci2exp(h.visible)
-                "Callback = "+h.callback
-                "Callback_Type = "+sci2exp(h.callback_type,0)
-                "Layout = "+sci2exp(h.layout)
-                "Layout_options = "+sci2exp(l)
-                "Constraints = "+sci2exp(h.constraints)
-                "Margins = "+sci2exp(h.margins)
-                "Value = "+sci2exp(h.value)
-                "Userdata = "+fmtuser_data(u)
-                "Tag = "+h.tag
-                ]
-            elseif h.style == "tab" then
+            if h.style == "tab" then
                 t=[t;
                 "Parent: "+h.parent.type
                 "Children: "+fmtchildren(h.children)
@@ -996,8 +977,10 @@ function %h_p(h)
                 "Callback_Type = "+sci2exp(h.callback_type,0)
                 "Layout = "+sci2exp(h.layout)
                 "Layout_options = "+sci2exp(l)
-                "Constraints = "+sci2exp(h.constraints)
+                "Constraints = "+sci2exp(c)
                 "Margins = "+sci2exp(h.margins)
+                "Title_position = "+sci2exp(h.title_position)
+                "Title_scroll = "+sci2exp(h.title_scroll)
                 "Userdata = "+fmtuser_data(u)
                 "Tag = "+h.tag
                 ]
index 093a2e4..ff58abb 100755 (executable)
@@ -242,7 +242,9 @@ static getHashTableCouple propertyGetTable[] =
     {"rect", get_rect_property},
     {"layout_options", get_layout_options_property},
     {"borders", get_borders_property},
-    {"groupname", get_groupname_property}
+    {"groupname", get_groupname_property},
+    {"title_position", get_title_position_property},
+    {"title_scroll", get_title_scroll_property}
 };
 
 /*--------------------------------------------------------------------------*/
index ce0f368..e0123f0 100755 (executable)
@@ -243,7 +243,9 @@ static setHashTableCouple propertySetTable[] =
     {"rect", set_rect_property},
     {"layout_options", set_layout_options_property},
     {"borders", set_borders_property},
-    {"groupname", set_groupname_property}
+    {"groupname", set_groupname_property},
+    {"title_position", set_title_position_property},
+    {"title_scroll", set_title_scroll_property}
 };
 
 /*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/TitlePositionType.h b/scilab/modules/graphics/src/c/getHandleProperty/TitlePositionType.h
new file mode 100644 (file)
index 0000000..16d7904
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+enum TitlePositionType
+{
+    TITLE_TOP = 0,
+    TITLE_LEFT,
+    TITLE_BOTTOM,
+    TITLE_RIGHT
+};
index a898bb9..de260c3 100755 (executable)
@@ -215,5 +215,7 @@ int get_rect_property(void* _pvCtx, int iObjUID);
 int get_layout_options_property(void* _pvCtx, int iObjUID);
 int get_borders_property(void* _pvCtx, int iObjUID);
 int get_groupname_property(void* _pvCtx, int iObjUID);
+int get_title_position_property(void* _pvCtx, int iObjUID);
+int get_title_scroll_property(void* _pvCtx, int iObjUID);
 
 #endif /* _GET_HANDLE_PROPERTY_H_ */
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/get_tabtitle_property.c b/scilab/modules/graphics/src/c/getHandleProperty/get_tabtitle_property.c
new file mode 100644 (file)
index 0000000..b6432d3
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "getHandleProperty.h"
+#include "returnProperty.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "TitlePositionType.h"
+
+#include "getGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
+
+/*------------------------------------------------------------------------*/
+int get_title_scroll_property(void* _pvCtx, int iObjUID)
+{
+    int scroll = 0;
+    int* piScroll = &scroll;
+
+    getGraphicObjectProperty(iObjUID, __GO_UI_TITLE_SCROLL__, jni_bool, (void **)&piScroll);
+    if (piScroll == NULL)
+    {
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "title_scroll");
+        return FALSE;
+    }
+
+    if (scroll)
+    {
+        return sciReturnString(_pvCtx, "on");
+    }
+    else
+    {
+        return sciReturnString(_pvCtx, "off");
+    }
+}
+/*------------------------------------------------------------------------*/
+int get_title_position_property(void* _pvCtx, int iObjUID)
+{
+    int iPos = 0;
+    int* piPos = &iPos;
+    getGraphicObjectProperty(iObjUID, __GO_UI_TITLE_POSITION__, jni_int, (void **)&piPos);
+
+    if (piPos == NULL)
+    {
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "title_position");
+        return -1;
+    }
+
+    switch (iPos)
+    {
+        default :
+        case TITLE_TOP :
+            return sciReturnString(_pvCtx, "top");
+        case TITLE_LEFT :
+            return sciReturnString(_pvCtx, "left");
+        case TITLE_BOTTOM :
+            return sciReturnString(_pvCtx, "bottom");
+        case TITLE_RIGHT :
+            return sciReturnString(_pvCtx, "right");
+    }
+}
index b16a0cc..a4bccfe 100755 (executable)
@@ -216,5 +216,7 @@ int set_rect_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int
 int set_layout_options_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_borders_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_groupname_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
+int set_title_position_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
+int set_title_scroll_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 
 #endif /* _SET_HANDLE_PROPERTY_H_ */
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c
new file mode 100644 (file)
index 0000000..5038afe
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+#include "setHandleProperty.h"
+#include "SetProperty.h"
+#include "getPropertyAssignedValue.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "SetPropertyStatus.h"
+#include "GetProperty.h"
+#include "BOOL.h"
+#include "TitlePositionType.h"
+#include "stricmp.h"
+
+#include "setGraphicObjectProperty.h"
+#include "getGraphicObjectProperty.h"
+#include "graphicObjectProperties.h"
+
+/*------------------------------------------------------------------------*/
+int set_title_scroll_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol)
+{
+    int b = (int)FALSE;
+    BOOL status = FALSE;
+
+    b =  tryGetBooleanValueFromStack(_pvData, valueType, nbRow, nbCol, "title_scroll");
+    if (b == NOT_A_BOOLEAN_VALUE)
+    {
+        return SET_PROPERTY_ERROR;
+    }
+
+    status = setGraphicObjectProperty(iObjUID, __GO_UI_TITLE_SCROLL__, &b, jni_bool, 1);
+
+    if (status == TRUE)
+    {
+        return SET_PROPERTY_SUCCEED;
+    }
+    else
+    {
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "title_scroll");
+        return SET_PROPERTY_ERROR;
+    }
+}
+/*------------------------------------------------------------------------*/
+int set_title_position_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol)
+{
+    enum TitlePositionType pos = TITLE_TOP;
+
+    if (valueType != sci_strings)
+    {
+        Scierror(999, _("Wrong type for '%s' property: String expected.\n"), "title_position");
+        return SET_PROPERTY_ERROR;
+    }
+
+    if (stricmp((char*)_pvData, "top") == 0)
+    {
+        pos = TITLE_TOP;
+    }
+    else if (stricmp((char*)_pvData, "left") == 0)
+    {
+        pos = TITLE_LEFT;
+    }
+    else if (stricmp((char*)_pvData, "bottom") == 0)
+    {
+        pos = TITLE_BOTTOM;
+    }
+    else if (stricmp((char*)_pvData, "right") == 0)
+    {
+        pos = TITLE_RIGHT;
+    }
+    else
+    {
+        Scierror(999, _("Wrong value for '%s' property: %s, %s or %s expected.\n"), "title_position", "'top'", "'left'", "'bottom'", "'right'");
+        return SET_PROPERTY_ERROR;
+    }
+
+    if (setGraphicObjectProperty(iObjUID, __GO_UI_TITLE_POSITION__, &pos, jni_int, 1) == FALSE)
+    {
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "title_position");
+        return SET_PROPERTY_ERROR;
+    }
+
+    return SET_PROPERTY_SUCCEED;
+}
index 2638efc..b8c9f4f 100644 (file)
@@ -71,7 +71,9 @@ static const char* propertiesNames[] =
     "layout",
     "margins"
     "borders",
-    "groupname"
+    "groupname",
+    "title_position",
+    "title_scroll"
 };
 
 /*--------------------------------------------------------------------------*/
index 0667ab8..dca44f6 100644 (file)
 
 package org.scilab.modules.gui.bridge.tab;
 
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_TITLE_POSITION__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_UI_TITLE_SCROLL__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_VISIBLE__;
 
 import javax.swing.JTabbedPane;
 
+import org.scilab.modules.graphic_objects.uicontrol.Uicontrol;
 import org.scilab.modules.gui.SwingViewObject;
 
-public class SwingScilabTabGroup extends JTabbedPane implements SwingViewObject{
+public class SwingScilabTabGroup extends JTabbedPane implements SwingViewObject {
     private Integer id;
-    
+
     public SwingScilabTabGroup() {
         super();
     }
-    
+
     public void setId(Integer id) {
         this.id = id;
     }
@@ -34,8 +37,36 @@ public class SwingScilabTabGroup extends JTabbedPane implements SwingViewObject{
     }
 
     public void update(int property, Object value) {
-        if (property == __GO_VISIBLE__) {
-            setVisible((Boolean) value);
+
+        switch (property) {
+            case __GO_VISIBLE__ :
+                setVisible((Boolean) value);
+                break;
+            case __GO_UI_TITLE_POSITION__ :
+                Integer pos = (Integer)value;
+                switch (Uicontrol.TitlePositionType.intToEnum(pos)) {
+                    case BOTTOM:
+                        setTabPlacement(JTabbedPane.BOTTOM);
+                        break;
+                    case LEFT:
+                        setTabPlacement(JTabbedPane.LEFT);
+                        break;
+                    case RIGHT:
+                        setTabPlacement(JTabbedPane.RIGHT);
+                        break;
+                    case TOP:
+                    default:
+                        setTabPlacement(JTabbedPane.TOP);
+                        break;
+                }
+                break;
+            case __GO_UI_TITLE_SCROLL__ :
+                if ((Boolean)value) {
+                    setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
+                } else {
+                    setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
+                }
+                break;
         }
     }