Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jalview / appletgui / IdwidthAdjuster.js
index 80a0c59..e7b92f7 100644 (file)
@@ -1,66 +1,66 @@
-Clazz.declarePackage ("jalview.appletgui");\r
-Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.IdwidthAdjuster", ["java.awt.Color", "$.Toolkit"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.active = false;\r
-this.oldX = 0;\r
-this.image = null;\r
-this.ap = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.appletgui, "IdwidthAdjuster", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]);\r
-Clazz.makeConstructor (c$, \r
-function (ap) {\r
-Clazz.superConstructor (this, jalview.appletgui.IdwidthAdjuster, []);\r
-this.setName ("IdwidthAdjuster");\r
-this.setLayout (null);\r
-this.ap = ap;\r
-var url = this.getClass ().getResource ("/images/idwidth.gif");\r
-if (url != null) {\r
-this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (url);\r
-}this.addMouseListener (this);\r
-this.addMouseMotionListener (this);\r
-}, "jalview.appletgui.AlignmentPanel");\r
-Clazz.overrideMethod (c$, "mousePressed", \r
-function (evt) {\r
-this.oldX = evt.getX ();\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseReleased", \r
-function (evt) {\r
-this.active = false;\r
-this.repaint ();\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseEntered", \r
-function (evt) {\r
-this.active = true;\r
-this.repaint ();\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseExited", \r
-function (evt) {\r
-this.active = false;\r
-this.repaint ();\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseDragged", \r
-function (evt) {\r
-this.active = true;\r
-var d = this.ap.idPanel.idCanvas.getSize ();\r
-var dif = evt.getX () - this.oldX;\r
-var newWidth = d.width + dif;\r
-if (newWidth > 20 || dif > 0) {\r
-this.ap.setIdWidth (newWidth, d.height);\r
-this.setSize (newWidth, this.getSize ().height);\r
-this.oldX = evt.getX ();\r
-}}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseMoved", \r
-function (evt) {\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.overrideMethod (c$, "mouseClicked", \r
-function (evt) {\r
-}, "java.awt.event.MouseEvent");\r
-Clazz.defineMethod (c$, "PaintComponent", \r
-function (g) {\r
-g.setColor (java.awt.Color.white);\r
-g.fillRect (0, 0, this.getSize ().width, this.getSize ().height);\r
-if (this.active) {\r
-if (this.image != null) {\r
-g.drawImage (this.image, this.getSize ().width - 20, 2, this);\r
-}}}, "java.awt.Graphics");\r
-});\r
+Clazz.declarePackage ("jalview.appletgui");
+Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.IdwidthAdjuster", ["java.awt.Color", "$.Toolkit"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.active = false;
+this.oldX = 0;
+this.image = null;
+this.ap = null;
+Clazz.instantialize (this, arguments);
+}, jalview.appletgui, "IdwidthAdjuster", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]);
+Clazz.makeConstructor (c$, 
+function (ap) {
+Clazz.superConstructor (this, jalview.appletgui.IdwidthAdjuster, []);
+this.setName ("IdwidthAdjuster");
+this.setLayout (null);
+this.ap = ap;
+var url = this.getClass ().getResource ("/images/idwidth.gif");
+if (url != null) {
+this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (url);
+}this.addMouseListener (this);
+this.addMouseMotionListener (this);
+}, "jalview.appletgui.AlignmentPanel");
+Clazz.overrideMethod (c$, "mousePressed", 
+function (evt) {
+this.oldX = evt.getX ();
+}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseReleased", 
+function (evt) {
+this.active = false;
+this.repaint ();
+}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseEntered", 
+function (evt) {
+this.active = true;
+this.repaint ();
+}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseExited", 
+function (evt) {
+this.active = false;
+this.repaint ();
+}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseDragged", 
+function (evt) {
+this.active = true;
+var d = this.ap.idPanel.idCanvas.getSize ();
+var dif = evt.getX () - this.oldX;
+var newWidth = d.width + dif;
+if (newWidth > 20 || dif > 0) {
+this.ap.setIdWidth (newWidth, d.height);
+this.setSize (newWidth, this.getSize ().height);
+this.oldX = evt.getX ();
+}}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseMoved", 
+function (evt) {
+}, "java.awt.event.MouseEvent");
+Clazz.overrideMethod (c$, "mouseClicked", 
+function (evt) {
+}, "java.awt.event.MouseEvent");
+Clazz.defineMethod (c$, "PaintComponent", 
+function (g) {
+g.setColor (java.awt.Color.white);
+g.fillRect (0, 0, this.getSize ().width, this.getSize ().height);
+if (this.active) {
+if (this.image != null) {
+g.drawImage (this.image, this.getSize ().width - 20, 2, this);
+}}}, "java.awt.Graphics");
+});