File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
src/java.desktop/share/classes Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -603,15 +603,11 @@ public final Insets getInsets(Insets insets) {
603603
604604
605605 private Graphics getBackingStoreGraphics (Graphics g ) {
606- if (!SwingUtilities2 .isPrinting (g )) {
607- Graphics bsg = backingStoreImage .getGraphics ();
608- bsg .setColor (g .getColor ());
609- bsg .setFont (g .getFont ());
610- bsg .setClip (g .getClipBounds ());
611- return bsg ;
612- } else {
613- return g ;
614- }
606+ Graphics bsg = backingStoreImage .getGraphics ();
607+ bsg .setColor (g .getColor ());
608+ bsg .setFont (g .getFont ());
609+ bsg .setClip (g .getClipBounds ());
610+ return bsg ;
615611 }
616612
617613
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1998, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1998, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2002, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2002, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -1317,7 +1317,7 @@ public int hashCode() {
13171317 * returns true if the Graphics is print Graphics
13181318 * false otherwise
13191319 */
1320- public static boolean isPrinting (Graphics g ) {
1320+ static boolean isPrinting (Graphics g ) {
13211321 return (g instanceof PrinterGraphics || g instanceof PrintGraphics );
13221322 }
13231323
You can’t perform that action at this time.
0 commit comments