X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fjavajs%2Fawt%2FContainer.js;h=5bb85ea56b7b9731dc031219d8db58a5b2aaba04;hp=fe3fb753108cfb6e44ad3404aa02246f7cff8345;hb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/javajs/awt/Container.js b/bin/javajs/awt/Container.js index fe3fb75..5bb85ea 100644 --- a/bin/javajs/awt/Container.js +++ b/bin/javajs/awt/Container.js @@ -1,65 +1,65 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (["javajs.awt.Component"], "javajs.awt.Container", ["javajs.util.Lst"], function () { -c$ = Clazz.decorateAsClass (function () { -this.list = null; -this.cList = null; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Container", javajs.awt.Component); -Clazz.defineMethod (c$, "getComponent", -function (i) { -return this.list.get (i); -}, "~N"); -Clazz.defineMethod (c$, "getComponentCount", -function () { -return (this.list == null ? 0 : this.list.size ()); -}); -Clazz.defineMethod (c$, "getComponents", -function () { -if (this.cList == null) { -if (this.list == null) return new Array (0); -this.cList = this.list.toArray (); -}return this.cList; -}); -Clazz.defineMethod (c$, "add", -function (component) { -return this.addComponent (component); -}, "javajs.awt.Component"); -Clazz.defineMethod (c$, "addComponent", -function (component) { -if (this.list == null) this.list = new javajs.util.Lst (); -this.list.addLast (component); -this.cList = null; -component.parent = this; -return component; -}, "javajs.awt.Component"); -Clazz.defineMethod (c$, "insertComponent", -function (component, index) { -if (this.list == null) return this.addComponent (component); -this.list.add (index, component); -this.cList = null; -component.parent = this; -return component; -}, "javajs.awt.Component,~N"); -Clazz.defineMethod (c$, "remove", -function (i) { -var c = this.list.remove (i); -c.parent = null; -this.cList = null; -}, "~N"); -Clazz.defineMethod (c$, "removeAll", -function () { -if (this.list != null) { -for (var i = this.list.size (); --i >= 0; ) this.list.get (i).parent = null; - -this.list.clear (); -}this.cList = null; -}); -Clazz.defineMethod (c$, "getSubcomponentWidth", -function () { -return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentWidth () : 0); -}); -Clazz.defineMethod (c$, "getSubcomponentHeight", -function () { -return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentHeight () : 0); -}); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (["javajs.awt.Component"], "javajs.awt.Container", ["javajs.util.Lst"], function () { +c$ = Clazz.decorateAsClass (function () { +this.list = null; +this.cList = null; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Container", javajs.awt.Component); +Clazz.defineMethod (c$, "getComponent", +function (i) { +return this.list.get (i); +}, "~N"); +Clazz.defineMethod (c$, "getComponentCount", +function () { +return (this.list == null ? 0 : this.list.size ()); +}); +Clazz.defineMethod (c$, "getComponents", +function () { +if (this.cList == null) { +if (this.list == null) return new Array (0); +this.cList = this.list.toArray (); +}return this.cList; +}); +Clazz.defineMethod (c$, "add", +function (component) { +return this.addComponent (component); +}, "javajs.awt.Component"); +Clazz.defineMethod (c$, "addComponent", +function (component) { +if (this.list == null) this.list = new javajs.util.Lst (); +this.list.addLast (component); +this.cList = null; +component.parent = this; +return component; +}, "javajs.awt.Component"); +Clazz.defineMethod (c$, "insertComponent", +function (component, index) { +if (this.list == null) return this.addComponent (component); +this.list.add (index, component); +this.cList = null; +component.parent = this; +return component; +}, "javajs.awt.Component,~N"); +Clazz.defineMethod (c$, "remove", +function (i) { +var c = this.list.remove (i); +c.parent = null; +this.cList = null; +}, "~N"); +Clazz.defineMethod (c$, "removeAll", +function () { +if (this.list != null) { +for (var i = this.list.size (); --i >= 0; ) this.list.get (i).parent = null; + +this.list.clear (); +}this.cList = null; +}); +Clazz.defineMethod (c$, "getSubcomponentWidth", +function () { +return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentWidth () : 0); +}); +Clazz.defineMethod (c$, "getSubcomponentHeight", +function () { +return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentHeight () : 0); +}); +});