Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / text / StyleContext.js
index eac28a9..8de7285 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (["java.util.Enumeration", "javax.swing.text.AbstractDocument", "$.AttributeSet", "$.Style", "java.util.Collections", "$.HashMap", "$.Hashtable", "$.Vector", "javax.swing.event.EventListenerList", "javax.swing.text.SimpleAttributeSet"], "javax.swing.text.StyleContext", ["java.util.NoSuchElementException", "java.awt.Font", "$.Toolkit", "javax.swing.SwingUtilities", "javax.swing.event.ChangeEvent", "$.ChangeListener", "javax.swing.text.MutableAttributeSet", "$.StyleConstants"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.styles = null;\r
-this.fontSearch = null;\r
-this.fontTable = null;\r
-this.attributesPool = null;\r
-this.search = null;\r
-if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.SmallAttributeSet")) {\r
-javax.swing.text.StyleContext.$StyleContext$SmallAttributeSet$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyEnumeration")) {\r
-javax.swing.text.StyleContext.$StyleContext$KeyEnumeration$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyBuilder")) {\r
-javax.swing.text.StyleContext.$StyleContext$KeyBuilder$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.NamedStyle")) {\r
-javax.swing.text.StyleContext.$StyleContext$NamedStyle$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "StyleContext", null, javax.swing.text.AbstractDocument.AttributeContext);\r
-Clazz.prepareFields (c$, function () {\r
-this.fontSearch =  new javax.swing.text.StyleContext.FontKey (null, 0, 0);\r
-this.fontTable =  new java.util.Hashtable ();\r
-this.attributesPool = java.util.Collections.synchronizedMap ( new java.util.HashMap ());\r
-this.search =  new javax.swing.text.SimpleAttributeSet ();\r
-});\r
-c$.getDefaultStyleContext = Clazz.defineMethod (c$, "getDefaultStyleContext", \r
-function () {\r
-if (javax.swing.text.StyleContext.defaultContext == null) {\r
-javax.swing.text.StyleContext.defaultContext =  new javax.swing.text.StyleContext ();\r
-}return javax.swing.text.StyleContext.defaultContext;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.styles = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, null);\r
-this.addStyle ("default", null);\r
-});\r
-Clazz.defineMethod (c$, "addStyle", \r
-function (nm, parent) {\r
-var style = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, nm, parent);\r
-if (nm != null) {\r
-this.styles.addAttribute (nm, style);\r
-}return style;\r
-}, "~S,javax.swing.text.Style");\r
-Clazz.defineMethod (c$, "removeStyle", \r
-function (nm) {\r
-this.styles.removeAttribute (nm);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getStyle", \r
-function (nm) {\r
-return this.styles.getAttribute (nm);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getStyleNames", \r
-function () {\r
-return this.styles.getAttributeNames ();\r
-});\r
-Clazz.defineMethod (c$, "addChangeListener", \r
-function (l) {\r
-this.styles.addChangeListener (l);\r
-}, "javax.swing.event.ChangeListener");\r
-Clazz.defineMethod (c$, "removeChangeListener", \r
-function (l) {\r
-this.styles.removeChangeListener (l);\r
-}, "javax.swing.event.ChangeListener");\r
-Clazz.defineMethod (c$, "getChangeListeners", \r
-function () {\r
-return (this.styles).getChangeListeners ();\r
-});\r
-Clazz.defineMethod (c$, "getFont", \r
-function (attr) {\r
-var style = 0;\r
-if (javax.swing.text.StyleConstants.isBold (attr)) {\r
-style |= 1;\r
-}if (javax.swing.text.StyleConstants.isItalic (attr)) {\r
-style |= 2;\r
-}var family = javax.swing.text.StyleConstants.getFontFamily (attr);\r
-var size = javax.swing.text.StyleConstants.getFontSize (attr);\r
-if (javax.swing.text.StyleConstants.isSuperscript (attr) || javax.swing.text.StyleConstants.isSubscript (attr)) {\r
-size -= 2;\r
-}return this.getFont (family, style, size);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getForeground", \r
-function (attr) {\r
-return javax.swing.text.StyleConstants.getForeground (attr);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getBackground", \r
-function (attr) {\r
-return javax.swing.text.StyleConstants.getBackground (attr);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getFont", \r
-function (family, style, size) {\r
-this.fontSearch.setValue (family, style, size);\r
-var f = this.fontTable.get (this.fontSearch);\r
-if (f == null) {\r
-var defaultStyle = this.getStyle ("default");\r
-if (defaultStyle != null) {\r
-var FONT_ATTRIBUTE_KEY = "FONT_ATTRIBUTE_KEY";\r
-var defaultFont = defaultStyle.getAttribute ("FONT_ATTRIBUTE_KEY");\r
-if (defaultFont != null && defaultFont.getFamily ().equalsIgnoreCase (family)) {\r
-f = defaultFont.deriveFont (style, size);\r
-}}if (f == null) {\r
-f =  new java.awt.Font (family, style, size);\r
-}var key =  new javax.swing.text.StyleContext.FontKey (family, style, size);\r
-this.fontTable.put (key, f);\r
-}return f;\r
-}, "~S,~N,~N");\r
-Clazz.defineMethod (c$, "getFontMetrics", \r
-function (f) {\r
-return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);\r
-}, "java.awt.Font");\r
-Clazz.overrideMethod (c$, "addAttribute", \r
-function (old, name, value) {\r
-if ((old.getAttributeCount () + 1) <= this.getCompressionThreshold ()) {\r
-this.search.removeAttributes (this.search);\r
-this.search.addAttributes (old);\r
-this.search.addAttribute (name, value);\r
-this.reclaim (old);\r
-return this.getImmutableUniqueSet ();\r
-}var ma = this.getMutableAttributeSet (old);\r
-ma.addAttribute (name, value);\r
-return ma;\r
-}, "javax.swing.text.AttributeSet,~O,~O");\r
-Clazz.overrideMethod (c$, "addAttributes", \r
-function (old, attr) {\r
-if ((old.getAttributeCount () + attr.getAttributeCount ()) <= this.getCompressionThreshold ()) {\r
-this.search.removeAttributes (this.search);\r
-this.search.addAttributes (old);\r
-this.search.addAttributes (attr);\r
-this.reclaim (old);\r
-return this.getImmutableUniqueSet ();\r
-}var ma = this.getMutableAttributeSet (old);\r
-ma.addAttributes (attr);\r
-return ma;\r
-}, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "removeAttribute", \r
-function (old, name) {\r
-if ((old.getAttributeCount () - 1) <= this.getCompressionThreshold ()) {\r
-this.search.removeAttributes (this.search);\r
-this.search.addAttributes (old);\r
-this.search.removeAttribute (name);\r
-this.reclaim (old);\r
-return this.getImmutableUniqueSet ();\r
-}var ma = this.getMutableAttributeSet (old);\r
-ma.removeAttribute (name);\r
-return ma;\r
-}, "javax.swing.text.AttributeSet,~O");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (old, names) {\r
-if (old.getAttributeCount () <= this.getCompressionThreshold ()) {\r
-this.search.removeAttributes (this.search);\r
-this.search.addAttributes (old);\r
-this.search.removeAttributes (names);\r
-this.reclaim (old);\r
-return this.getImmutableUniqueSet ();\r
-}var ma = this.getMutableAttributeSet (old);\r
-ma.removeAttributes (names);\r
-return ma;\r
-}, "javax.swing.text.AttributeSet,java.util.Enumeration");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (old, attrs) {\r
-if (old.getAttributeCount () <= this.getCompressionThreshold ()) {\r
-this.search.removeAttributes (this.search);\r
-this.search.addAttributes (old);\r
-this.search.removeAttributes (attrs);\r
-this.reclaim (old);\r
-return this.getImmutableUniqueSet ();\r
-}var ma = this.getMutableAttributeSet (old);\r
-ma.removeAttributes (attrs);\r
-return ma;\r
-}, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "getEmptySet", \r
-function () {\r
-return javax.swing.text.SimpleAttributeSet.EMPTY;\r
-});\r
-Clazz.overrideMethod (c$, "reclaim", \r
-function (a) {\r
-if (javax.swing.SwingUtilities.isEventDispatchThread ()) {\r
-this.attributesPool.size ();\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getCompressionThreshold", \r
-function () {\r
-return 9;\r
-});\r
-Clazz.defineMethod (c$, "createSmallAttributeSet", \r
-function (a) {\r
-return Clazz.innerTypeInstance (javax.swing.text.StyleContext.SmallAttributeSet, this, null, a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "createLargeAttributeSet", \r
-function (a) {\r
-return  new javax.swing.text.SimpleAttributeSet (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "removeUnusedSets", \r
-function () {\r
-this.attributesPool.size ();\r
-});\r
-Clazz.defineMethod (c$, "getImmutableUniqueSet", \r
-function () {\r
-return null;\r
-});\r
-Clazz.defineMethod (c$, "getMutableAttributeSet", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.MutableAttributeSet) && a !== javax.swing.text.SimpleAttributeSet.EMPTY) {\r
-return a;\r
-}return this.createLargeAttributeSet (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "toString", \r
-function () {\r
-this.removeUnusedSets ();\r
-var s = "";\r
-var iterator = this.attributesPool.keySet ().iterator ();\r
-while (iterator.hasNext ()) {\r
-var set = iterator.next ();\r
-s = s + set + "\n";\r
-}\r
-return s;\r
-});\r
-c$.registerStaticAttributeKey = Clazz.defineMethod (c$, "registerStaticAttributeKey", \r
-function (key) {\r
-var ioFmt = key.getClass ().getName () + "." + key.toString ();\r
-if (javax.swing.text.StyleContext.freezeKeyMap == null) {\r
-javax.swing.text.StyleContext.freezeKeyMap =  new java.util.Hashtable ();\r
-javax.swing.text.StyleContext.thawKeyMap =  new java.util.Hashtable ();\r
-}javax.swing.text.StyleContext.freezeKeyMap.put (key, ioFmt);\r
-javax.swing.text.StyleContext.thawKeyMap.put (ioFmt, key);\r
-}, "~O");\r
-c$.getStaticAttribute = Clazz.defineMethod (c$, "getStaticAttribute", \r
-function (key) {\r
-if (javax.swing.text.StyleContext.thawKeyMap == null || key == null) {\r
-return null;\r
-}return javax.swing.text.StyleContext.thawKeyMap.get (key);\r
-}, "~O");\r
-c$.getStaticAttributeKey = Clazz.defineMethod (c$, "getStaticAttributeKey", \r
-function (key) {\r
-return key.getClass ().getName () + "." + key.toString ();\r
-}, "~O");\r
-c$.$StyleContext$SmallAttributeSet$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.attributes = null;\r
-this.resolveParent = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.StyleContext, "SmallAttributeSet", null, javax.swing.text.AttributeSet);\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.attributes = a;\r
-this.updateResolveParent ();\r
-}, "~A");\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-var b = a.getAttributeCount ();\r
-var c =  new Array (2 * b);\r
-var d = a.getAttributeNames ();\r
-var e = 0;\r
-while (d.hasMoreElements ()) {\r
-c[e] = d.nextElement ();\r
-c[e + 1] = a.getAttribute (c[e]);\r
-e += 2;\r
-}\r
-this.attributes = c;\r
-this.updateResolveParent ();\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "updateResolveParent", \r
- function () {\r
-this.resolveParent = null;\r
-var a = this.attributes;\r
-for (var b = 0; b < a.length; b += 2) {\r
-if (a[b] === javax.swing.text.StyleConstants.ResolveAttribute) {\r
-this.resolveParent = a[b + 1];\r
-break;\r
-}}\r
-});\r
-Clazz.defineMethod (c$, "getLocalAttribute", \r
-function (a) {\r
-if (a === javax.swing.text.StyleConstants.ResolveAttribute) {\r
-return this.resolveParent;\r
-}var b = this.attributes;\r
-for (var c = 0; c < b.length; c += 2) {\r
-if (a.equals (b[c])) {\r
-return b[c + 1];\r
-}}\r
-return null;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-var a = "{";\r
-var b = this.attributes;\r
-for (var c = 0; c < b.length; c += 2) {\r
-if (Clazz.instanceOf (b[c + 1], javax.swing.text.AttributeSet)) {\r
-a = a + b[c] + "=" + "AttributeSet" + ",";\r
-} else {\r
-a = a + b[c] + "=" + b[c + 1] + ",";\r
-}}\r
-a = a + "}";\r
-return a;\r
-});\r
-Clazz.defineMethod (c$, "hashCode", \r
-function () {\r
-var a = 0;\r
-var b = this.attributes;\r
-for (var c = 1; c < b.length; c += 2) {\r
-a ^= b[c].hashCode ();\r
-}\r
-return a;\r
-});\r
-Clazz.defineMethod (c$, "equals", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.AttributeSet)) {\r
-var b = a;\r
-return ((this.getAttributeCount () == b.getAttributeCount ()) && this.containsAttributes (b));\r
-}return false;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "clone", \r
-function () {\r
-return this;\r
-});\r
-Clazz.defineMethod (c$, "getAttributeCount", \r
-function () {\r
-return Clazz.doubleToInt (this.attributes.length / 2);\r
-});\r
-Clazz.overrideMethod (c$, "isDefined", \r
-function (a) {\r
-var b = this.attributes;\r
-var c = b.length;\r
-for (var d = 0; d < c; d += 2) {\r
-if (a.equals (b[d])) {\r
-return true;\r
-}}\r
-return false;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "isEqual", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {\r
-return a === this;\r
-}return ((this.getAttributeCount () == a.getAttributeCount ()) && this.containsAttributes (a));\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "copyAttributes", \r
-function () {\r
-return this;\r
-});\r
-Clazz.defineMethod (c$, "getAttribute", \r
-function (a) {\r
-var b = this.getLocalAttribute (a);\r
-if (b == null) {\r
-var c = this.getResolveParent ();\r
-if (c != null) b = c.getAttribute (a);\r
-}return b;\r
-}, "~O");\r
-Clazz.defineMethod (c$, "getAttributeNames", \r
-function () {\r
-return Clazz.innerTypeInstance (javax.swing.text.StyleContext.KeyEnumeration, this, null, this.attributes);\r
-});\r
-Clazz.overrideMethod (c$, "containsAttribute", \r
-function (a, b) {\r
-return b.equals (this.getAttribute (a));\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "containsAttributes", \r
-function (a) {\r
-var b = true;\r
-var c = a.getAttributeNames ();\r
-while (b && c.hasMoreElements ()) {\r
-var d = c.nextElement ();\r
-b = a.getAttribute (d).equals (this.getAttribute (d));\r
-}\r
-return b;\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "getResolveParent", \r
-function () {\r
-return this.resolveParent;\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$StyleContext$KeyEnumeration$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.attr = null;\r
-this.i = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.StyleContext, "KeyEnumeration", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.attr = a;\r
-this.i = 0;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return this.i < this.attr.length;\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-if (this.i < this.attr.length) {\r
-var a = this.attr[this.i];\r
-this.i += 2;\r
-return a;\r
-}throw  new java.util.NoSuchElementException ();\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$StyleContext$KeyBuilder$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.keys = null;\r
-this.data = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.StyleContext, "KeyBuilder");\r
-Clazz.prepareFields (c$, function () {\r
-this.keys =  new java.util.Vector ();\r
-this.data =  new java.util.Vector ();\r
-});\r
-Clazz.defineMethod (c$, "initialize", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {\r
-this.initialize ((a).attributes);\r
-} else {\r
-this.keys.removeAllElements ();\r
-this.data.removeAllElements ();\r
-var b = a.getAttributeNames ();\r
-while (b.hasMoreElements ()) {\r
-var c = b.nextElement ();\r
-this.addAttribute (c, a.getAttribute (c));\r
-}\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "initialize", \r
- function (a) {\r
-this.keys.removeAllElements ();\r
-this.data.removeAllElements ();\r
-var b = a.length;\r
-for (var c = 0; c < b; c += 2) {\r
-this.keys.addElement (a[c]);\r
-this.data.addElement (a[c + 1]);\r
-}\r
-}, "~A");\r
-Clazz.defineMethod (c$, "createTable", \r
-function () {\r
-var a = this.keys.size ();\r
-var b =  new Array (2 * a);\r
-for (var c = 0; c < a; c++) {\r
-var d = 2 * c;\r
-b[d] = this.keys.elementAt (c);\r
-b[d + 1] = this.data.elementAt (c);\r
-}\r
-return b;\r
-});\r
-Clazz.defineMethod (c$, "getCount", \r
-function () {\r
-return this.keys.size ();\r
-});\r
-Clazz.defineMethod (c$, "addAttribute", \r
-function (a, b) {\r
-this.keys.addElement (a);\r
-this.data.addElement (b);\r
-}, "~O,~O");\r
-Clazz.defineMethod (c$, "addAttributes", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {\r
-var b = (a).attributes;\r
-var c = b.length;\r
-for (var d = 0; d < c; d += 2) {\r
-this.addAttribute (b[d], b[d + 1]);\r
-}\r
-} else {\r
-var b = a.getAttributeNames ();\r
-while (b.hasMoreElements ()) {\r
-var c = b.nextElement ();\r
-this.addAttribute (c, a.getAttribute (c));\r
-}\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "removeAttribute", \r
-function (a) {\r
-var b = this.keys.size ();\r
-for (var c = 0; c < b; c++) {\r
-if (this.keys.elementAt (c).equals (a)) {\r
-this.keys.removeElementAt (c);\r
-this.data.removeElementAt (c);\r
-return;\r
-}}\r
-}, "~O");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-while (a.hasMoreElements ()) {\r
-var b = a.nextElement ();\r
-this.removeAttribute (b);\r
-}\r
-}, "java.util.Enumeration");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-var b = a.getAttributeNames ();\r
-while (b.hasMoreElements ()) {\r
-var c = b.nextElement ();\r
-var d = a.getAttribute (c);\r
-this.removeSearchAttribute (c, d);\r
-}\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "removeSearchAttribute", \r
- function (a, b) {\r
-var c = this.keys.size ();\r
-for (var d = 0; d < c; d++) {\r
-if (this.keys.elementAt (d).equals (a)) {\r
-if (this.data.elementAt (d).equals (b)) {\r
-this.keys.removeElementAt (d);\r
-this.data.removeElementAt (d);\r
-}return;\r
-}}\r
-}, "~O,~O");\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$StyleContext$NamedStyle$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.listenerList = null;\r
-this.changeEvent = null;\r
-this.attributes = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.StyleContext, "NamedStyle", null, javax.swing.text.Style);\r
-Clazz.prepareFields (c$, function () {\r
-this.listenerList =  new javax.swing.event.EventListenerList ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();\r
-if (a != null) {\r
-this.setName (a);\r
-}if (b != null) {\r
-this.setResolveParent (b);\r
-}}, "~S,javax.swing.text.Style");\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.construct (null, a);\r
-}, "javax.swing.text.Style");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();\r
-});\r
-Clazz.defineMethod (c$, "toString", \r
-function () {\r
-return "NamedStyle:" + this.getName () + " " + this.attributes;\r
-});\r
-Clazz.overrideMethod (c$, "getName", \r
-function () {\r
-if (this.isDefined (javax.swing.text.StyleConstants.NameAttribute)) {\r
-return this.getAttribute (javax.swing.text.StyleConstants.NameAttribute).toString ();\r
-}return null;\r
-});\r
-Clazz.defineMethod (c$, "setName", \r
-function (a) {\r
-if (a != null) {\r
-this.addAttribute (javax.swing.text.StyleConstants.NameAttribute, a);\r
-}}, "~S");\r
-Clazz.overrideMethod (c$, "addChangeListener", \r
-function (a) {\r
-this.listenerList.add (javax.swing.event.ChangeListener, a);\r
-}, "javax.swing.event.ChangeListener");\r
-Clazz.overrideMethod (c$, "removeChangeListener", \r
-function (a) {\r
-this.listenerList.remove (javax.swing.event.ChangeListener, a);\r
-}, "javax.swing.event.ChangeListener");\r
-Clazz.defineMethod (c$, "getChangeListeners", \r
-function () {\r
-return this.listenerList.getListeners (javax.swing.event.ChangeListener);\r
-});\r
-Clazz.defineMethod (c$, "fireStateChanged", \r
-function () {\r
-var a = this.listenerList.getListenerList ();\r
-for (var b = a.length - 2; b >= 0; b -= 2) {\r
-if (a[b] === javax.swing.event.ChangeListener) {\r
-if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);\r
-(a[b + 1]).stateChanged (this.changeEvent);\r
-}}\r
-});\r
-Clazz.defineMethod (c$, "getListeners", \r
-function (a) {\r
-return this.listenerList.getListeners (a);\r
-}, "Class");\r
-Clazz.defineMethod (c$, "getAttributeCount", \r
-function () {\r
-return this.attributes.getAttributeCount ();\r
-});\r
-Clazz.defineMethod (c$, "isDefined", \r
-function (a) {\r
-return this.attributes.isDefined (a);\r
-}, "~O");\r
-Clazz.defineMethod (c$, "isEqual", \r
-function (a) {\r
-return this.attributes.isEqual (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "copyAttributes", \r
-function () {\r
-var a = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null);\r
-a.attributes = this.attributes.copyAttributes ();\r
-return a;\r
-});\r
-Clazz.defineMethod (c$, "getAttribute", \r
-function (a) {\r
-return this.attributes.getAttribute (a);\r
-}, "~O");\r
-Clazz.defineMethod (c$, "getAttributeNames", \r
-function () {\r
-return this.attributes.getAttributeNames ();\r
-});\r
-Clazz.defineMethod (c$, "containsAttribute", \r
-function (a, b) {\r
-return this.attributes.containsAttribute (a, b);\r
-}, "~O,~O");\r
-Clazz.defineMethod (c$, "containsAttributes", \r
-function (a) {\r
-return this.attributes.containsAttributes (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getResolveParent", \r
-function () {\r
-return this.attributes.getResolveParent ();\r
-});\r
-Clazz.overrideMethod (c$, "addAttribute", \r
-function (a, b) {\r
-var c = this.b$["javax.swing.text.StyleContext"];\r
-this.attributes = c.addAttribute (this.attributes, a, b);\r
-this.fireStateChanged ();\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "addAttributes", \r
-function (a) {\r
-var b = this.b$["javax.swing.text.StyleContext"];\r
-this.attributes = b.addAttributes (this.attributes, a);\r
-this.fireStateChanged ();\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "removeAttribute", \r
-function (a) {\r
-var b = this.b$["javax.swing.text.StyleContext"];\r
-this.attributes = b.removeAttribute (this.attributes, a);\r
-this.fireStateChanged ();\r
-}, "~O");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-var b = this.b$["javax.swing.text.StyleContext"];\r
-this.attributes = b.removeAttributes (this.attributes, a);\r
-this.fireStateChanged ();\r
-}, "java.util.Enumeration");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-var b = this.b$["javax.swing.text.StyleContext"];\r
-if (a === this) {\r
-this.attributes = b.getEmptySet ();\r
-} else {\r
-this.attributes = b.removeAttributes (this.attributes, a);\r
-}this.fireStateChanged ();\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "setResolveParent", \r
-function (a) {\r
-if (a != null) {\r
-this.addAttribute (javax.swing.text.StyleConstants.ResolveAttribute, a);\r
-} else {\r
-this.removeAttribute (javax.swing.text.StyleConstants.ResolveAttribute);\r
-}}, "javax.swing.text.AttributeSet");\r
-c$ = Clazz.p0p ();\r
-};\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.family = null;\r
-this.style = 0;\r
-this.size = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.StyleContext, "FontKey");\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c) {\r
-this.setValue (a, b, c);\r
-}, "~S,~N,~N");\r
-Clazz.defineMethod (c$, "setValue", \r
-function (a, b, c) {\r
-this.family = (a != null) ? a.intern () : null;\r
-this.style = b;\r
-this.size = c;\r
-}, "~S,~N,~N");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-var a = (this.family != null) ? this.family.hashCode () : 0;\r
-return a ^ this.style ^ this.size;\r
-});\r
-Clazz.overrideMethod (c$, "equals", \r
-function (a) {\r
-if (Clazz.instanceOf (a, javax.swing.text.StyleContext.FontKey)) {\r
-var b = a;\r
-return (this.size == b.size) && (this.style == b.style) && (this.family === b.family);\r
-}return false;\r
-}, "~O");\r
-c$ = Clazz.p0p ();\r
-Clazz.defineStatics (c$,\r
-"defaultContext", null,\r
-"DEFAULT_STYLE", "default",\r
-"freezeKeyMap", null,\r
-"thawKeyMap", null,\r
-"THRESHOLD", 9);\r
-{\r
-}});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (["java.util.Enumeration", "javax.swing.text.AbstractDocument", "$.AttributeSet", "$.Style", "java.util.Collections", "$.HashMap", "$.Hashtable", "$.Vector", "javax.swing.event.EventListenerList", "javax.swing.text.SimpleAttributeSet"], "javax.swing.text.StyleContext", ["java.util.NoSuchElementException", "java.awt.Font", "$.Toolkit", "javax.swing.SwingUtilities", "javax.swing.event.ChangeEvent", "$.ChangeListener", "javax.swing.text.MutableAttributeSet", "$.StyleConstants"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.styles = null;
+this.fontSearch = null;
+this.fontTable = null;
+this.attributesPool = null;
+this.search = null;
+if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.SmallAttributeSet")) {
+javax.swing.text.StyleContext.$StyleContext$SmallAttributeSet$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyEnumeration")) {
+javax.swing.text.StyleContext.$StyleContext$KeyEnumeration$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyBuilder")) {
+javax.swing.text.StyleContext.$StyleContext$KeyBuilder$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.NamedStyle")) {
+javax.swing.text.StyleContext.$StyleContext$NamedStyle$ ();
+}
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "StyleContext", null, javax.swing.text.AbstractDocument.AttributeContext);
+Clazz.prepareFields (c$, function () {
+this.fontSearch =  new javax.swing.text.StyleContext.FontKey (null, 0, 0);
+this.fontTable =  new java.util.Hashtable ();
+this.attributesPool = java.util.Collections.synchronizedMap ( new java.util.HashMap ());
+this.search =  new javax.swing.text.SimpleAttributeSet ();
+});
+c$.getDefaultStyleContext = Clazz.defineMethod (c$, "getDefaultStyleContext", 
+function () {
+if (javax.swing.text.StyleContext.defaultContext == null) {
+javax.swing.text.StyleContext.defaultContext =  new javax.swing.text.StyleContext ();
+}return javax.swing.text.StyleContext.defaultContext;
+});
+Clazz.makeConstructor (c$, 
+function () {
+this.styles = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, null);
+this.addStyle ("default", null);
+});
+Clazz.defineMethod (c$, "addStyle", 
+function (nm, parent) {
+var style = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, nm, parent);
+if (nm != null) {
+this.styles.addAttribute (nm, style);
+}return style;
+}, "~S,javax.swing.text.Style");
+Clazz.defineMethod (c$, "removeStyle", 
+function (nm) {
+this.styles.removeAttribute (nm);
+}, "~S");
+Clazz.defineMethod (c$, "getStyle", 
+function (nm) {
+return this.styles.getAttribute (nm);
+}, "~S");
+Clazz.defineMethod (c$, "getStyleNames", 
+function () {
+return this.styles.getAttributeNames ();
+});
+Clazz.defineMethod (c$, "addChangeListener", 
+function (l) {
+this.styles.addChangeListener (l);
+}, "javax.swing.event.ChangeListener");
+Clazz.defineMethod (c$, "removeChangeListener", 
+function (l) {
+this.styles.removeChangeListener (l);
+}, "javax.swing.event.ChangeListener");
+Clazz.defineMethod (c$, "getChangeListeners", 
+function () {
+return (this.styles).getChangeListeners ();
+});
+Clazz.defineMethod (c$, "getFont", 
+function (attr) {
+var style = 0;
+if (javax.swing.text.StyleConstants.isBold (attr)) {
+style |= 1;
+}if (javax.swing.text.StyleConstants.isItalic (attr)) {
+style |= 2;
+}var family = javax.swing.text.StyleConstants.getFontFamily (attr);
+var size = javax.swing.text.StyleConstants.getFontSize (attr);
+if (javax.swing.text.StyleConstants.isSuperscript (attr) || javax.swing.text.StyleConstants.isSubscript (attr)) {
+size -= 2;
+}return this.getFont (family, style, size);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getForeground", 
+function (attr) {
+return javax.swing.text.StyleConstants.getForeground (attr);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getBackground", 
+function (attr) {
+return javax.swing.text.StyleConstants.getBackground (attr);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getFont", 
+function (family, style, size) {
+this.fontSearch.setValue (family, style, size);
+var f = this.fontTable.get (this.fontSearch);
+if (f == null) {
+var defaultStyle = this.getStyle ("default");
+if (defaultStyle != null) {
+var FONT_ATTRIBUTE_KEY = "FONT_ATTRIBUTE_KEY";
+var defaultFont = defaultStyle.getAttribute ("FONT_ATTRIBUTE_KEY");
+if (defaultFont != null && defaultFont.getFamily ().equalsIgnoreCase (family)) {
+f = defaultFont.deriveFont (style, size);
+}}if (f == null) {
+f =  new java.awt.Font (family, style, size);
+}var key =  new javax.swing.text.StyleContext.FontKey (family, style, size);
+this.fontTable.put (key, f);
+}return f;
+}, "~S,~N,~N");
+Clazz.defineMethod (c$, "getFontMetrics", 
+function (f) {
+return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
+}, "java.awt.Font");
+Clazz.overrideMethod (c$, "addAttribute", 
+function (old, name, value) {
+if ((old.getAttributeCount () + 1) <= this.getCompressionThreshold ()) {
+this.search.removeAttributes (this.search);
+this.search.addAttributes (old);
+this.search.addAttribute (name, value);
+this.reclaim (old);
+return this.getImmutableUniqueSet ();
+}var ma = this.getMutableAttributeSet (old);
+ma.addAttribute (name, value);
+return ma;
+}, "javax.swing.text.AttributeSet,~O,~O");
+Clazz.overrideMethod (c$, "addAttributes", 
+function (old, attr) {
+if ((old.getAttributeCount () + attr.getAttributeCount ()) <= this.getCompressionThreshold ()) {
+this.search.removeAttributes (this.search);
+this.search.addAttributes (old);
+this.search.addAttributes (attr);
+this.reclaim (old);
+return this.getImmutableUniqueSet ();
+}var ma = this.getMutableAttributeSet (old);
+ma.addAttributes (attr);
+return ma;
+}, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "removeAttribute", 
+function (old, name) {
+if ((old.getAttributeCount () - 1) <= this.getCompressionThreshold ()) {
+this.search.removeAttributes (this.search);
+this.search.addAttributes (old);
+this.search.removeAttribute (name);
+this.reclaim (old);
+return this.getImmutableUniqueSet ();
+}var ma = this.getMutableAttributeSet (old);
+ma.removeAttribute (name);
+return ma;
+}, "javax.swing.text.AttributeSet,~O");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (old, names) {
+if (old.getAttributeCount () <= this.getCompressionThreshold ()) {
+this.search.removeAttributes (this.search);
+this.search.addAttributes (old);
+this.search.removeAttributes (names);
+this.reclaim (old);
+return this.getImmutableUniqueSet ();
+}var ma = this.getMutableAttributeSet (old);
+ma.removeAttributes (names);
+return ma;
+}, "javax.swing.text.AttributeSet,java.util.Enumeration");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (old, attrs) {
+if (old.getAttributeCount () <= this.getCompressionThreshold ()) {
+this.search.removeAttributes (this.search);
+this.search.addAttributes (old);
+this.search.removeAttributes (attrs);
+this.reclaim (old);
+return this.getImmutableUniqueSet ();
+}var ma = this.getMutableAttributeSet (old);
+ma.removeAttributes (attrs);
+return ma;
+}, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "getEmptySet", 
+function () {
+return javax.swing.text.SimpleAttributeSet.EMPTY;
+});
+Clazz.overrideMethod (c$, "reclaim", 
+function (a) {
+if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
+this.attributesPool.size ();
+}}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getCompressionThreshold", 
+function () {
+return 9;
+});
+Clazz.defineMethod (c$, "createSmallAttributeSet", 
+function (a) {
+return Clazz.innerTypeInstance (javax.swing.text.StyleContext.SmallAttributeSet, this, null, a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "createLargeAttributeSet", 
+function (a) {
+return  new javax.swing.text.SimpleAttributeSet (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "removeUnusedSets", 
+function () {
+this.attributesPool.size ();
+});
+Clazz.defineMethod (c$, "getImmutableUniqueSet", 
+function () {
+return null;
+});
+Clazz.defineMethod (c$, "getMutableAttributeSet", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.MutableAttributeSet) && a !== javax.swing.text.SimpleAttributeSet.EMPTY) {
+return a;
+}return this.createLargeAttributeSet (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "toString", 
+function () {
+this.removeUnusedSets ();
+var s = "";
+var iterator = this.attributesPool.keySet ().iterator ();
+while (iterator.hasNext ()) {
+var set = iterator.next ();
+s = s + set + "\n";
+}
+return s;
+});
+c$.registerStaticAttributeKey = Clazz.defineMethod (c$, "registerStaticAttributeKey", 
+function (key) {
+var ioFmt = key.getClass ().getName () + "." + key.toString ();
+if (javax.swing.text.StyleContext.freezeKeyMap == null) {
+javax.swing.text.StyleContext.freezeKeyMap =  new java.util.Hashtable ();
+javax.swing.text.StyleContext.thawKeyMap =  new java.util.Hashtable ();
+}javax.swing.text.StyleContext.freezeKeyMap.put (key, ioFmt);
+javax.swing.text.StyleContext.thawKeyMap.put (ioFmt, key);
+}, "~O");
+c$.getStaticAttribute = Clazz.defineMethod (c$, "getStaticAttribute", 
+function (key) {
+if (javax.swing.text.StyleContext.thawKeyMap == null || key == null) {
+return null;
+}return javax.swing.text.StyleContext.thawKeyMap.get (key);
+}, "~O");
+c$.getStaticAttributeKey = Clazz.defineMethod (c$, "getStaticAttributeKey", 
+function (key) {
+return key.getClass ().getName () + "." + key.toString ();
+}, "~O");
+c$.$StyleContext$SmallAttributeSet$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.attributes = null;
+this.resolveParent = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.StyleContext, "SmallAttributeSet", null, javax.swing.text.AttributeSet);
+Clazz.makeConstructor (c$, 
+function (a) {
+this.attributes = a;
+this.updateResolveParent ();
+}, "~A");
+Clazz.makeConstructor (c$, 
+function (a) {
+var b = a.getAttributeCount ();
+var c =  new Array (2 * b);
+var d = a.getAttributeNames ();
+var e = 0;
+while (d.hasMoreElements ()) {
+c[e] = d.nextElement ();
+c[e + 1] = a.getAttribute (c[e]);
+e += 2;
+}
+this.attributes = c;
+this.updateResolveParent ();
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "updateResolveParent", 
+ function () {
+this.resolveParent = null;
+var a = this.attributes;
+for (var b = 0; b < a.length; b += 2) {
+if (a[b] === javax.swing.text.StyleConstants.ResolveAttribute) {
+this.resolveParent = a[b + 1];
+break;
+}}
+});
+Clazz.defineMethod (c$, "getLocalAttribute", 
+function (a) {
+if (a === javax.swing.text.StyleConstants.ResolveAttribute) {
+return this.resolveParent;
+}var b = this.attributes;
+for (var c = 0; c < b.length; c += 2) {
+if (a.equals (b[c])) {
+return b[c + 1];
+}}
+return null;
+}, "~O");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+var a = "{";
+var b = this.attributes;
+for (var c = 0; c < b.length; c += 2) {
+if (Clazz.instanceOf (b[c + 1], javax.swing.text.AttributeSet)) {
+a = a + b[c] + "=" + "AttributeSet" + ",";
+} else {
+a = a + b[c] + "=" + b[c + 1] + ",";
+}}
+a = a + "}";
+return a;
+});
+Clazz.defineMethod (c$, "hashCode", 
+function () {
+var a = 0;
+var b = this.attributes;
+for (var c = 1; c < b.length; c += 2) {
+a ^= b[c].hashCode ();
+}
+return a;
+});
+Clazz.defineMethod (c$, "equals", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.AttributeSet)) {
+var b = a;
+return ((this.getAttributeCount () == b.getAttributeCount ()) && this.containsAttributes (b));
+}return false;
+}, "~O");
+Clazz.overrideMethod (c$, "clone", 
+function () {
+return this;
+});
+Clazz.defineMethod (c$, "getAttributeCount", 
+function () {
+return Clazz.doubleToInt (this.attributes.length / 2);
+});
+Clazz.overrideMethod (c$, "isDefined", 
+function (a) {
+var b = this.attributes;
+var c = b.length;
+for (var d = 0; d < c; d += 2) {
+if (a.equals (b[d])) {
+return true;
+}}
+return false;
+}, "~O");
+Clazz.overrideMethod (c$, "isEqual", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
+return a === this;
+}return ((this.getAttributeCount () == a.getAttributeCount ()) && this.containsAttributes (a));
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "copyAttributes", 
+function () {
+return this;
+});
+Clazz.defineMethod (c$, "getAttribute", 
+function (a) {
+var b = this.getLocalAttribute (a);
+if (b == null) {
+var c = this.getResolveParent ();
+if (c != null) b = c.getAttribute (a);
+}return b;
+}, "~O");
+Clazz.defineMethod (c$, "getAttributeNames", 
+function () {
+return Clazz.innerTypeInstance (javax.swing.text.StyleContext.KeyEnumeration, this, null, this.attributes);
+});
+Clazz.overrideMethod (c$, "containsAttribute", 
+function (a, b) {
+return b.equals (this.getAttribute (a));
+}, "~O,~O");
+Clazz.overrideMethod (c$, "containsAttributes", 
+function (a) {
+var b = true;
+var c = a.getAttributeNames ();
+while (b && c.hasMoreElements ()) {
+var d = c.nextElement ();
+b = a.getAttribute (d).equals (this.getAttribute (d));
+}
+return b;
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "getResolveParent", 
+function () {
+return this.resolveParent;
+});
+c$ = Clazz.p0p ();
+};
+c$.$StyleContext$KeyEnumeration$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.attr = null;
+this.i = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.StyleContext, "KeyEnumeration", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (a) {
+this.attr = a;
+this.i = 0;
+}, "~A");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return this.i < this.attr.length;
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+if (this.i < this.attr.length) {
+var a = this.attr[this.i];
+this.i += 2;
+return a;
+}throw  new java.util.NoSuchElementException ();
+});
+c$ = Clazz.p0p ();
+};
+c$.$StyleContext$KeyBuilder$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.keys = null;
+this.data = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.StyleContext, "KeyBuilder");
+Clazz.prepareFields (c$, function () {
+this.keys =  new java.util.Vector ();
+this.data =  new java.util.Vector ();
+});
+Clazz.defineMethod (c$, "initialize", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
+this.initialize ((a).attributes);
+} else {
+this.keys.removeAllElements ();
+this.data.removeAllElements ();
+var b = a.getAttributeNames ();
+while (b.hasMoreElements ()) {
+var c = b.nextElement ();
+this.addAttribute (c, a.getAttribute (c));
+}
+}}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "initialize", 
+ function (a) {
+this.keys.removeAllElements ();
+this.data.removeAllElements ();
+var b = a.length;
+for (var c = 0; c < b; c += 2) {
+this.keys.addElement (a[c]);
+this.data.addElement (a[c + 1]);
+}
+}, "~A");
+Clazz.defineMethod (c$, "createTable", 
+function () {
+var a = this.keys.size ();
+var b =  new Array (2 * a);
+for (var c = 0; c < a; c++) {
+var d = 2 * c;
+b[d] = this.keys.elementAt (c);
+b[d + 1] = this.data.elementAt (c);
+}
+return b;
+});
+Clazz.defineMethod (c$, "getCount", 
+function () {
+return this.keys.size ();
+});
+Clazz.defineMethod (c$, "addAttribute", 
+function (a, b) {
+this.keys.addElement (a);
+this.data.addElement (b);
+}, "~O,~O");
+Clazz.defineMethod (c$, "addAttributes", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
+var b = (a).attributes;
+var c = b.length;
+for (var d = 0; d < c; d += 2) {
+this.addAttribute (b[d], b[d + 1]);
+}
+} else {
+var b = a.getAttributeNames ();
+while (b.hasMoreElements ()) {
+var c = b.nextElement ();
+this.addAttribute (c, a.getAttribute (c));
+}
+}}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "removeAttribute", 
+function (a) {
+var b = this.keys.size ();
+for (var c = 0; c < b; c++) {
+if (this.keys.elementAt (c).equals (a)) {
+this.keys.removeElementAt (c);
+this.data.removeElementAt (c);
+return;
+}}
+}, "~O");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+while (a.hasMoreElements ()) {
+var b = a.nextElement ();
+this.removeAttribute (b);
+}
+}, "java.util.Enumeration");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+var b = a.getAttributeNames ();
+while (b.hasMoreElements ()) {
+var c = b.nextElement ();
+var d = a.getAttribute (c);
+this.removeSearchAttribute (c, d);
+}
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "removeSearchAttribute", 
+ function (a, b) {
+var c = this.keys.size ();
+for (var d = 0; d < c; d++) {
+if (this.keys.elementAt (d).equals (a)) {
+if (this.data.elementAt (d).equals (b)) {
+this.keys.removeElementAt (d);
+this.data.removeElementAt (d);
+}return;
+}}
+}, "~O,~O");
+c$ = Clazz.p0p ();
+};
+c$.$StyleContext$NamedStyle$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.listenerList = null;
+this.changeEvent = null;
+this.attributes = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.StyleContext, "NamedStyle", null, javax.swing.text.Style);
+Clazz.prepareFields (c$, function () {
+this.listenerList =  new javax.swing.event.EventListenerList ();
+});
+Clazz.makeConstructor (c$, 
+function (a, b) {
+this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();
+if (a != null) {
+this.setName (a);
+}if (b != null) {
+this.setResolveParent (b);
+}}, "~S,javax.swing.text.Style");
+Clazz.makeConstructor (c$, 
+function (a) {
+this.construct (null, a);
+}, "javax.swing.text.Style");
+Clazz.makeConstructor (c$, 
+function () {
+this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();
+});
+Clazz.defineMethod (c$, "toString", 
+function () {
+return "NamedStyle:" + this.getName () + " " + this.attributes;
+});
+Clazz.overrideMethod (c$, "getName", 
+function () {
+if (this.isDefined (javax.swing.text.StyleConstants.NameAttribute)) {
+return this.getAttribute (javax.swing.text.StyleConstants.NameAttribute).toString ();
+}return null;
+});
+Clazz.defineMethod (c$, "setName", 
+function (a) {
+if (a != null) {
+this.addAttribute (javax.swing.text.StyleConstants.NameAttribute, a);
+}}, "~S");
+Clazz.overrideMethod (c$, "addChangeListener", 
+function (a) {
+this.listenerList.add (javax.swing.event.ChangeListener, a);
+}, "javax.swing.event.ChangeListener");
+Clazz.overrideMethod (c$, "removeChangeListener", 
+function (a) {
+this.listenerList.remove (javax.swing.event.ChangeListener, a);
+}, "javax.swing.event.ChangeListener");
+Clazz.defineMethod (c$, "getChangeListeners", 
+function () {
+return this.listenerList.getListeners (javax.swing.event.ChangeListener);
+});
+Clazz.defineMethod (c$, "fireStateChanged", 
+function () {
+var a = this.listenerList.getListenerList ();
+for (var b = a.length - 2; b >= 0; b -= 2) {
+if (a[b] === javax.swing.event.ChangeListener) {
+if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
+(a[b + 1]).stateChanged (this.changeEvent);
+}}
+});
+Clazz.defineMethod (c$, "getListeners", 
+function (a) {
+return this.listenerList.getListeners (a);
+}, "Class");
+Clazz.defineMethod (c$, "getAttributeCount", 
+function () {
+return this.attributes.getAttributeCount ();
+});
+Clazz.defineMethod (c$, "isDefined", 
+function (a) {
+return this.attributes.isDefined (a);
+}, "~O");
+Clazz.defineMethod (c$, "isEqual", 
+function (a) {
+return this.attributes.isEqual (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "copyAttributes", 
+function () {
+var a = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null);
+a.attributes = this.attributes.copyAttributes ();
+return a;
+});
+Clazz.defineMethod (c$, "getAttribute", 
+function (a) {
+return this.attributes.getAttribute (a);
+}, "~O");
+Clazz.defineMethod (c$, "getAttributeNames", 
+function () {
+return this.attributes.getAttributeNames ();
+});
+Clazz.defineMethod (c$, "containsAttribute", 
+function (a, b) {
+return this.attributes.containsAttribute (a, b);
+}, "~O,~O");
+Clazz.defineMethod (c$, "containsAttributes", 
+function (a) {
+return this.attributes.containsAttributes (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getResolveParent", 
+function () {
+return this.attributes.getResolveParent ();
+});
+Clazz.overrideMethod (c$, "addAttribute", 
+function (a, b) {
+var c = this.b$["javax.swing.text.StyleContext"];
+this.attributes = c.addAttribute (this.attributes, a, b);
+this.fireStateChanged ();
+}, "~O,~O");
+Clazz.overrideMethod (c$, "addAttributes", 
+function (a) {
+var b = this.b$["javax.swing.text.StyleContext"];
+this.attributes = b.addAttributes (this.attributes, a);
+this.fireStateChanged ();
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "removeAttribute", 
+function (a) {
+var b = this.b$["javax.swing.text.StyleContext"];
+this.attributes = b.removeAttribute (this.attributes, a);
+this.fireStateChanged ();
+}, "~O");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+var b = this.b$["javax.swing.text.StyleContext"];
+this.attributes = b.removeAttributes (this.attributes, a);
+this.fireStateChanged ();
+}, "java.util.Enumeration");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+var b = this.b$["javax.swing.text.StyleContext"];
+if (a === this) {
+this.attributes = b.getEmptySet ();
+} else {
+this.attributes = b.removeAttributes (this.attributes, a);
+}this.fireStateChanged ();
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "setResolveParent", 
+function (a) {
+if (a != null) {
+this.addAttribute (javax.swing.text.StyleConstants.ResolveAttribute, a);
+} else {
+this.removeAttribute (javax.swing.text.StyleConstants.ResolveAttribute);
+}}, "javax.swing.text.AttributeSet");
+c$ = Clazz.p0p ();
+};
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.family = null;
+this.style = 0;
+this.size = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.StyleContext, "FontKey");
+Clazz.makeConstructor (c$, 
+function (a, b, c) {
+this.setValue (a, b, c);
+}, "~S,~N,~N");
+Clazz.defineMethod (c$, "setValue", 
+function (a, b, c) {
+this.family = (a != null) ? a.intern () : null;
+this.style = b;
+this.size = c;
+}, "~S,~N,~N");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+var a = (this.family != null) ? this.family.hashCode () : 0;
+return a ^ this.style ^ this.size;
+});
+Clazz.overrideMethod (c$, "equals", 
+function (a) {
+if (Clazz.instanceOf (a, javax.swing.text.StyleContext.FontKey)) {
+var b = a;
+return (this.size == b.size) && (this.style == b.style) && (this.family === b.family);
+}return false;
+}, "~O");
+c$ = Clazz.p0p ();
+Clazz.defineStatics (c$,
+"defaultContext", null,
+"DEFAULT_STYLE", "default",
+"freezeKeyMap", null,
+"thawKeyMap", null,
+"THRESHOLD", 9);
+{
+}});