src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: Otavio Santana <otaviojava@java.net>


 441         table.setDefaultLocale( Locale.getDefault() );
 442         table.addResourceBundle( "com.sun.swing.internal.plaf.basic.resources.basic" );
 443     }
 444 
 445     /**
 446      * Populates {@code table} with the defaults for the basic look and
 447      * feel.
 448      *
 449      * @param table the {@code UIDefaults} to add the values to
 450      * @throws NullPointerException if {@code table} is {@code null}
 451      */
 452     protected void initComponentDefaults(UIDefaults table)
 453     {
 454 
 455         initResourceBundle(table);
 456 
 457         // *** Shared Integers
 458         Integer fiveHundred = new Integer(500);
 459 
 460         // *** Shared Longs
 461         Long oneThousand = new Long(1000);
 462 
 463         LazyValue dialogPlain12 = t ->
 464             new FontUIResource(Font.DIALOG, Font.PLAIN, 12);
 465         LazyValue serifPlain12 = t ->
 466             new FontUIResource(Font.SERIF, Font.PLAIN, 12);
 467         LazyValue sansSerifPlain12 =  t ->
 468             new FontUIResource(Font.SANS_SERIF, Font.PLAIN, 12);
 469         LazyValue monospacedPlain12 = t ->
 470             new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12);
 471         LazyValue dialogBold12 = t ->
 472             new FontUIResource(Font.DIALOG, Font.BOLD, 12);
 473 
 474 
 475         // *** Shared Colors
 476         ColorUIResource red = new ColorUIResource(Color.red);
 477         ColorUIResource black = new ColorUIResource(Color.black);
 478         ColorUIResource white = new ColorUIResource(Color.white);
 479         ColorUIResource yellow = new ColorUIResource(Color.yellow);
 480         ColorUIResource gray = new ColorUIResource(Color.gray);
 481         ColorUIResource lightGray = new ColorUIResource(Color.lightGray);




 441         table.setDefaultLocale( Locale.getDefault() );
 442         table.addResourceBundle( "com.sun.swing.internal.plaf.basic.resources.basic" );
 443     }
 444 
 445     /**
 446      * Populates {@code table} with the defaults for the basic look and
 447      * feel.
 448      *
 449      * @param table the {@code UIDefaults} to add the values to
 450      * @throws NullPointerException if {@code table} is {@code null}
 451      */
 452     protected void initComponentDefaults(UIDefaults table)
 453     {
 454 
 455         initResourceBundle(table);
 456 
 457         // *** Shared Integers
 458         Integer fiveHundred = new Integer(500);
 459 
 460         // *** Shared Longs
 461         Long oneThousand = 1000L;
 462 
 463         LazyValue dialogPlain12 = t ->
 464             new FontUIResource(Font.DIALOG, Font.PLAIN, 12);
 465         LazyValue serifPlain12 = t ->
 466             new FontUIResource(Font.SERIF, Font.PLAIN, 12);
 467         LazyValue sansSerifPlain12 =  t ->
 468             new FontUIResource(Font.SANS_SERIF, Font.PLAIN, 12);
 469         LazyValue monospacedPlain12 = t ->
 470             new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12);
 471         LazyValue dialogBold12 = t ->
 472             new FontUIResource(Font.DIALOG, Font.BOLD, 12);
 473 
 474 
 475         // *** Shared Colors
 476         ColorUIResource red = new ColorUIResource(Color.red);
 477         ColorUIResource black = new ColorUIResource(Color.black);
 478         ColorUIResource white = new ColorUIResource(Color.white);
 479         ColorUIResource yellow = new ColorUIResource(Color.yellow);
 480         ColorUIResource gray = new ColorUIResource(Color.gray);
 481         ColorUIResource lightGray = new ColorUIResource(Color.lightGray);