1 Clazz.declarePackage ("swingjs");
2 Clazz.load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
3 c$ = Clazz.decorateAsClass (function () {
9 Clazz.instantialize (this, arguments);
10 }, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
11 Clazz.overrideMethod (c$, "setFrame",
12 function (target, isFrame) {
13 this.isFrame = isFrame;
16 jc.myThread = Thread.currentThread ();
17 jc.threadGroup = jc.myThread.getThreadGroup ();
18 this.applet = (jc.threadGroup).getHtmlApplet ();
19 this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
21 }, "java.awt.Window,~B");
22 Clazz.overrideMethod (c$, "getGraphics",
24 this.graphics.setFont (this.window.getFont ());
27 Clazz.overrideMethod (c$, "getToolkit",
29 return java.awt.Toolkit.getDefaultToolkit ();
31 Clazz.overrideMethod (c$, "getFontMetrics",
33 if (!font.equals (this.font)) this.window.setFont (this.font = font);
34 return this.graphics.getFontMetrics (font);
36 Clazz.overrideMethod (c$, "getInsets",
38 return new java.awt.Insets (0, 0, 0, 0);
40 Clazz.overrideMethod (c$, "beginValidate",
43 Clazz.overrideMethod (c$, "endValidate",
46 Clazz.overrideMethod (c$, "beginLayout",
49 Clazz.overrideMethod (c$, "endLayout",
52 Clazz.overrideMethod (c$, "isObscured",
56 Clazz.overrideMethod (c$, "canDetermineObscurity",
60 Clazz.overrideMethod (c$, "setVisible",
63 Clazz.overrideMethod (c$, "setEnabled",
66 Clazz.overrideMethod (c$, "paint",
68 }, "java.awt.Graphics");
69 Clazz.overrideMethod (c$, "repaint",
70 function (tm, x, y, width, height) {
72 Clazz.overrideMethod (c$, "print",
74 }, "java.awt.Graphics");
75 Clazz.overrideMethod (c$, "setBounds",
76 function (x, y, width, height, op) {
78 Clazz.overrideMethod (c$, "handleEvent",
80 }, "java.awt.AWTEvent");
81 Clazz.overrideMethod (c$, "coalescePaintEvent",
83 }, "java.awt.event.PaintEvent");
84 Clazz.overrideMethod (c$, "getLocationOnScreen",
86 return new java.awt.Point ();
88 Clazz.overrideMethod (c$, "getPreferredSize",
92 Clazz.overrideMethod (c$, "getMinimumSize",
96 Clazz.overrideMethod (c$, "getColorModel",
100 Clazz.overrideMethod (c$, "dispose",
103 Clazz.overrideMethod (c$, "setForeground",
105 }, "java.awt.Color");
106 Clazz.overrideMethod (c$, "setBackground",
108 }, "java.awt.Color");
109 Clazz.overrideMethod (c$, "setFont",
113 Clazz.overrideMethod (c$, "updateCursorImmediately",
116 Clazz.overrideMethod (c$, "requestFocus",
117 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
119 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
120 Clazz.overrideMethod (c$, "isFocusable",
124 Clazz.defineMethod (c$, "createImage",
125 function (producer) {
127 }, "java.awt.image.ImageProducer");
128 Clazz.defineMethod (c$, "createImage",
129 function (width, height) {
132 Clazz.overrideMethod (c$, "createVolatileImage",
133 function (width, height) {
136 Clazz.overrideMethod (c$, "prepareImage",
137 function (img, w, h, o) {
139 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
140 Clazz.overrideMethod (c$, "checkImage",
141 function (img, w, h, o) {
143 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
144 Clazz.overrideMethod (c$, "getGraphicsConfiguration",
148 Clazz.overrideMethod (c$, "handlesWheelScrolling",
152 Clazz.overrideMethod (c$, "getBackBuffer",
156 Clazz.overrideMethod (c$, "destroyBuffers",
159 Clazz.overrideMethod (c$, "reparent",
160 function (newContainer) {
161 }, "java.awt.peer.ContainerPeer");
162 Clazz.overrideMethod (c$, "isReparentSupported",
166 Clazz.overrideMethod (c$, "layout",
169 Clazz.overrideMethod (c$, "getBounds",
173 Clazz.overrideMethod (c$, "toFront",
176 Clazz.overrideMethod (c$, "toBack",
179 Clazz.overrideMethod (c$, "updateAlwaysOnTopState",
182 Clazz.overrideMethod (c$, "updateFocusableWindowState",
185 Clazz.overrideMethod (c$, "requestWindowFocus",
189 Clazz.overrideMethod (c$, "setModalBlocked",
190 function (blocker, blocked) {
191 }, "java.awt.Dialog,~B");
192 Clazz.overrideMethod (c$, "updateMinimumSize",
195 Clazz.overrideMethod (c$, "updateIconImages",
198 Clazz.overrideMethod (c$, "setOpacity",
201 Clazz.overrideMethod (c$, "setOpaque",
202 function (isOpaque) {
204 Clazz.overrideMethod (c$, "updateWindow",
205 function (backBuffer) {
206 }, "java.awt.image.BufferedImage");
207 Clazz.overrideMethod (c$, "repositionSecurityWarning",
210 Clazz.overrideMethod (c$, "setTitle",
213 Clazz.overrideMethod (c$, "setMenuBar",
216 Clazz.overrideMethod (c$, "setResizable",
217 function (resizeable) {
219 Clazz.overrideMethod (c$, "setState",
222 Clazz.overrideMethod (c$, "getState",
226 Clazz.overrideMethod (c$, "setMaximizedBounds",
228 }, "java.awt.Rectangle");
229 Clazz.overrideMethod (c$, "setBoundsPrivate",
230 function (x, y, width, height) {
232 Clazz.overrideMethod (c$, "getBoundsPrivate",