JEditorPaneInGlassPaneOverlapping.java revision 13901:b2a69d66dc65
1193323Sed/*
2193323Sed * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3193323Sed * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4193323Sed *
5193323Sed * This code is free software; you can redistribute it and/or modify it
6193323Sed * under the terms of the GNU General Public License version 2 only, as
7193323Sed * published by the Free Software Foundation.
8193323Sed *
9193323Sed * This code is distributed in the hope that it will be useful, but WITHOUT
10193323Sed * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11193323Sed * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12193323Sed * version 2 for more details (a copy is included in the LICENSE file that
13193323Sed * accompanied this code).
14193323Sed *
15193323Sed * You should have received a copy of the GNU General Public License version
16193323Sed * 2 along with this work; if not, write to the Free Software Foundation,
17193323Sed * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18193323Sed *
19193323Sed * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20193323Sed * or visit www.oracle.com if you need additional information or have any
21193323Sed * questions.
22193323Sed */
23193323Sed
24193323Sed
25193323Sedimport java.awt.Point;
26193323Sedimport javax.swing.*;
27193323Sed
28193323Sed/**
29193323Sed * AWT/Swing overlapping test for {@link javax.swing.JBEditorPane } component in GlassPane.
30193323Sed * <p>See base class for details.
31193323Sed */
32193323Sed/*
33193323Sed@test
34193323Sed@summary Simple Overlapping test for javax.swing.JLabel
35193323Sed@author sergey.grinev@oracle.com: area=awt.mixing
36193323Sed@library /java/awt/patchlib  ../../regtesthelpers
37193323Sed@modules java.desktop/sun.awt
38193323Sed         java.desktop/java.awt.peer
39210299Sed@build java.desktop/java.awt.Helper
40193323Sed@build Util
41249423Sdim@run main JEditorPaneInGlassPaneOverlapping
42249423Sdim */
43249423Sdimpublic class JEditorPaneInGlassPaneOverlapping extends GlassPaneOverlappingTestBase {
44249423Sdim
45249423Sdim    @Override
46249423Sdim    protected JComponent getSwingComponent() {
47249423Sdim        JEditorPane ch = new JEditorPane();
48193323Sed        ch.setText("<b>Swing component</b>");
49193323Sed        OverlappingTestBase.shift = new Point(12, 12);
50249423Sdim        return ch;
51249423Sdim    }
52193323Sed
53193323Sed    // this strange plumbing stuff is required due to "Standard Test Machinery" in base class
54193323Sed    public static void main(String args[]) throws InterruptedException {
55193323Sed        instance = new JEditorPaneInGlassPaneOverlapping();
56193323Sed        OverlappingTestBase.doMain(args);
57193323Sed    }
58193323Sed}
59193323Sed