author | ohair |
Tue, 25 May 2010 15:58:33 -0700 | |
changeset 5506 | 202f599c92aa |
parent 443 | b49bc385fa7e |
permissions | -rw-r--r-- |
443
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. |
443
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
4 |
* |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
8 |
* |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
13 |
* accompanied this code). |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
14 |
* |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
18 |
* |
5506 | 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. |
|
443
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
22 |
*/ |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
23 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
24 |
import java.awt.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
25 |
import sun.awt.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
26 |
import java.awt.event.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
27 |
import java.lang.reflect.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
28 |
import java.awt.dnd.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
29 |
import java.awt.datatransfer.*; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
30 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
31 |
public class JavaClient { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
32 |
ClientContainer cont; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
33 |
public static void main(String[] args) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
34 |
if (System.getProperty("os.name").toLowerCase().startsWith("win")) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
35 |
return; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
36 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
37 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
38 |
// Enable testing extensions in XEmbed server |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
39 |
System.setProperty("sun.awt.xembed.testing", "true"); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
40 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
41 |
boolean xtoolkit = "sun.awt.X11.XToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName()); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
42 |
final EmbeddedFrame ef = createEmbeddedFrame(xtoolkit, Long.parseLong(args[0])); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
43 |
ef.setBackground(new Color(100, 100, 200)); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
44 |
ef.setLayout(new BorderLayout()); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
45 |
ef.add(new ClientContainer(ef), BorderLayout.CENTER); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
46 |
ef.pack(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
47 |
ef.registerListeners(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
48 |
ef.setVisible(true); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
49 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
50 |
private static EmbeddedFrame createEmbeddedFrame(boolean xtoolkit, long window) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
51 |
try { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
52 |
Class cl = (xtoolkit?Class.forName("sun.awt.X11.XEmbeddedFrame"):Class.forName("sun.awt.motif.MEmbeddedFrame")); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
53 |
Constructor cons = cl.getConstructor(new Class[]{Long.TYPE, Boolean.TYPE}); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
54 |
return (EmbeddedFrame)cons.newInstance(new Object[] {window, true}); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
55 |
} catch (Exception e) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
56 |
e.printStackTrace(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
57 |
throw new RuntimeException("Can't create embedded frame"); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
58 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
59 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
60 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
61 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
62 |
class ClientContainer extends Container { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
63 |
Window parent; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
64 |
int width, height; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
65 |
public ClientContainer(Window w) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
66 |
parent = w; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
67 |
width = 500; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
68 |
height = 50; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
69 |
final TextField tf = new TextField(30); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
70 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
71 |
DragSource ds = new DragSource(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
72 |
final DragSourceListener dsl = new DragSourceAdapter() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
73 |
public void dragDropEnd(DragSourceDropEvent dsde) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
74 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
75 |
}; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
76 |
final DragGestureListener dgl = new DragGestureListener() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
77 |
public void dragGestureRecognized(DragGestureEvent dge) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
78 |
dge.startDrag(null, new StringSelection(tf.getText()), dsl); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
79 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
80 |
}; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
81 |
ds.createDefaultDragGestureRecognizer(tf, DnDConstants.ACTION_COPY, dgl); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
82 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
83 |
final DropTargetListener dtl = new DropTargetAdapter() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
84 |
public void drop(DropTargetDropEvent dtde) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
85 |
dtde.acceptDrop(DnDConstants.ACTION_COPY); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
86 |
try { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
87 |
tf.setText(tf.getText() + (String)dtde.getTransferable().getTransferData(DataFlavor.stringFlavor)); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
88 |
} catch (Exception e) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
89 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
90 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
91 |
}; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
92 |
final DropTarget dt = new DropTarget(tf, dtl); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
93 |
|
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
94 |
setLayout(new FlowLayout()); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
95 |
add(tf); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
96 |
Button close = new Button("Close"); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
97 |
close.addActionListener(new ActionListener() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
98 |
public void actionPerformed(ActionEvent e) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
99 |
parent.dispose(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
100 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
101 |
}); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
102 |
Button inc = new Button("Increase size"); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
103 |
inc.addActionListener(new ActionListener() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
104 |
public void actionPerformed(ActionEvent e) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
105 |
changeSize(10); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
106 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
107 |
}); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
108 |
Button dec = new Button("Decrease size"); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
109 |
dec.addActionListener(new ActionListener() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
110 |
public void actionPerformed(ActionEvent e) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
111 |
changeSize(-10); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
112 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
113 |
}); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
114 |
add(close); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
115 |
add(inc); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
116 |
add(dec); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
117 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
118 |
void changeSize(int step) { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
119 |
width += step; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
120 |
height += step; |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
121 |
parent.pack(); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
122 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
123 |
public Dimension getPreferredSize() { |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
124 |
return new Dimension(width, height); |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
125 |
} |
b49bc385fa7e
6686273: Some AWT reg. tests should be moved to open repository (for CRs 6444769, 6480547, and 6560348)
volk
parents:
diff
changeset
|
126 |
} |