Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / ImageIcon.js
index 56ead46..95b0d93 100644 (file)
-Clazz.declarePackage ("javax.swing");\r
-Clazz.load (["javax.swing.Icon", "java.lang.StringBuilder"], "javax.swing.ImageIcon", ["java.awt.Toolkit"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.filename = null;\r
-this.location = null;\r
-this.image = null;\r
-this.loadStatus = 0;\r
-this.imageObserver = null;\r
-this.description = null;\r
-this.width = -1;\r
-this.height = -1;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing, "ImageIcon", null, javax.swing.Icon);\r
-Clazz.makeConstructor (c$, \r
-function (filename, description) {\r
-this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (filename);\r
-if (this.image == null) {\r
-return;\r
-}this.filename = filename;\r
-this.description = description;\r
-this.loadImage (this.image);\r
-}, "~S,~S");\r
-Clazz.makeConstructor (c$, \r
-function (filename) {\r
-this.construct (filename, filename);\r
-}, "~S");\r
-Clazz.makeConstructor (c$, \r
-function (location, description) {\r
-this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (location);\r
-if (this.image == null) {\r
-return;\r
-}this.location = location;\r
-this.description = description;\r
-this.loadImage (this.image);\r
-}, "java.net.URL,~S");\r
-Clazz.makeConstructor (c$, \r
-function (location) {\r
-this.construct (location, location.toExternalForm ());\r
-}, "java.net.URL");\r
-Clazz.makeConstructor (c$, \r
-function (image, description) {\r
-this.construct (image);\r
-this.description = description;\r
-}, "java.awt.Image,~S");\r
-Clazz.makeConstructor (c$, \r
-function (image) {\r
-this.image = image;\r
-var o = image.getProperty ("comment", this.imageObserver);\r
-if (Clazz.instanceOf (o, String)) {\r
-this.description = o;\r
-}this.loadImage (image);\r
-}, "java.awt.Image");\r
-Clazz.makeConstructor (c$, \r
-function (imageData, description) {\r
-this.image = java.awt.Toolkit.getDefaultToolkit ().createImage (imageData);\r
-if (this.image == null) {\r
-return;\r
-}this.description = description;\r
-this.loadImage (this.image);\r
-}, "~A,~S");\r
-Clazz.makeConstructor (c$, \r
-function (imageData) {\r
-this.image = java.awt.Toolkit.getDefaultToolkit ().createImage (imageData);\r
-if (this.image == null) {\r
-return;\r
-}var o = this.image.getProperty ("comment", this.imageObserver);\r
-if (Clazz.instanceOf (o, String)) {\r
-this.description = o;\r
-}this.loadImage (this.image);\r
-}, "~A");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "loadImage", \r
-function (image) {\r
-this.width = image.getWidth (this.imageObserver);\r
-this.height = image.getHeight (this.imageObserver);\r
-}, "java.awt.Image");\r
-Clazz.defineMethod (c$, "getImageLoadStatus", \r
-function () {\r
-return this.loadStatus;\r
-});\r
-Clazz.defineMethod (c$, "getImage", \r
-function () {\r
-return this.image;\r
-});\r
-Clazz.defineMethod (c$, "setImage", \r
-function (image) {\r
-this.image = image;\r
-this.loadImage (image);\r
-}, "java.awt.Image");\r
-Clazz.defineMethod (c$, "getDescription", \r
-function () {\r
-return this.description;\r
-});\r
-Clazz.defineMethod (c$, "setDescription", \r
-function (description) {\r
-this.description = description;\r
-}, "~S");\r
-Clazz.overrideMethod (c$, "paintIcon", \r
-function (c, g, x, y) {\r
-if (this.imageObserver == null) {\r
-g.drawImage (this.image, x, y, c);\r
-} else {\r
-g.drawImage (this.image, x, y, this.imageObserver);\r
-}}, "java.awt.Component,java.awt.Graphics,~N,~N");\r
-Clazz.overrideMethod (c$, "getIconWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.overrideMethod (c$, "getIconHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.defineMethod (c$, "setImageObserver", \r
-function (observer) {\r
-this.imageObserver = observer;\r
-}, "java.awt.image.ImageObserver");\r
-Clazz.defineMethod (c$, "getImageObserver", \r
-function () {\r
-return this.imageObserver;\r
-});\r
-Clazz.defineMethod (c$, "toString", \r
-function () {\r
-if (this.description != null) {\r
-return this.description;\r
-}return Clazz.superCall (this, javax.swing.ImageIcon, "toString", []);\r
-});\r
-Clazz.defineStatics (c$,\r
-"mediaTrackerID", 0);\r
-c$.TRACKER_KEY = c$.prototype.TRACKER_KEY =  new StringBuilder ("TRACKER_KEY");\r
-});\r
+Clazz.declarePackage ("javax.swing");
+Clazz.load (["javax.swing.Icon", "java.lang.StringBuilder"], "javax.swing.ImageIcon", ["java.awt.Toolkit"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.filename = null;
+this.location = null;
+this.image = null;
+this.loadStatus = 0;
+this.imageObserver = null;
+this.description = null;
+this.width = -1;
+this.height = -1;
+Clazz.instantialize (this, arguments);
+}, javax.swing, "ImageIcon", null, javax.swing.Icon);
+Clazz.makeConstructor (c$, 
+function (filename, description) {
+this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (filename);
+if (this.image == null) {
+return;
+}this.filename = filename;
+this.description = description;
+this.loadImage (this.image);
+}, "~S,~S");
+Clazz.makeConstructor (c$, 
+function (filename) {
+this.construct (filename, filename);
+}, "~S");
+Clazz.makeConstructor (c$, 
+function (location, description) {
+this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (location);
+if (this.image == null) {
+return;
+}this.location = location;
+this.description = description;
+this.loadImage (this.image);
+}, "java.net.URL,~S");
+Clazz.makeConstructor (c$, 
+function (location) {
+this.construct (location, location.toExternalForm ());
+}, "java.net.URL");
+Clazz.makeConstructor (c$, 
+function (image, description) {
+this.construct (image);
+this.description = description;
+}, "java.awt.Image,~S");
+Clazz.makeConstructor (c$, 
+function (image) {
+this.image = image;
+var o = image.getProperty ("comment", this.imageObserver);
+if (Clazz.instanceOf (o, String)) {
+this.description = o;
+}this.loadImage (image);
+}, "java.awt.Image");
+Clazz.makeConstructor (c$, 
+function (imageData, description) {
+this.image = java.awt.Toolkit.getDefaultToolkit ().createImage (imageData);
+if (this.image == null) {
+return;
+}this.description = description;
+this.loadImage (this.image);
+}, "~A,~S");
+Clazz.makeConstructor (c$, 
+function (imageData) {
+this.image = java.awt.Toolkit.getDefaultToolkit ().createImage (imageData);
+if (this.image == null) {
+return;
+}var o = this.image.getProperty ("comment", this.imageObserver);
+if (Clazz.instanceOf (o, String)) {
+this.description = o;
+}this.loadImage (this.image);
+}, "~A");
+Clazz.makeConstructor (c$, 
+function () {
+});
+Clazz.defineMethod (c$, "loadImage", 
+function (image) {
+this.width = image.getWidth (this.imageObserver);
+this.height = image.getHeight (this.imageObserver);
+}, "java.awt.Image");
+Clazz.defineMethod (c$, "getImageLoadStatus", 
+function () {
+return this.loadStatus;
+});
+Clazz.defineMethod (c$, "getImage", 
+function () {
+return this.image;
+});
+Clazz.defineMethod (c$, "setImage", 
+function (image) {
+this.image = image;
+this.loadImage (image);
+}, "java.awt.Image");
+Clazz.defineMethod (c$, "getDescription", 
+function () {
+return this.description;
+});
+Clazz.defineMethod (c$, "setDescription", 
+function (description) {
+this.description = description;
+}, "~S");
+Clazz.overrideMethod (c$, "paintIcon", 
+function (c, g, x, y) {
+if (this.imageObserver == null) {
+g.drawImage (this.image, x, y, c);
+} else {
+g.drawImage (this.image, x, y, this.imageObserver);
+}}, "java.awt.Component,java.awt.Graphics,~N,~N");
+Clazz.overrideMethod (c$, "getIconWidth", 
+function () {
+return this.width;
+});
+Clazz.overrideMethod (c$, "getIconHeight", 
+function () {
+return this.height;
+});
+Clazz.defineMethod (c$, "setImageObserver", 
+function (observer) {
+this.imageObserver = observer;
+}, "java.awt.image.ImageObserver");
+Clazz.defineMethod (c$, "getImageObserver", 
+function () {
+return this.imageObserver;
+});
+Clazz.defineMethod (c$, "toString", 
+function () {
+if (this.description != null) {
+return this.description;
+}return Clazz.superCall (this, javax.swing.ImageIcon, "toString", []);
+});
+Clazz.defineStatics (c$,
+"mediaTrackerID", 0);
+c$.TRACKER_KEY = c$.prototype.TRACKER_KEY =  new StringBuilder ("TRACKER_KEY");
+});