1 /*
2 * Copyright (c) 1995, 2008, 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.awt.peer;
27
28 import java.awt.*;
29 import java.awt.event.PaintEvent;
30 import java.awt.image.ImageProducer;
31 import java.awt.image.ImageObserver;
32 import java.awt.image.ColorModel;
33 import java.awt.image.VolatileImage;
34 import java.awt.GraphicsConfiguration;
35 import javax.tools.annotation.GenerateNativeHeader;
36 import sun.awt.CausedFocusEvent;
37 import sun.java2d.pipe.Region;
38
39
40 /**
41 * The peer interface for {@link Component}. This is the top level peer
42 * interface for widgets and defines the bulk of methods for AWT component
43 * peers. Most component peers have to implement this interface (via one
44 * of the subinterfaces), except menu components, which implement
45 * {@link MenuComponentPeer}.
46 *
47 * The peer interfaces are intended only for use in porting
48 * the AWT. They are not intended for use by application
49 * developers, and developers should not implement peers
50 * nor invoke any of the peer methods directly on the peer
51 * instances.
52 */
53 /* No native methods here, but the constants are needed in the supporting JNI code */
54 @GenerateNativeHeader
55 public interface ComponentPeer {
56
57 /**
58 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
59 * a change in the component location only.
60 *
61 * @see #setBounds(int, int, int, int, int)
62 */
63 public static final int SET_LOCATION = 1;
64
65 /**
66 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
67 * a change in the component size only.
68 *
69 * @see #setBounds(int, int, int, int, int)
70 */
71 public static final int SET_SIZE = 2;
72
73 /**
74 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|
1 /*
2 * Copyright (c) 1995, 2013, 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.awt.peer;
27
28 import java.awt.*;
29 import java.awt.event.PaintEvent;
30 import java.awt.image.ImageProducer;
31 import java.awt.image.ImageObserver;
32 import java.awt.image.ColorModel;
33 import java.awt.image.VolatileImage;
34 import java.awt.GraphicsConfiguration;
35 import sun.awt.CausedFocusEvent;
36 import sun.java2d.pipe.Region;
37
38
39 /**
40 * The peer interface for {@link Component}. This is the top level peer
41 * interface for widgets and defines the bulk of methods for AWT component
42 * peers. Most component peers have to implement this interface (via one
43 * of the subinterfaces), except menu components, which implement
44 * {@link MenuComponentPeer}.
45 *
46 * The peer interfaces are intended only for use in porting
47 * the AWT. They are not intended for use by application
48 * developers, and developers should not implement peers
49 * nor invoke any of the peer methods directly on the peer
50 * instances.
51 */
52 public interface ComponentPeer {
53
54 /**
55 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
56 * a change in the component location only.
57 *
58 * @see #setBounds(int, int, int, int, int)
59 */
60 public static final int SET_LOCATION = 1;
61
62 /**
63 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
64 * a change in the component size only.
65 *
66 * @see #setBounds(int, int, int, int, int)
67 */
68 public static final int SET_SIZE = 2;
69
70 /**
71 * Operation for {@link #setBounds(int, int, int, int, int)}, indicating
|