Bug 11931 fixed: In graphics, white space was not used as default thousand separator 60/10260/2
Calixte DENIZET [Sun, 20 Jan 2013 17:36:55 +0000 (18:36 +0100)]
Change-Id: Ideb311c457b2137b86d5c5588e0425f2c5b76038

scilab/CHANGES_5.4.X
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/ruler/AxesRulerSpriteFactory.java

index d0d0aa8..f3beb19 100644 (file)
@@ -203,6 +203,9 @@ Bug fixes
 
 * Bug #11814 fixed - Fix a typo in one of the titles of CACSD.
 
+* Bug #11931 fixed - In graphics, white space was not used as default thousand
+                     separator.
+
 * Bug #11939 fixed - ssprint formatting was slightly not right.
 
 * Bug #11952 fixed - In SciNotes, a Java exception occured on selection of text
index ef80567..2d9b932 100644 (file)
@@ -107,6 +107,7 @@ class AxesRulerSpriteFactory implements RulerSpriteFactory {
         DecimalFormatSymbols decimalFormatSymbols = format.getDecimalFormatSymbols();
         decimalFormatSymbols.setDecimalSeparator('.');
         decimalFormatSymbols.setExponentSeparator("e");
+        decimalFormatSymbols.setGroupingSeparator('\u00A0');
         format.setDecimalFormatSymbols(decimalFormatSymbols);
     }
 
@@ -153,25 +154,25 @@ class AxesRulerSpriteFactory implements RulerSpriteFactory {
 
         texture.setDrawer(new TextureDrawer() {
 
-            @Override
-            public void draw(TextureDrawingTools drawingTools) {
-                drawingTools.draw(mantissaTextEntity, 0, exponentSize.height);
-                drawingTools.draw(exponentTextEntity, mantissaSize.width, 0);
-            }
-
-            @Override
-            public Dimension getTextureSize() {
-                return new Dimension(
-                           exponentSize.width + mantissaSize.width,
-                           exponentSize.height + mantissaSize.height
-                       );
-            }
-
-            @Override
-            public TextureDrawer.OriginPosition getOriginPosition() {
-                return TextureDrawer.OriginPosition.UPPER_LEFT;
-            }
-        });
+                @Override
+                public void draw(TextureDrawingTools drawingTools) {
+                    drawingTools.draw(mantissaTextEntity, 0, exponentSize.height);
+                    drawingTools.draw(exponentTextEntity, mantissaSize.width, 0);
+                }
+
+                @Override
+                public Dimension getTextureSize() {
+                    return new Dimension(
+                        exponentSize.width + mantissaSize.width,
+                        exponentSize.height + mantissaSize.height
+                        );
+                }
+
+                @Override
+                public TextureDrawer.OriginPosition getOriginPosition() {
+                    return TextureDrawer.OriginPosition.UPPER_LEFT;
+                }
+            });
 
         return texture;
     }
@@ -193,21 +194,21 @@ class AxesRulerSpriteFactory implements RulerSpriteFactory {
         Texture texture = textureManager.createTexture();
         texture.setDrawer(new TextureDrawer() {
 
-            @Override
-            public void draw(TextureDrawingTools drawingTools) {
-                drawingTools.draw(textEntity, 0, 0);
-            }
-
-            @Override
-            public Dimension getTextureSize() {
-                return textEntity.getSize();
-            }
-
-            @Override
-            public TextureDrawer.OriginPosition getOriginPosition() {
-                return TextureDrawer.OriginPosition.UPPER_LEFT;
-            }
-        });
+                @Override
+                public void draw(TextureDrawingTools drawingTools) {
+                    drawingTools.draw(textEntity, 0, 0);
+                }
+
+                @Override
+                public Dimension getTextureSize() {
+                    return textEntity.getSize();
+                }
+
+                @Override
+                public TextureDrawer.OriginPosition getOriginPosition() {
+                    return TextureDrawer.OriginPosition.UPPER_LEFT;
+                }
+            });
 
         return texture;
     }