X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fappletgui%2FJVDialog.js;h=ed9ee14d80686e535841f876922af365cbabaa28;hp=6f85ed1959930a977d1ec8851ad916ac1b06e0a2;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jalview/appletgui/JVDialog.js b/site/j2s/jalview/appletgui/JVDialog.js index 6f85ed1..ed9ee14 100644 --- a/site/j2s/jalview/appletgui/JVDialog.js +++ b/site/j2s/jalview/appletgui/JVDialog.js @@ -1,40 +1,40 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["java.awt.Dialog", "java.awt.event.ActionListener", "awt2swing.Button"], "jalview.appletgui.JVDialog", ["awt2swing.Panel", "java.awt.FlowLayout"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ap = null; -this.buttonPanel = null; -this.ok = null; -this.cancel = null; -this.accept = false; -this.owner = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "JVDialog", java.awt.Dialog, java.awt.event.ActionListener); -Clazz.prepareFields (c$, function () { -this.ok = new awt2swing.Button ("Accept"); -this.cancel = new awt2swing.Button ("Cancel"); -}); -Clazz.makeConstructor (c$, -function (owner, title, modal, width, height) { -Clazz.superConstructor (this, jalview.appletgui.JVDialog, [owner, title, modal]); -this.owner = owner; -height += owner.getInsets ().top + this.getInsets ().bottom; -this.setBounds (owner.getBounds ().x + Clazz.doubleToInt ((owner.getSize ().width - width) / 2), owner.getBounds ().y + Clazz.doubleToInt ((owner.getSize ().height - height) / 2), width, height); -}, "awt2swing.Frame,~S,~B,~N,~N"); -Clazz.defineMethod (c$, "setMainPanel", -function (panel) { -this.add (panel, "North"); -this.buttonPanel = new awt2swing.Panel ( new java.awt.FlowLayout ()); -this.buttonPanel.add (this.ok); -this.buttonPanel.add (this.cancel); -this.ok.addActionListener (this); -this.cancel.addActionListener (this); -this.add (this.buttonPanel, "South"); -this.pack (); -}, "awt2swing.Panel"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.ok) { -this.accept = true; -}this.setVisible (false); -}, "java.awt.event.ActionEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["java.awt.Dialog", "java.awt.event.ActionListener", "awt2swing.Button"], "jalview.appletgui.JVDialog", ["awt2swing.Panel", "java.awt.FlowLayout"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ap = null; +this.buttonPanel = null; +this.ok = null; +this.cancel = null; +this.accept = false; +this.owner = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "JVDialog", java.awt.Dialog, java.awt.event.ActionListener); +Clazz.prepareFields (c$, function () { +this.ok = new awt2swing.Button ("Accept"); +this.cancel = new awt2swing.Button ("Cancel"); +}); +Clazz.makeConstructor (c$, +function (owner, title, modal, width, height) { +Clazz.superConstructor (this, jalview.appletgui.JVDialog, [owner, title, modal]); +this.owner = owner; +height += owner.getInsets ().top + this.getInsets ().bottom; +this.setBounds (owner.getBounds ().x + Clazz.doubleToInt ((owner.getSize ().width - width) / 2), owner.getBounds ().y + Clazz.doubleToInt ((owner.getSize ().height - height) / 2), width, height); +}, "awt2swing.Frame,~S,~B,~N,~N"); +Clazz.defineMethod (c$, "setMainPanel", +function (panel) { +this.add (panel, "North"); +this.buttonPanel = new awt2swing.Panel ( new java.awt.FlowLayout ()); +this.buttonPanel.add (this.ok); +this.buttonPanel.add (this.cancel); +this.ok.addActionListener (this); +this.cancel.addActionListener (this); +this.add (this.buttonPanel, "South"); +this.pack (); +}, "awt2swing.Panel"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.ok) { +this.accept = true; +}this.setVisible (false); +}, "java.awt.event.ActionEvent"); +});