Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / swingjs / JSWindowPeer.js
index b1aba76..2814a93 100644 (file)
-Clazz.declarePackage ("swingjs");\r
-Clazz.load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.window = null;\r
-this.isFrame = false;\r
-this.applet = null;\r
-this.graphics = null;\r
-this.font = null;\r
-Clazz.instantialize (this, arguments);\r
-}, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);\r
-Clazz.overrideMethod (c$, "setFrame", \r
-function (target, isFrame) {\r
-this.isFrame = isFrame;\r
-this.window = target;\r
-var jc = this;\r
-jc.myThread = Thread.currentThread ();\r
-jc.threadGroup = jc.myThread.getThreadGroup ();\r
-this.applet = (jc.threadGroup).getHtmlApplet ();\r
-this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);\r
-return this;\r
-}, "java.awt.Window,~B");\r
-Clazz.overrideMethod (c$, "getGraphics", \r
-function () {\r
-this.graphics.setFont (this.window.getFont ());\r
-return this.graphics;\r
-});\r
-Clazz.overrideMethod (c$, "getToolkit", \r
-function () {\r
-return java.awt.Toolkit.getDefaultToolkit ();\r
-});\r
-Clazz.overrideMethod (c$, "getFontMetrics", \r
-function (font) {\r
-if (!font.equals (this.font)) this.window.setFont (this.font = font);\r
-return this.graphics.getFontMetrics (font);\r
-}, "java.awt.Font");\r
-Clazz.overrideMethod (c$, "getInsets", \r
-function () {\r
-return  new java.awt.Insets (0, 0, 0, 0);\r
-});\r
-Clazz.overrideMethod (c$, "beginValidate", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "endValidate", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "beginLayout", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "endLayout", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "isObscured", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "canDetermineObscurity", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "setVisible", \r
-function (b) {\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "setEnabled", \r
-function (b) {\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "paint", \r
-function (g) {\r
-}, "java.awt.Graphics");\r
-Clazz.overrideMethod (c$, "repaint", \r
-function (tm, x, y, width, height) {\r
-}, "~N,~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "print", \r
-function (g) {\r
-}, "java.awt.Graphics");\r
-Clazz.overrideMethod (c$, "setBounds", \r
-function (x, y, width, height, op) {\r
-}, "~N,~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "handleEvent", \r
-function (e) {\r
-}, "java.awt.AWTEvent");\r
-Clazz.overrideMethod (c$, "coalescePaintEvent", \r
-function (e) {\r
-}, "java.awt.event.PaintEvent");\r
-Clazz.overrideMethod (c$, "getLocationOnScreen", \r
-function () {\r
-return  new java.awt.Point ();\r
-});\r
-Clazz.overrideMethod (c$, "getPreferredSize", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "getMinimumSize", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "getColorModel", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "dispose", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "setForeground", \r
-function (c) {\r
-}, "java.awt.Color");\r
-Clazz.overrideMethod (c$, "setBackground", \r
-function (c) {\r
-}, "java.awt.Color");\r
-Clazz.overrideMethod (c$, "setFont", \r
-function (f) {\r
-this.font = f;\r
-}, "java.awt.Font");\r
-Clazz.overrideMethod (c$, "updateCursorImmediately", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "requestFocus", \r
-function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {\r
-return false;\r
-}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");\r
-Clazz.overrideMethod (c$, "isFocusable", \r
-function () {\r
-return false;\r
-});\r
-Clazz.defineMethod (c$, "createImage", \r
-function (producer) {\r
-return null;\r
-}, "java.awt.image.ImageProducer");\r
-Clazz.defineMethod (c$, "createImage", \r
-function (width, height) {\r
-return null;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "createVolatileImage", \r
-function (width, height) {\r
-return null;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "prepareImage", \r
-function (img, w, h, o) {\r
-return false;\r
-}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");\r
-Clazz.overrideMethod (c$, "checkImage", \r
-function (img, w, h, o) {\r
-return 0;\r
-}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");\r
-Clazz.overrideMethod (c$, "getGraphicsConfiguration", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "handlesWheelScrolling", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "getBackBuffer", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "destroyBuffers", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "reparent", \r
-function (newContainer) {\r
-}, "java.awt.peer.ContainerPeer");\r
-Clazz.overrideMethod (c$, "isReparentSupported", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "layout", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "getBounds", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "toFront", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "toBack", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "updateAlwaysOnTopState", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "updateFocusableWindowState", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "requestWindowFocus", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "setModalBlocked", \r
-function (blocker, blocked) {\r
-}, "java.awt.Dialog,~B");\r
-Clazz.overrideMethod (c$, "updateMinimumSize", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "updateIconImages", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "setOpacity", \r
-function (opacity) {\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "setOpaque", \r
-function (isOpaque) {\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "updateWindow", \r
-function (backBuffer) {\r
-}, "java.awt.image.BufferedImage");\r
-Clazz.overrideMethod (c$, "repositionSecurityWarning", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "setTitle", \r
-function (title) {\r
-}, "~S");\r
-Clazz.overrideMethod (c$, "setMenuBar", \r
-function (mb) {\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "setResizable", \r
-function (resizeable) {\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "setState", \r
-function (state) {\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getState", \r
-function () {\r
-return 0;\r
-});\r
-Clazz.overrideMethod (c$, "setMaximizedBounds", \r
-function (bounds) {\r
-}, "java.awt.Rectangle");\r
-Clazz.overrideMethod (c$, "setBoundsPrivate", \r
-function (x, y, width, height) {\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "getBoundsPrivate", \r
-function () {\r
-return null;\r
-});\r
-});\r
+Clazz.declarePackage ("swingjs");
+Clazz.load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.window = null;
+this.isFrame = false;
+this.applet = null;
+this.graphics = null;
+this.font = null;
+Clazz.instantialize (this, arguments);
+}, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
+Clazz.overrideMethod (c$, "setFrame", 
+function (target, isFrame) {
+this.isFrame = isFrame;
+this.window = target;
+var jc = this;
+jc.myThread = Thread.currentThread ();
+jc.threadGroup = jc.myThread.getThreadGroup ();
+this.applet = (jc.threadGroup).getHtmlApplet ();
+this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
+return this;
+}, "java.awt.Window,~B");
+Clazz.overrideMethod (c$, "getGraphics", 
+function () {
+this.graphics.setFont (this.window.getFont ());
+return this.graphics;
+});
+Clazz.overrideMethod (c$, "getToolkit", 
+function () {
+return java.awt.Toolkit.getDefaultToolkit ();
+});
+Clazz.overrideMethod (c$, "getFontMetrics", 
+function (font) {
+if (!font.equals (this.font)) this.window.setFont (this.font = font);
+return this.graphics.getFontMetrics (font);
+}, "java.awt.Font");
+Clazz.overrideMethod (c$, "getInsets", 
+function () {
+return  new java.awt.Insets (0, 0, 0, 0);
+});
+Clazz.overrideMethod (c$, "beginValidate", 
+function () {
+});
+Clazz.overrideMethod (c$, "endValidate", 
+function () {
+});
+Clazz.overrideMethod (c$, "beginLayout", 
+function () {
+});
+Clazz.overrideMethod (c$, "endLayout", 
+function () {
+});
+Clazz.overrideMethod (c$, "isObscured", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "canDetermineObscurity", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "setVisible", 
+function (b) {
+}, "~B");
+Clazz.overrideMethod (c$, "setEnabled", 
+function (b) {
+}, "~B");
+Clazz.overrideMethod (c$, "paint", 
+function (g) {
+}, "java.awt.Graphics");
+Clazz.overrideMethod (c$, "repaint", 
+function (tm, x, y, width, height) {
+}, "~N,~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "print", 
+function (g) {
+}, "java.awt.Graphics");
+Clazz.overrideMethod (c$, "setBounds", 
+function (x, y, width, height, op) {
+}, "~N,~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "handleEvent", 
+function (e) {
+}, "java.awt.AWTEvent");
+Clazz.overrideMethod (c$, "coalescePaintEvent", 
+function (e) {
+}, "java.awt.event.PaintEvent");
+Clazz.overrideMethod (c$, "getLocationOnScreen", 
+function () {
+return  new java.awt.Point ();
+});
+Clazz.overrideMethod (c$, "getPreferredSize", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "getMinimumSize", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "getColorModel", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "dispose", 
+function () {
+});
+Clazz.overrideMethod (c$, "setForeground", 
+function (c) {
+}, "java.awt.Color");
+Clazz.overrideMethod (c$, "setBackground", 
+function (c) {
+}, "java.awt.Color");
+Clazz.overrideMethod (c$, "setFont", 
+function (f) {
+this.font = f;
+}, "java.awt.Font");
+Clazz.overrideMethod (c$, "updateCursorImmediately", 
+function () {
+});
+Clazz.overrideMethod (c$, "requestFocus", 
+function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
+return false;
+}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
+Clazz.overrideMethod (c$, "isFocusable", 
+function () {
+return false;
+});
+Clazz.defineMethod (c$, "createImage", 
+function (producer) {
+return null;
+}, "java.awt.image.ImageProducer");
+Clazz.defineMethod (c$, "createImage", 
+function (width, height) {
+return null;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "createVolatileImage", 
+function (width, height) {
+return null;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "prepareImage", 
+function (img, w, h, o) {
+return false;
+}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
+Clazz.overrideMethod (c$, "checkImage", 
+function (img, w, h, o) {
+return 0;
+}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
+Clazz.overrideMethod (c$, "getGraphicsConfiguration", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "handlesWheelScrolling", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "getBackBuffer", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "destroyBuffers", 
+function () {
+});
+Clazz.overrideMethod (c$, "reparent", 
+function (newContainer) {
+}, "java.awt.peer.ContainerPeer");
+Clazz.overrideMethod (c$, "isReparentSupported", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "layout", 
+function () {
+});
+Clazz.overrideMethod (c$, "getBounds", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "toFront", 
+function () {
+});
+Clazz.overrideMethod (c$, "toBack", 
+function () {
+});
+Clazz.overrideMethod (c$, "updateAlwaysOnTopState", 
+function () {
+});
+Clazz.overrideMethod (c$, "updateFocusableWindowState", 
+function () {
+});
+Clazz.overrideMethod (c$, "requestWindowFocus", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "setModalBlocked", 
+function (blocker, blocked) {
+}, "java.awt.Dialog,~B");
+Clazz.overrideMethod (c$, "updateMinimumSize", 
+function () {
+});
+Clazz.overrideMethod (c$, "updateIconImages", 
+function () {
+});
+Clazz.overrideMethod (c$, "setOpacity", 
+function (opacity) {
+}, "~N");
+Clazz.overrideMethod (c$, "setOpaque", 
+function (isOpaque) {
+}, "~B");
+Clazz.overrideMethod (c$, "updateWindow", 
+function (backBuffer) {
+}, "java.awt.image.BufferedImage");
+Clazz.overrideMethod (c$, "repositionSecurityWarning", 
+function () {
+});
+Clazz.overrideMethod (c$, "setTitle", 
+function (title) {
+}, "~S");
+Clazz.overrideMethod (c$, "setMenuBar", 
+function (mb) {
+}, "~O");
+Clazz.overrideMethod (c$, "setResizable", 
+function (resizeable) {
+}, "~B");
+Clazz.overrideMethod (c$, "setState", 
+function (state) {
+}, "~N");
+Clazz.overrideMethod (c$, "getState", 
+function () {
+return 0;
+});
+Clazz.overrideMethod (c$, "setMaximizedBounds", 
+function (bounds) {
+}, "java.awt.Rectangle");
+Clazz.overrideMethod (c$, "setBoundsPrivate", 
+function (x, y, width, height) {
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "getBoundsPrivate", 
+function () {
+return null;
+});
+});