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 sun.lwawt;
27
28 import java.awt.*;
29
30 import sun.java2d.SurfaceData;
31
32 // TODO Is it worth to generify this interface, like that:
33 //
34 // public interface PlatformWindow<WindowType extends Window>
35 //
36 // ?
37
38 public interface PlatformWindow {
39
40 /*
41 * Delegate initialization (create native window and all the
42 * related resources).
43 */
44 public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner);
45
46 /*
47 * Delegate shutdown (dispose native window and all the
48 * related resources).
49 */
100 * Creates a new image to serve as a back buffer.
101 */
102 public Image createBackBuffer();
103
104 /*
105 * Move the given part of the back buffer to the front buffer.
106 */
107 public void flip(int x1, int y1, int x2, int y2,
108 BufferCapabilities.FlipContents flipAction);
109
110 public void toFront();
111
112 public void toBack();
113
114 public void setMenuBar(MenuBar mb);
115
116 public void setAlwaysOnTop(boolean value);
117
118 public void updateFocusableWindowState();
119
120 public boolean requestWindowFocus();
121
122 /*
123 * Returns true only when called on a frame/dialog when it's natively focused.
124 */
125 public boolean isActive();
126
127 public void setResizable(boolean resizable);
128
129 public void setMinimumSize(int width, int height);
130
131 /**
132 * Transforms the given Graphics object according to the native
133 * implementation traits (insets, etc.).
134 */
135 public Graphics transformGraphics(Graphics g);
136
137 /*
138 * Installs the images for particular window.
139 */
|
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 sun.lwawt;
27
28 import java.awt.*;
29
30 import sun.awt.CausedFocusEvent;
31 import sun.java2d.SurfaceData;
32
33 // TODO Is it worth to generify this interface, like that:
34 //
35 // public interface PlatformWindow<WindowType extends Window>
36 //
37 // ?
38
39 public interface PlatformWindow {
40
41 /*
42 * Delegate initialization (create native window and all the
43 * related resources).
44 */
45 public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner);
46
47 /*
48 * Delegate shutdown (dispose native window and all the
49 * related resources).
50 */
101 * Creates a new image to serve as a back buffer.
102 */
103 public Image createBackBuffer();
104
105 /*
106 * Move the given part of the back buffer to the front buffer.
107 */
108 public void flip(int x1, int y1, int x2, int y2,
109 BufferCapabilities.FlipContents flipAction);
110
111 public void toFront();
112
113 public void toBack();
114
115 public void setMenuBar(MenuBar mb);
116
117 public void setAlwaysOnTop(boolean value);
118
119 public void updateFocusableWindowState();
120
121 public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
122
123 public boolean requestWindowFocus();
124
125 /*
126 * Returns true only when called on a frame/dialog when it's natively focused.
127 */
128 public boolean isActive();
129
130 public void setResizable(boolean resizable);
131
132 public void setMinimumSize(int width, int height);
133
134 /**
135 * Transforms the given Graphics object according to the native
136 * implementation traits (insets, etc.).
137 */
138 public Graphics transformGraphics(Graphics g);
139
140 /*
141 * Installs the images for particular window.
142 */
|