Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / awt / Dialog.js
index f84d6d0..562b652 100644 (file)
-Clazz.declarePackage ("java.awt");\r
-Clazz.load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.resizable = true;\r
-this.undecorated = false;\r
-this.modal = false;\r
-this.modalityType = null;\r
-this.title = null;\r
-this.isInHide = false;\r
-this.isInDispose = false;\r
-Clazz.instantialize (this, arguments);\r
-}, java.awt, "Dialog", java.awt.Window);\r
-Clazz.makeConstructor (c$, \r
-function (owner) {\r
-this.construct (owner, "", false);\r
-}, "java.awt.Frame");\r
-Clazz.makeConstructor (c$, \r
-function (owner, modal) {\r
-this.construct (owner, "", modal);\r
-}, "java.awt.Frame,~B");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title) {\r
-this.construct (owner, title, false);\r
-}, "java.awt.Frame,~S");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modal) {\r
-this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);\r
-}, "java.awt.Frame,~S,~B");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modal, gc) {\r
-this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);\r
-}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");\r
-Clazz.makeConstructor (c$, \r
-function (owner) {\r
-this.construct (owner, "", false);\r
-}, "java.awt.Dialog");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title) {\r
-this.construct (owner, title, false);\r
-}, "java.awt.Dialog,~S");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modal) {\r
-this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);\r
-}, "java.awt.Dialog,~S,~B");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modal, gc) {\r
-this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);\r
-}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");\r
-Clazz.makeConstructor (c$, \r
-function (owner) {\r
-this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);\r
-}, "java.awt.Window");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title) {\r
-this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);\r
-}, "java.awt.Window,~S");\r
-Clazz.makeConstructor (c$, \r
-function (owner, modalityType) {\r
-this.construct (owner, null, modalityType);\r
-}, "java.awt.Window,java.awt.Dialog.ModalityType");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modalityType) {\r
-Clazz.superConstructor (this, java.awt.Dialog, [owner]);\r
-if ((owner != null) && !(Clazz.instanceOf (owner, java.awt.Frame)) && !(Clazz.instanceOf (owner, java.awt.Dialog))) {\r
-throw  new IllegalArgumentException ("Wrong parent window");\r
-}this.title = title;\r
-this.setModalityType (modalityType);\r
-}, "java.awt.Window,~S,java.awt.Dialog.ModalityType");\r
-Clazz.makeConstructor (c$, \r
-function (owner, title, modalityType, gc) {\r
-Clazz.superConstructor (this, java.awt.Dialog, [owner, gc]);\r
-if ((owner != null) && !(Clazz.instanceOf (owner, java.awt.Frame)) && !(Clazz.instanceOf (owner, java.awt.Dialog))) {\r
-throw  new IllegalArgumentException ("wrong owner window");\r
-}this.title = title;\r
-this.setModalityType (modalityType);\r
-}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");\r
-Clazz.overrideMethod (c$, "constructComponentName", \r
-function () {\r
-{\r
-return "dialog" + java.awt.Dialog.$nameCounter++;\r
-}});\r
-Clazz.defineMethod (c$, "addNotify", \r
-function () {\r
-{\r
-if (this.parent != null) {\r
-this.parent.addNotify ();\r
-}Clazz.superCall (this, java.awt.Dialog, "addNotify", []);\r
-}});\r
-Clazz.defineMethod (c$, "isModal", \r
-function () {\r
-return this.isModal_NoClientCode ();\r
-});\r
-Clazz.defineMethod (c$, "isModal_NoClientCode", \r
-function () {\r
-return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;\r
-});\r
-Clazz.defineMethod (c$, "setModal", \r
-function (modal) {\r
-this.modal = modal;\r
-this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getModalityType", \r
-function () {\r
-return this.modalityType;\r
-});\r
-Clazz.defineMethod (c$, "setModalityType", \r
-function (type) {\r
-if (type == null) {\r
-type = java.awt.Dialog.ModalityType.MODELESS;\r
-}if (this.modalityType === type) {\r
-return;\r
-}this.checkModalityPermission (type);\r
-this.modalityType = type;\r
-this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);\r
-}, "java.awt.Dialog.ModalityType");\r
-Clazz.defineMethod (c$, "getTitle", \r
-function () {\r
-return this.title;\r
-});\r
-Clazz.defineMethod (c$, "setTitle", \r
-function (title) {\r
-var oldTitle = this.title;\r
-{\r
-this.title = title;\r
-}this.firePropertyChangeObject ("title", oldTitle, title);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "show", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "modalityPushed", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "modalityPopped", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "interruptBlocking", \r
-function () {\r
-if (this.isModal ()) {\r
-this.disposeImpl ();\r
-} else if (this.windowClosingException != null) {\r
-this.windowClosingException.fillInStackTrace ();\r
-this.windowClosingException.printStackTrace ();\r
-this.windowClosingException = null;\r
-}});\r
-Clazz.defineMethod (c$, "hideAndDisposePreHandler", \r
- function () {\r
-this.isInHide = true;\r
-});\r
-Clazz.defineMethod (c$, "hideAndDisposeHandler", \r
- function () {\r
-this.isInHide = false;\r
-});\r
-Clazz.defineMethod (c$, "hide", \r
-function () {\r
-this.hideAndDisposePreHandler ();\r
-Clazz.superCall (this, java.awt.Dialog, "hide", []);\r
-if (!this.isInDispose) {\r
-this.hideAndDisposeHandler ();\r
-}});\r
-Clazz.defineMethod (c$, "doDispose", \r
-function () {\r
-this.isInDispose = true;\r
-Clazz.superCall (this, java.awt.Dialog, "doDispose", []);\r
-this.hideAndDisposeHandler ();\r
-this.isInDispose = false;\r
-});\r
-Clazz.defineMethod (c$, "isResizable", \r
-function () {\r
-return this.resizable;\r
-});\r
-Clazz.defineMethod (c$, "setResizable", \r
-function (resizable) {\r
-var testvalid = false;\r
-{\r
-this.resizable = resizable;\r
-}if (testvalid) {\r
-this.invalidateIfValid ();\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "setUndecorated", \r
-function (undecorated) {\r
-{\r
-if (this.isDisplayable ()) {\r
-throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");\r
-}this.undecorated = undecorated;\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "isUndecorated", \r
-function () {\r
-return this.undecorated;\r
-});\r
-Clazz.defineMethod (c$, "paramString", \r
-function () {\r
-var str = Clazz.superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;\r
-if (this.title != null) {\r
-str += ",title=" + this.title;\r
-}return str;\r
-});\r
-Clazz.defineMethod (c$, "modalShow", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "modalHide", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "shouldBlock", \r
-function (w) {\r
-if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {\r
-return false;\r
-}if ((Clazz.instanceOf (w, java.awt.Dialog)) && (w).isInHide) {\r
-return false;\r
-}var blockerToCheck = this;\r
-while (blockerToCheck != null) {\r
-var c = w;\r
-while ((c != null) && (c !== blockerToCheck)) {\r
-c = c.getParent_NoClientCode ();\r
-}\r
-if (c === blockerToCheck) {\r
-return false;\r
-}blockerToCheck = blockerToCheck.getModalBlocker ();\r
-}\r
-switch (this.modalityType) {\r
-case java.awt.Dialog.ModalityType.MODELESS:\r
-return false;\r
-case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:\r
-if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {\r
-var c = this;\r
-while ((c != null) && (c !== w)) {\r
-c = c.getParent_NoClientCode ();\r
-}\r
-return c === w;\r
-} else {\r
-return this.getDocumentRoot () === w.getDocumentRoot ();\r
-}case java.awt.Dialog.ModalityType.APPLICATION_MODAL:\r
-return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);\r
-case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:\r
-return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);\r
-}\r
-return false;\r
-}, "java.awt.Window");\r
-Clazz.defineMethod (c$, "checkModalityPermission", \r
- function (mt) {\r
-}, "java.awt.Dialog.ModalityType");\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareType (java.awt.Dialog, "ModalityType", Enum);\r
-Clazz.defineEnumConstant (c$, "MODELESS", 0, []);\r
-Clazz.defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);\r
-Clazz.defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);\r
-Clazz.defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);\r
-c$ = Clazz.p0p ();\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareType (java.awt.Dialog, "ModalExclusionType", Enum);\r
-Clazz.defineEnumConstant (c$, "NO_EXCLUDE", 0, []);\r
-Clazz.defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);\r
-Clazz.defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);\r
-c$ = Clazz.p0p ();\r
-c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;\r
-Clazz.defineStatics (c$,\r
-"$base", "dialog",\r
-"$nameCounter", 0);\r
-});\r
+Clazz.declarePackage ("java.awt");
+Clazz.load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.resizable = true;
+this.undecorated = false;
+this.modal = false;
+this.modalityType = null;
+this.title = null;
+this.isInHide = false;
+this.isInDispose = false;
+Clazz.instantialize (this, arguments);
+}, java.awt, "Dialog", java.awt.Window);
+Clazz.makeConstructor (c$, 
+function (owner) {
+this.construct (owner, "", false);
+}, "java.awt.Frame");
+Clazz.makeConstructor (c$, 
+function (owner, modal) {
+this.construct (owner, "", modal);
+}, "java.awt.Frame,~B");
+Clazz.makeConstructor (c$, 
+function (owner, title) {
+this.construct (owner, title, false);
+}, "java.awt.Frame,~S");
+Clazz.makeConstructor (c$, 
+function (owner, title, modal) {
+this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
+}, "java.awt.Frame,~S,~B");
+Clazz.makeConstructor (c$, 
+function (owner, title, modal, gc) {
+this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
+}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
+Clazz.makeConstructor (c$, 
+function (owner) {
+this.construct (owner, "", false);
+}, "java.awt.Dialog");
+Clazz.makeConstructor (c$, 
+function (owner, title) {
+this.construct (owner, title, false);
+}, "java.awt.Dialog,~S");
+Clazz.makeConstructor (c$, 
+function (owner, title, modal) {
+this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
+}, "java.awt.Dialog,~S,~B");
+Clazz.makeConstructor (c$, 
+function (owner, title, modal, gc) {
+this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
+}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
+Clazz.makeConstructor (c$, 
+function (owner) {
+this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
+}, "java.awt.Window");
+Clazz.makeConstructor (c$, 
+function (owner, title) {
+this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
+}, "java.awt.Window,~S");
+Clazz.makeConstructor (c$, 
+function (owner, modalityType) {
+this.construct (owner, null, modalityType);
+}, "java.awt.Window,java.awt.Dialog.ModalityType");
+Clazz.makeConstructor (c$, 
+function (owner, title, modalityType) {
+Clazz.superConstructor (this, java.awt.Dialog, [owner]);
+if ((owner != null) && !(Clazz.instanceOf (owner, java.awt.Frame)) && !(Clazz.instanceOf (owner, java.awt.Dialog))) {
+throw  new IllegalArgumentException ("Wrong parent window");
+}this.title = title;
+this.setModalityType (modalityType);
+}, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
+Clazz.makeConstructor (c$, 
+function (owner, title, modalityType, gc) {
+Clazz.superConstructor (this, java.awt.Dialog, [owner, gc]);
+if ((owner != null) && !(Clazz.instanceOf (owner, java.awt.Frame)) && !(Clazz.instanceOf (owner, java.awt.Dialog))) {
+throw  new IllegalArgumentException ("wrong owner window");
+}this.title = title;
+this.setModalityType (modalityType);
+}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
+Clazz.overrideMethod (c$, "constructComponentName", 
+function () {
+{
+return "dialog" + java.awt.Dialog.$nameCounter++;
+}});
+Clazz.defineMethod (c$, "addNotify", 
+function () {
+{
+if (this.parent != null) {
+this.parent.addNotify ();
+}Clazz.superCall (this, java.awt.Dialog, "addNotify", []);
+}});
+Clazz.defineMethod (c$, "isModal", 
+function () {
+return this.isModal_NoClientCode ();
+});
+Clazz.defineMethod (c$, "isModal_NoClientCode", 
+function () {
+return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
+});
+Clazz.defineMethod (c$, "setModal", 
+function (modal) {
+this.modal = modal;
+this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
+}, "~B");
+Clazz.defineMethod (c$, "getModalityType", 
+function () {
+return this.modalityType;
+});
+Clazz.defineMethod (c$, "setModalityType", 
+function (type) {
+if (type == null) {
+type = java.awt.Dialog.ModalityType.MODELESS;
+}if (this.modalityType === type) {
+return;
+}this.checkModalityPermission (type);
+this.modalityType = type;
+this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
+}, "java.awt.Dialog.ModalityType");
+Clazz.defineMethod (c$, "getTitle", 
+function () {
+return this.title;
+});
+Clazz.defineMethod (c$, "setTitle", 
+function (title) {
+var oldTitle = this.title;
+{
+this.title = title;
+}this.firePropertyChangeObject ("title", oldTitle, title);
+}, "~S");
+Clazz.defineMethod (c$, "show", 
+function () {
+});
+Clazz.defineMethod (c$, "modalityPushed", 
+function () {
+});
+Clazz.defineMethod (c$, "modalityPopped", 
+function () {
+});
+Clazz.defineMethod (c$, "interruptBlocking", 
+function () {
+if (this.isModal ()) {
+this.disposeImpl ();
+} else if (this.windowClosingException != null) {
+this.windowClosingException.fillInStackTrace ();
+this.windowClosingException.printStackTrace ();
+this.windowClosingException = null;
+}});
+Clazz.defineMethod (c$, "hideAndDisposePreHandler", 
+ function () {
+this.isInHide = true;
+});
+Clazz.defineMethod (c$, "hideAndDisposeHandler", 
+ function () {
+this.isInHide = false;
+});
+Clazz.defineMethod (c$, "hide", 
+function () {
+this.hideAndDisposePreHandler ();
+Clazz.superCall (this, java.awt.Dialog, "hide", []);
+if (!this.isInDispose) {
+this.hideAndDisposeHandler ();
+}});
+Clazz.defineMethod (c$, "doDispose", 
+function () {
+this.isInDispose = true;
+Clazz.superCall (this, java.awt.Dialog, "doDispose", []);
+this.hideAndDisposeHandler ();
+this.isInDispose = false;
+});
+Clazz.defineMethod (c$, "isResizable", 
+function () {
+return this.resizable;
+});
+Clazz.defineMethod (c$, "setResizable", 
+function (resizable) {
+var testvalid = false;
+{
+this.resizable = resizable;
+}if (testvalid) {
+this.invalidateIfValid ();
+}}, "~B");
+Clazz.defineMethod (c$, "setUndecorated", 
+function (undecorated) {
+{
+if (this.isDisplayable ()) {
+throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
+}this.undecorated = undecorated;
+}}, "~B");
+Clazz.defineMethod (c$, "isUndecorated", 
+function () {
+return this.undecorated;
+});
+Clazz.defineMethod (c$, "paramString", 
+function () {
+var str = Clazz.superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
+if (this.title != null) {
+str += ",title=" + this.title;
+}return str;
+});
+Clazz.defineMethod (c$, "modalShow", 
+function () {
+});
+Clazz.defineMethod (c$, "modalHide", 
+function () {
+});
+Clazz.defineMethod (c$, "shouldBlock", 
+function (w) {
+if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
+return false;
+}if ((Clazz.instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
+return false;
+}var blockerToCheck = this;
+while (blockerToCheck != null) {
+var c = w;
+while ((c != null) && (c !== blockerToCheck)) {
+c = c.getParent_NoClientCode ();
+}
+if (c === blockerToCheck) {
+return false;
+}blockerToCheck = blockerToCheck.getModalBlocker ();
+}
+switch (this.modalityType) {
+case java.awt.Dialog.ModalityType.MODELESS:
+return false;
+case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
+if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
+var c = this;
+while ((c != null) && (c !== w)) {
+c = c.getParent_NoClientCode ();
+}
+return c === w;
+} else {
+return this.getDocumentRoot () === w.getDocumentRoot ();
+}case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
+return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
+case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
+return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
+}
+return false;
+}, "java.awt.Window");
+Clazz.defineMethod (c$, "checkModalityPermission", 
+ function (mt) {
+}, "java.awt.Dialog.ModalityType");
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareType (java.awt.Dialog, "ModalityType", Enum);
+Clazz.defineEnumConstant (c$, "MODELESS", 0, []);
+Clazz.defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
+Clazz.defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
+Clazz.defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
+c$ = Clazz.p0p ();
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareType (java.awt.Dialog, "ModalExclusionType", Enum);
+Clazz.defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
+Clazz.defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
+Clazz.defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
+c$ = Clazz.p0p ();
+c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
+Clazz.defineStatics (c$,
+"$base", "dialog",
+"$nameCounter", 0);
+});