From: Calixte DENIZET Date: Sun, 20 Jan 2013 17:36:55 +0000 (+0100) Subject: Bug 11931 fixed: In graphics, white space was not used as default thousand separator X-Git-Tag: 5.4.1~588 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=91b6fc31e4f1f8de8675b774cc2d9615155986a8 Bug 11931 fixed: In graphics, white space was not used as default thousand separator Change-Id: Ideb311c457b2137b86d5c5588e0425f2c5b76038 --- diff --git a/scilab/CHANGES_5.4.X b/scilab/CHANGES_5.4.X index d0d0aa8..f3beb19 100644 --- a/scilab/CHANGES_5.4.X +++ b/scilab/CHANGES_5.4.X @@ -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 diff --git a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/ruler/AxesRulerSpriteFactory.java b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/ruler/AxesRulerSpriteFactory.java index ef80567..2d9b932 100644 --- a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/ruler/AxesRulerSpriteFactory.java +++ b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/ruler/AxesRulerSpriteFactory.java @@ -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; }