eirikbakke commented on code in PR #9303:
URL: https://github.com/apache/netbeans/pull/9303#discussion_r3016130349


##########
platform/core.startup/src/org/netbeans/core/startup/Splash.java:
##########
@@ -405,137 +487,110 @@ public static TextBox parse(Graphics graphics, 
JComponent comp, ResourceBundle b
             } else {
                 fontMetrics = graphics.getFontMetrics(font);
             }
-            return new TextBox(bounds, color, size, font, fontMetrics, 
horizontalAlignment);
+            return new TextBox(bounds, color, font, fontMetrics, 
horizontalAlignment);
         }
     }
 
     private static class SplashPainter {
-        TextBox statusBox;
+        private final TextBox statusBox;
         // May be null.
-        TextBox versionBox;
-        Color color_bar;
-        Color color_edge;
-        Color color_corner;
-        private Rectangle dirty = new Rectangle();
-        private Rectangle bar = new Rectangle();
-        private Rectangle bar_inc = new Rectangle();
-        private int progress = 0;
-        private int maxSteps = 0;
-        private int barStart = 0;
-        private int barLength = 0;
-        private Icon image;
-        private String text;
-        private Graphics2D graphics;
+        private final TextBox versionBox;
+        private final Color color_bar;
+        private final Color color_edge;
+        private final Color color_corner;
+        private final Rectangle bar;
+        private final Icon image;
         private final JComponent comp;
-        private final boolean about;
+        private final Progress model;
+
+        private Rectangle dirty;
+        private Graphics2D graphics;
 
         /**
          * Creates a new splash screen component.
          * param about true is this component will be used in about dialog
          */
-        public SplashPainter(Graphics graphics, JComponent comp, boolean 
about) {
+        public SplashPainter(Progress model, Graphics graphics, JComponent 
comp, boolean about) {
+            this.model = model;
             this.graphics = (Graphics2D) graphics;
             this.comp = comp;
-            this.about = about;
-        }
-
-        final void init() throws MissingResourceException, 
NumberFormatException {

Review Comment:
   Thanks for getting rid of init()... having final fields initialized in the 
constructor makes it a lot easier to review for thread-safety.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to