set missing insets/margins in SwingView 17/13917/3
Antoine ELIAS [Wed, 5 Mar 2014 16:13:27 +0000 (17:13 +0100)]
Change-Id: Iae57c4c07f610372afb5596573cd1bdd2b2b68ce

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/tab/SwingScilabCommonPanel.java

index 256660b..3669625 100644 (file)
@@ -44,6 +44,7 @@ import java.awt.Dimension;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
+import java.awt.Insets;
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
@@ -413,7 +414,10 @@ public class SwingScilabCommonPanel {
             }
 
             // Insets
-            // TODO : add Insets
+            Double[] margins = uicontrol.getMargins();
+            constraints.insets = new Insets(
+                margins[0].intValue(), margins[1].intValue(),
+                margins[2].intValue(), margins[3].intValue());
 
             // Padding
             Integer[] padding = uicontrol.getGridBagPadding();