This is an automated email from the ASF dual-hosted git repository. ebakke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit 7d7d0f7db0e898176683fdfb1167bd3b47e9f916 Author: Eirik Bakke <eba...@ultorg.com> AuthorDate: Mon May 27 11:40:28 2019 -0400 Some formatting fixes related to the commits in this PR. --- .../netbeans/core/startup/ScaledBitmapIcon.java | 4 +- .../src/org/netbeans/core/startup/Splash.java | 44 +++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/platform/core.startup/src/org/netbeans/core/startup/ScaledBitmapIcon.java b/platform/core.startup/src/org/netbeans/core/startup/ScaledBitmapIcon.java index d902d2e..dec4ee0 100644 --- a/platform/core.startup/src/org/netbeans/core/startup/ScaledBitmapIcon.java +++ b/platform/core.startup/src/org/netbeans/core/startup/ScaledBitmapIcon.java @@ -62,7 +62,7 @@ final class ScaledBitmapIcon implements Icon { private Image getScaledImage(GraphicsConfiguration gc, double dpiScaling) { Image ret = cache.get(dpiScaling); if (ret != null) { - return ret; + return ret; } final BufferedImage img = gc.createCompatibleImage( (int) Math.ceil(getIconWidth() * dpiScaling), @@ -104,9 +104,9 @@ final class ScaledBitmapIcon implements Icon { } else { dpiScaling = 1.0; } + // Scale the image down to its logical dimensions, then draw it at the device pixel boundary. Image scaledImage = getScaledImage(g.getDeviceConfiguration(), dpiScaling); if (dpiScaling != 1.0) { - // Scale the image down to its logical dimensions, then draw it at the device pixel boundary. AffineTransform tx2 = g.getTransform(); g.setTransform(new AffineTransform(1, 0, 0, 1, (int) tx2.getTranslateX(), diff --git a/platform/core.startup/src/org/netbeans/core/startup/Splash.java b/platform/core.startup/src/org/netbeans/core/startup/Splash.java index feeb088..9c9e00a 100644 --- a/platform/core.startup/src/org/netbeans/core/startup/Splash.java +++ b/platform/core.startup/src/org/netbeans/core/startup/Splash.java @@ -330,17 +330,17 @@ public final class Splash implements Stamps.Updater { */ public void layout(String text, Graphics graphics) { if (fm == null) { - // XXX(-ttran) this happened on Japanese Windows NT, don't - // fully understand why - return; + // XXX(-ttran) this happened on Japanese Windows NT, don't + // fully understand why + return; } SwingUtilities.layoutCompoundLabel(fm, text, null, BOTTOM, horizontalAlignment, BOTTOM, horizontalAlignment, bounds, new Rectangle(), effectiveBounds, 0); if (graphics != null) { - graphics.setColor(color); - graphics.setFont(font); - graphics.drawString(text, effectiveBounds.x, effectiveBounds.y + fm.getAscent()); + graphics.setColor(color); + graphics.setFont(font); + graphics.drawString(text, effectiveBounds.x, effectiveBounds.y + fm.getAscent()); } } @@ -348,7 +348,7 @@ public final class Splash implements Stamps.Updater { String prefix, boolean optional) { if (optional && !bundle.containsKey(prefix + "Bounds")) - return null; + return null; StringTokenizer st = new StringTokenizer( bundle.getString(prefix + "Bounds"), " ,"); // NOI18N Rectangle bounds = new Rectangle(Integer.parseInt(st.nextToken()), @@ -376,21 +376,21 @@ public final class Splash implements Stamps.Updater { } int horizontalAlignment = LEFT; try { - switch (bundle.getString(prefix + "HorizontalAlignment").toLowerCase(Locale.US)) { - case "left": - horizontalAlignment = SwingConstants.LEFT; - break; - case "center": - horizontalAlignment = SwingConstants.CENTER; - break; - case "right": - horizontalAlignment = SwingConstants.RIGHT; - break; - default: - // Ignore; use default - Util.err.warning( - "Invalid horizontal alignment for splash screen text box"); //NOI18N - } + switch (bundle.getString(prefix + "HorizontalAlignment").toLowerCase(Locale.US)) { + case "left": + horizontalAlignment = SwingConstants.LEFT; + break; + case "center": + horizontalAlignment = SwingConstants.CENTER; + break; + case "right": + horizontalAlignment = SwingConstants.RIGHT; + break; + default: + // Ignore; use default + Util.err.warning( + "Invalid horizontal alignment for splash screen text box"); //NOI18N + } } catch (MissingResourceException e) { // Ignore; use default } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists