Bug 11931 fixed: In graphics, white space was not used as default thousand separator
[scilab.git] / scilab / modules / renderer / src / java / org / scilab / modules / renderer / JoGLView / axes / ruler / AxesRulerSpriteFactory.java
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;
     }