Skip to content

Commit 33716fc

Browse files
author
Datadog Syncup Service
committed
Merge branch 'upstream-master'
2 parents 73c9da0 + aa10ec7 commit 33716fc

File tree

4 files changed

+79
-7
lines changed

4 files changed

+79
-7
lines changed

src/java.desktop/share/classes/javax/swing/plaf/nimbus/SynthPainterImpl.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 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
@@ -24,12 +24,21 @@
2424
*/
2525
package javax.swing.plaf.nimbus;
2626

27-
import java.awt.*;
27+
import java.awt.Color;
28+
import java.awt.Component;
29+
import java.awt.Graphics;
30+
import java.awt.Graphics2D;
2831
import java.awt.geom.AffineTransform;
2932
import java.awt.geom.NoninvertibleTransformException;
3033
import java.awt.image.BufferedImage;
31-
import java.util.*;
32-
import javax.swing.*;
34+
import javax.swing.JDesktopPane;
35+
import javax.swing.JSlider;
36+
import javax.swing.JSplitPane;
37+
import javax.swing.JTabbedPane;
38+
import javax.swing.Painter;
39+
import javax.swing.SwingConstants;
40+
import javax.swing.UIManager;
41+
import javax.swing.plaf.UIResource;
3342
import javax.swing.plaf.synth.SynthContext;
3443
import javax.swing.plaf.synth.SynthPainter;
3544
import javax.swing.plaf.synth.SynthConstants;
@@ -531,7 +540,11 @@ public void paintDesktopIconBorder(SynthContext context,
531540
public void paintDesktopPaneBackground(SynthContext context,
532541
Graphics g, int x, int y,
533542
int w, int h) {
534-
paintBackground(context, g, x, y, w, h, null);
543+
if (context.getComponent() instanceof JDesktopPane pane) {
544+
if (pane.getBackground() instanceof UIResource) {
545+
paintBackground(context, g, x, y, w, h, null);
546+
}
547+
}
535548
}
536549

537550
/**

test/jdk/javax/swing/JInternalFrame/bug6726866.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/*
2525
* @test
26-
* @bug 6726866 8186617
26+
* @bug 6726866 8186617 8343123
2727
* @summary Repainting artifacts when resizing or dragging JInternalFrames in
2828
non-opaque toplevel
2929
* @library /java/awt/regtesthelpers
@@ -34,7 +34,6 @@
3434
import java.awt.Color;
3535
import java.awt.Window;
3636

37-
import javax.swing.JApplet;
3837
import javax.swing.JDesktopPane;
3938
import javax.swing.JFrame;
4039
import javax.swing.JInternalFrame;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
24+
/*
25+
* @test
26+
* @bug 8343777
27+
* @summary Test for `@since` declaration in the module-info.java file of jdk.charsets
28+
* @library /test/lib /test/jdk/tools/sincechecker
29+
* @run main SinceChecker jdk.charsets
30+
*/
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
24+
/*
25+
* @test
26+
* @bug 8343777
27+
* @summary Test for `@since` declaration in the module-info.java file of jdk.localedata
28+
* @library /test/lib /test/jdk/tools/sincechecker
29+
* @run main SinceChecker jdk.localedata
30+
*/

0 commit comments

Comments
 (0)