JAL-1807 test
[jalviewjs.git] / bin / javajs / awt / Component.js
index f17a3eb..20f1f1a 100644 (file)
-Clazz.declarePackage ("javajs.awt");\r
-Clazz.load (null, "javajs.awt.Component", ["javajs.util.CU"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.visible = false;\r
-this.enabled = true;\r
-this.text = null;\r
-this.name = null;\r
-this.width = 0;\r
-this.height = 0;\r
-this.id = null;\r
-this.parent = null;\r
-this.mouseListener = null;\r
-this.bgcolor = null;\r
-this.minWidth = 30;\r
-this.minHeight = 30;\r
-this.renderWidth = 0;\r
-this.renderHeight = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javajs.awt, "Component");\r
-Clazz.defineMethod (c$, "setParent", \r
-function (p) {\r
-this.parent = p;\r
-}, "~O");\r
-Clazz.makeConstructor (c$, \r
-function (type) {\r
-this.id = javajs.awt.Component.newID (type);\r
-if (type == null) return;\r
-{\r
-SwingController.register(this, type);\r
-}}, "~S");\r
-c$.newID = Clazz.defineMethod (c$, "newID", \r
-function (type) {\r
-return type + ("" + Math.random ()).substring (3, 10);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "setBackground", \r
-function (color) {\r
-this.bgcolor = color;\r
-}, "javajs.api.GenericColor");\r
-Clazz.defineMethod (c$, "setText", \r
-function (text) {\r
-this.text = text;\r
-{\r
-SwingController.setText(this);\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "setName", \r
-function (name) {\r
-this.name = name;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-return this.name;\r
-});\r
-Clazz.defineMethod (c$, "getParent", \r
-function () {\r
-return this.parent;\r
-});\r
-Clazz.defineMethod (c$, "setPreferredSize", \r
-function (dimension) {\r
-this.width = dimension.width;\r
-this.height = dimension.height;\r
-}, "javajs.awt.Dimension");\r
-Clazz.defineMethod (c$, "addMouseListener", \r
-function (listener) {\r
-this.mouseListener = listener;\r
-}, "~O");\r
-Clazz.defineMethod (c$, "getText", \r
-function () {\r
-return this.text;\r
-});\r
-Clazz.defineMethod (c$, "isEnabled", \r
-function () {\r
-return this.enabled;\r
-});\r
-Clazz.defineMethod (c$, "setEnabled", \r
-function (enabled) {\r
-this.enabled = enabled;\r
-{\r
-SwingController.setEnabled(this);\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "isVisible", \r
-function () {\r
-return this.visible;\r
-});\r
-Clazz.defineMethod (c$, "setVisible", \r
-function (visible) {\r
-this.visible = visible;\r
-{\r
-SwingController.setVisible(this);\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "getHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.defineMethod (c$, "getWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.defineMethod (c$, "setMinimumSize", \r
-function (d) {\r
-this.minWidth = d.width;\r
-this.minHeight = d.height;\r
-}, "javajs.awt.Dimension");\r
-Clazz.defineMethod (c$, "getSubcomponentWidth", \r
-function () {\r
-return this.width;\r
-});\r
-Clazz.defineMethod (c$, "getSubcomponentHeight", \r
-function () {\r
-return this.height;\r
-});\r
-Clazz.defineMethod (c$, "getCSSstyle", \r
-function (defaultPercentW, defaultPercentH) {\r
-var width = (this.renderWidth > 0 ? this.renderWidth : this.getSubcomponentWidth ());\r
-var height = (this.renderHeight > 0 ? this.renderHeight : this.getSubcomponentHeight ());\r
-return (width > 0 ? "width:" + width + "px;" : defaultPercentW > 0 ? "width:" + defaultPercentW + "%;" : "") + (height > 0 ? "height:" + height + "px;" : defaultPercentH > 0 ? "height:" + defaultPercentH + "%;" : "") + (this.bgcolor == null ? "" : "background-color:" + javajs.util.CU.toCSSString (this.bgcolor) + ";");\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "repaint", \r
-function () {\r
-});\r
-});\r
+Clazz.declarePackage ("javajs.awt");
+Clazz.load (null, "javajs.awt.Component", ["javajs.util.CU"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.visible = false;
+this.enabled = true;
+this.text = null;
+this.name = null;
+this.width = 0;
+this.height = 0;
+this.id = null;
+this.parent = null;
+this.mouseListener = null;
+this.bgcolor = null;
+this.minWidth = 30;
+this.minHeight = 30;
+this.renderWidth = 0;
+this.renderHeight = 0;
+Clazz.instantialize (this, arguments);
+}, javajs.awt, "Component");
+Clazz.defineMethod (c$, "setParent", 
+function (p) {
+this.parent = p;
+}, "~O");
+Clazz.makeConstructor (c$, 
+function (type) {
+this.id = javajs.awt.Component.newID (type);
+if (type == null) return;
+{
+SwingController.register(this, type);
+}}, "~S");
+c$.newID = Clazz.defineMethod (c$, "newID", 
+function (type) {
+return type + ("" + Math.random ()).substring (3, 10);
+}, "~S");
+Clazz.defineMethod (c$, "setBackground", 
+function (color) {
+this.bgcolor = color;
+}, "javajs.api.GenericColor");
+Clazz.defineMethod (c$, "setText", 
+function (text) {
+this.text = text;
+{
+SwingController.setText(this);
+}}, "~S");
+Clazz.defineMethod (c$, "setName", 
+function (name) {
+this.name = name;
+}, "~S");
+Clazz.defineMethod (c$, "getName", 
+function () {
+return this.name;
+});
+Clazz.defineMethod (c$, "getParent", 
+function () {
+return this.parent;
+});
+Clazz.defineMethod (c$, "setPreferredSize", 
+function (dimension) {
+this.width = dimension.width;
+this.height = dimension.height;
+}, "javajs.awt.Dimension");
+Clazz.defineMethod (c$, "addMouseListener", 
+function (listener) {
+this.mouseListener = listener;
+}, "~O");
+Clazz.defineMethod (c$, "getText", 
+function () {
+return this.text;
+});
+Clazz.defineMethod (c$, "isEnabled", 
+function () {
+return this.enabled;
+});
+Clazz.defineMethod (c$, "setEnabled", 
+function (enabled) {
+this.enabled = enabled;
+{
+SwingController.setEnabled(this);
+}}, "~B");
+Clazz.defineMethod (c$, "isVisible", 
+function () {
+return this.visible;
+});
+Clazz.defineMethod (c$, "setVisible", 
+function (visible) {
+this.visible = visible;
+{
+SwingController.setVisible(this);
+}}, "~B");
+Clazz.defineMethod (c$, "getHeight", 
+function () {
+return this.height;
+});
+Clazz.defineMethod (c$, "getWidth", 
+function () {
+return this.width;
+});
+Clazz.defineMethod (c$, "setMinimumSize", 
+function (d) {
+this.minWidth = d.width;
+this.minHeight = d.height;
+}, "javajs.awt.Dimension");
+Clazz.defineMethod (c$, "getSubcomponentWidth", 
+function () {
+return this.width;
+});
+Clazz.defineMethod (c$, "getSubcomponentHeight", 
+function () {
+return this.height;
+});
+Clazz.defineMethod (c$, "getCSSstyle", 
+function (defaultPercentW, defaultPercentH) {
+var width = (this.renderWidth > 0 ? this.renderWidth : this.getSubcomponentWidth ());
+var height = (this.renderHeight > 0 ? this.renderHeight : this.getSubcomponentHeight ());
+return (width > 0 ? "width:" + width + "px;" : defaultPercentW > 0 ? "width:" + defaultPercentW + "%;" : "") + (height > 0 ? "height:" + height + "px;" : defaultPercentH > 0 ? "height:" + defaultPercentH + "%;" : "") + (this.bgcolor == null ? "" : "background-color:" + javajs.util.CU.toCSSString (this.bgcolor) + ";");
+}, "~N,~N");
+Clazz.defineMethod (c$, "repaint", 
+function () {
+});
+});