Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / text / SimpleAttributeSet.js
index 073737a..e0de237 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (["javax.swing.text.AttributeSet", "$.MutableAttributeSet", "java.util.Hashtable"], "javax.swing.text.SimpleAttributeSet", ["java.util.Enumeration", "$.NoSuchElementException", "javax.swing.text.StyleConstants"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.table = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "SimpleAttributeSet", null, [javax.swing.text.MutableAttributeSet, Cloneable]);\r
-Clazz.prepareFields (c$, function () {\r
-this.table =  new java.util.Hashtable (3);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (source) {\r
-this.addAttributes (source);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "isEmpty", \r
-function () {\r
-return this.table.isEmpty ();\r
-});\r
-Clazz.defineMethod (c$, "getAttributeCount", \r
-function () {\r
-return this.table.size ();\r
-});\r
-Clazz.overrideMethod (c$, "isDefined", \r
-function (attrName) {\r
-return this.table.containsKey (attrName);\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "isEqual", \r
-function (attr) {\r
-return ((this.getAttributeCount () == attr.getAttributeCount ()) && this.containsAttributes (attr));\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "copyAttributes", \r
-function () {\r
-return this.clone ();\r
-});\r
-Clazz.defineMethod (c$, "getAttributeNames", \r
-function () {\r
-return this.table.keys ();\r
-});\r
-Clazz.defineMethod (c$, "getAttribute", \r
-function (name) {\r
-var value = this.table.get (name);\r
-if (value == null) {\r
-var parent = this.getResolveParent ();\r
-if (parent != null) {\r
-value = parent.getAttribute (name);\r
-}}return value;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "containsAttribute", \r
-function (name, value) {\r
-return value.equals (this.getAttribute (name));\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "containsAttributes", \r
-function (attributes) {\r
-var result = true;\r
-var names = attributes.getAttributeNames ();\r
-while (result && names.hasMoreElements ()) {\r
-var name = names.nextElement ();\r
-result = attributes.getAttribute (name).equals (this.getAttribute (name));\r
-}\r
-return result;\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "addAttribute", \r
-function (name, value) {\r
-this.table.put (name, value);\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "addAttributes", \r
-function (attributes) {\r
-var names = attributes.getAttributeNames ();\r
-while (names.hasMoreElements ()) {\r
-var name = names.nextElement ();\r
-this.addAttribute (name, attributes.getAttribute (name));\r
-}\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "removeAttribute", \r
-function (name) {\r
-this.table.remove (name);\r
-}, "~O");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (names) {\r
-while (names.hasMoreElements ()) this.removeAttribute (names.nextElement ());\r
-\r
-}, "java.util.Enumeration");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (attributes) {\r
-if (attributes === this) {\r
-this.table.clear ();\r
-} else {\r
-var names = attributes.getAttributeNames ();\r
-while (names.hasMoreElements ()) {\r
-var name = names.nextElement ();\r
-var value = attributes.getAttribute (name);\r
-if (value.equals (this.getAttribute (name))) this.removeAttribute (name);\r
-}\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "getResolveParent", \r
-function () {\r
-return this.table.get (javax.swing.text.StyleConstants.ResolveAttribute);\r
-});\r
-Clazz.overrideMethod (c$, "setResolveParent", \r
-function (parent) {\r
-this.addAttribute (javax.swing.text.StyleConstants.ResolveAttribute, parent);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "clone", \r
-function () {\r
-var attr;\r
-try {\r
-attr = Clazz.superCall (this, javax.swing.text.SimpleAttributeSet, "clone", []);\r
-attr.table = this.table.clone ();\r
-} catch (cnse) {\r
-if (Clazz.exceptionOf (cnse, CloneNotSupportedException)) {\r
-attr = null;\r
-} else {\r
-throw cnse;\r
-}\r
-}\r
-return attr;\r
-});\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-return this.table.hashCode ();\r
-});\r
-Clazz.defineMethod (c$, "equals", \r
-function (obj) {\r
-if (this === obj) {\r
-return true;\r
-}if (Clazz.instanceOf (obj, javax.swing.text.AttributeSet)) {\r
-var attrs = obj;\r
-return this.isEqual (attrs);\r
-}return false;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-var s = "";\r
-var names = this.getAttributeNames ();\r
-while (names.hasMoreElements ()) {\r
-var key = names.nextElement ();\r
-var value = this.getAttribute (key);\r
-if (Clazz.instanceOf (value, javax.swing.text.AttributeSet)) {\r
-s = s + key + "=**AttributeSet** ";\r
-} else {\r
-s = s + key + "=" + value + " ";\r
-}}\r
-return s;\r
-});\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareType (javax.swing.text.SimpleAttributeSet, "EmptyAttributeSet", null, javax.swing.text.AttributeSet);\r
-Clazz.defineMethod (c$, "getAttributeCount", \r
-function () {\r
-return 0;\r
-});\r
-Clazz.overrideMethod (c$, "isDefined", \r
-function (a) {\r
-return false;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "isEqual", \r
-function (a) {\r
-return (a.getAttributeCount () == 0);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "copyAttributes", \r
-function () {\r
-return this;\r
-});\r
-Clazz.overrideMethod (c$, "getAttribute", \r
-function (a) {\r
-return null;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "getAttributeNames", \r
-function () {\r
-return ((Clazz.isClassDefined ("javax.swing.text.SimpleAttributeSet$EmptyAttributeSet$1") ? 0 : javax.swing.text.SimpleAttributeSet.EmptyAttributeSet.$SimpleAttributeSet$EmptyAttributeSet$1$ ()), Clazz.innerTypeInstance (javax.swing.text.SimpleAttributeSet$EmptyAttributeSet$1, this, null));\r
-});\r
-Clazz.overrideMethod (c$, "containsAttribute", \r
-function (a, b) {\r
-return false;\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "containsAttributes", \r
-function (a) {\r
-return (a.getAttributeCount () == 0);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "getResolveParent", \r
-function () {\r
-return null;\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (a) {\r
-if (this === a) {\r
-return true;\r
-}return ((Clazz.instanceOf (a, javax.swing.text.AttributeSet)) && ((a).getAttributeCount () == 0));\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-return 0;\r
-});\r
-c$.$SimpleAttributeSet$EmptyAttributeSet$1$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareAnonymous (javax.swing.text, "SimpleAttributeSet$EmptyAttributeSet$1", null, java.util.Enumeration);\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-throw  new java.util.NoSuchElementException ();\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$ = Clazz.p0p ();\r
-c$.EMPTY = c$.prototype.EMPTY =  new javax.swing.text.SimpleAttributeSet.EmptyAttributeSet ();\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (["javax.swing.text.AttributeSet", "$.MutableAttributeSet", "java.util.Hashtable"], "javax.swing.text.SimpleAttributeSet", ["java.util.Enumeration", "$.NoSuchElementException", "javax.swing.text.StyleConstants"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.table = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "SimpleAttributeSet", null, [javax.swing.text.MutableAttributeSet, Cloneable]);
+Clazz.prepareFields (c$, function () {
+this.table =  new java.util.Hashtable (3);
+});
+Clazz.makeConstructor (c$, 
+function () {
+});
+Clazz.makeConstructor (c$, 
+function (source) {
+this.addAttributes (source);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "isEmpty", 
+function () {
+return this.table.isEmpty ();
+});
+Clazz.defineMethod (c$, "getAttributeCount", 
+function () {
+return this.table.size ();
+});
+Clazz.overrideMethod (c$, "isDefined", 
+function (attrName) {
+return this.table.containsKey (attrName);
+}, "~O");
+Clazz.overrideMethod (c$, "isEqual", 
+function (attr) {
+return ((this.getAttributeCount () == attr.getAttributeCount ()) && this.containsAttributes (attr));
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "copyAttributes", 
+function () {
+return this.clone ();
+});
+Clazz.defineMethod (c$, "getAttributeNames", 
+function () {
+return this.table.keys ();
+});
+Clazz.defineMethod (c$, "getAttribute", 
+function (name) {
+var value = this.table.get (name);
+if (value == null) {
+var parent = this.getResolveParent ();
+if (parent != null) {
+value = parent.getAttribute (name);
+}}return value;
+}, "~O");
+Clazz.overrideMethod (c$, "containsAttribute", 
+function (name, value) {
+return value.equals (this.getAttribute (name));
+}, "~O,~O");
+Clazz.overrideMethod (c$, "containsAttributes", 
+function (attributes) {
+var result = true;
+var names = attributes.getAttributeNames ();
+while (result && names.hasMoreElements ()) {
+var name = names.nextElement ();
+result = attributes.getAttribute (name).equals (this.getAttribute (name));
+}
+return result;
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "addAttribute", 
+function (name, value) {
+this.table.put (name, value);
+}, "~O,~O");
+Clazz.overrideMethod (c$, "addAttributes", 
+function (attributes) {
+var names = attributes.getAttributeNames ();
+while (names.hasMoreElements ()) {
+var name = names.nextElement ();
+this.addAttribute (name, attributes.getAttribute (name));
+}
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "removeAttribute", 
+function (name) {
+this.table.remove (name);
+}, "~O");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (names) {
+while (names.hasMoreElements ()) this.removeAttribute (names.nextElement ());
+
+}, "java.util.Enumeration");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (attributes) {
+if (attributes === this) {
+this.table.clear ();
+} else {
+var names = attributes.getAttributeNames ();
+while (names.hasMoreElements ()) {
+var name = names.nextElement ();
+var value = attributes.getAttribute (name);
+if (value.equals (this.getAttribute (name))) this.removeAttribute (name);
+}
+}}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "getResolveParent", 
+function () {
+return this.table.get (javax.swing.text.StyleConstants.ResolveAttribute);
+});
+Clazz.overrideMethod (c$, "setResolveParent", 
+function (parent) {
+this.addAttribute (javax.swing.text.StyleConstants.ResolveAttribute, parent);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "clone", 
+function () {
+var attr;
+try {
+attr = Clazz.superCall (this, javax.swing.text.SimpleAttributeSet, "clone", []);
+attr.table = this.table.clone ();
+} catch (cnse) {
+if (Clazz.exceptionOf (cnse, CloneNotSupportedException)) {
+attr = null;
+} else {
+throw cnse;
+}
+}
+return attr;
+});
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+return this.table.hashCode ();
+});
+Clazz.defineMethod (c$, "equals", 
+function (obj) {
+if (this === obj) {
+return true;
+}if (Clazz.instanceOf (obj, javax.swing.text.AttributeSet)) {
+var attrs = obj;
+return this.isEqual (attrs);
+}return false;
+}, "~O");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+var s = "";
+var names = this.getAttributeNames ();
+while (names.hasMoreElements ()) {
+var key = names.nextElement ();
+var value = this.getAttribute (key);
+if (Clazz.instanceOf (value, javax.swing.text.AttributeSet)) {
+s = s + key + "=**AttributeSet** ";
+} else {
+s = s + key + "=" + value + " ";
+}}
+return s;
+});
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareType (javax.swing.text.SimpleAttributeSet, "EmptyAttributeSet", null, javax.swing.text.AttributeSet);
+Clazz.defineMethod (c$, "getAttributeCount", 
+function () {
+return 0;
+});
+Clazz.overrideMethod (c$, "isDefined", 
+function (a) {
+return false;
+}, "~O");
+Clazz.overrideMethod (c$, "isEqual", 
+function (a) {
+return (a.getAttributeCount () == 0);
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "copyAttributes", 
+function () {
+return this;
+});
+Clazz.overrideMethod (c$, "getAttribute", 
+function (a) {
+return null;
+}, "~O");
+Clazz.overrideMethod (c$, "getAttributeNames", 
+function () {
+return ((Clazz.isClassDefined ("javax.swing.text.SimpleAttributeSet$EmptyAttributeSet$1") ? 0 : javax.swing.text.SimpleAttributeSet.EmptyAttributeSet.$SimpleAttributeSet$EmptyAttributeSet$1$ ()), Clazz.innerTypeInstance (javax.swing.text.SimpleAttributeSet$EmptyAttributeSet$1, this, null));
+});
+Clazz.overrideMethod (c$, "containsAttribute", 
+function (a, b) {
+return false;
+}, "~O,~O");
+Clazz.overrideMethod (c$, "containsAttributes", 
+function (a) {
+return (a.getAttributeCount () == 0);
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "getResolveParent", 
+function () {
+return null;
+});
+Clazz.overrideMethod (c$, "equals", 
+function (a) {
+if (this === a) {
+return true;
+}return ((Clazz.instanceOf (a, javax.swing.text.AttributeSet)) && ((a).getAttributeCount () == 0));
+}, "~O");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+return 0;
+});
+c$.$SimpleAttributeSet$EmptyAttributeSet$1$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareAnonymous (javax.swing.text, "SimpleAttributeSet$EmptyAttributeSet$1", null, java.util.Enumeration);
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+throw  new java.util.NoSuchElementException ();
+});
+c$ = Clazz.p0p ();
+};
+c$ = Clazz.p0p ();
+c$.EMPTY = c$.prototype.EMPTY =  new javax.swing.text.SimpleAttributeSet.EmptyAttributeSet ();
+});