1 Clazz.declarePackage ("javax.swing.text");
\r
2 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
3 c$ = Clazz.decorateAsClass (function () {
\r
5 this.fontSearch = null;
\r
6 this.fontTable = null;
\r
7 this.attributesPool = null;
\r
9 if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.SmallAttributeSet")) {
\r
10 javax.swing.text.StyleContext.$StyleContext$SmallAttributeSet$ ();
\r
12 if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyEnumeration")) {
\r
13 javax.swing.text.StyleContext.$StyleContext$KeyEnumeration$ ();
\r
15 if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.KeyBuilder")) {
\r
16 javax.swing.text.StyleContext.$StyleContext$KeyBuilder$ ();
\r
18 if (!Clazz.isClassDefined ("javax.swing.text.StyleContext.NamedStyle")) {
\r
19 javax.swing.text.StyleContext.$StyleContext$NamedStyle$ ();
\r
21 Clazz.instantialize (this, arguments);
\r
22 }, javax.swing.text, "StyleContext", null, javax.swing.text.AbstractDocument.AttributeContext);
\r
23 Clazz.prepareFields (c$, function () {
\r
24 this.fontSearch = new javax.swing.text.StyleContext.FontKey (null, 0, 0);
\r
25 this.fontTable = new java.util.Hashtable ();
\r
26 this.attributesPool = java.util.Collections.synchronizedMap ( new java.util.HashMap ());
\r
27 this.search = new javax.swing.text.SimpleAttributeSet ();
\r
29 c$.getDefaultStyleContext = Clazz.defineMethod (c$, "getDefaultStyleContext",
\r
31 if (javax.swing.text.StyleContext.defaultContext == null) {
\r
32 javax.swing.text.StyleContext.defaultContext = new javax.swing.text.StyleContext ();
\r
33 }return javax.swing.text.StyleContext.defaultContext;
\r
35 Clazz.makeConstructor (c$,
\r
37 this.styles = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, null);
\r
38 this.addStyle ("default", null);
\r
40 Clazz.defineMethod (c$, "addStyle",
\r
41 function (nm, parent) {
\r
42 var style = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null, nm, parent);
\r
44 this.styles.addAttribute (nm, style);
\r
46 }, "~S,javax.swing.text.Style");
\r
47 Clazz.defineMethod (c$, "removeStyle",
\r
49 this.styles.removeAttribute (nm);
\r
51 Clazz.defineMethod (c$, "getStyle",
\r
53 return this.styles.getAttribute (nm);
\r
55 Clazz.defineMethod (c$, "getStyleNames",
\r
57 return this.styles.getAttributeNames ();
\r
59 Clazz.defineMethod (c$, "addChangeListener",
\r
61 this.styles.addChangeListener (l);
\r
62 }, "javax.swing.event.ChangeListener");
\r
63 Clazz.defineMethod (c$, "removeChangeListener",
\r
65 this.styles.removeChangeListener (l);
\r
66 }, "javax.swing.event.ChangeListener");
\r
67 Clazz.defineMethod (c$, "getChangeListeners",
\r
69 return (this.styles).getChangeListeners ();
\r
71 Clazz.defineMethod (c$, "getFont",
\r
74 if (javax.swing.text.StyleConstants.isBold (attr)) {
\r
76 }if (javax.swing.text.StyleConstants.isItalic (attr)) {
\r
78 }var family = javax.swing.text.StyleConstants.getFontFamily (attr);
\r
79 var size = javax.swing.text.StyleConstants.getFontSize (attr);
\r
80 if (javax.swing.text.StyleConstants.isSuperscript (attr) || javax.swing.text.StyleConstants.isSubscript (attr)) {
\r
82 }return this.getFont (family, style, size);
\r
83 }, "javax.swing.text.AttributeSet");
\r
84 Clazz.defineMethod (c$, "getForeground",
\r
86 return javax.swing.text.StyleConstants.getForeground (attr);
\r
87 }, "javax.swing.text.AttributeSet");
\r
88 Clazz.defineMethod (c$, "getBackground",
\r
90 return javax.swing.text.StyleConstants.getBackground (attr);
\r
91 }, "javax.swing.text.AttributeSet");
\r
92 Clazz.defineMethod (c$, "getFont",
\r
93 function (family, style, size) {
\r
94 this.fontSearch.setValue (family, style, size);
\r
95 var f = this.fontTable.get (this.fontSearch);
\r
97 var defaultStyle = this.getStyle ("default");
\r
98 if (defaultStyle != null) {
\r
99 var FONT_ATTRIBUTE_KEY = "FONT_ATTRIBUTE_KEY";
\r
100 var defaultFont = defaultStyle.getAttribute ("FONT_ATTRIBUTE_KEY");
\r
101 if (defaultFont != null && defaultFont.getFamily ().equalsIgnoreCase (family)) {
\r
102 f = defaultFont.deriveFont (style, size);
\r
104 f = new java.awt.Font (family, style, size);
\r
105 }var key = new javax.swing.text.StyleContext.FontKey (family, style, size);
\r
106 this.fontTable.put (key, f);
\r
109 Clazz.defineMethod (c$, "getFontMetrics",
\r
111 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
\r
112 }, "java.awt.Font");
\r
113 Clazz.overrideMethod (c$, "addAttribute",
\r
114 function (old, name, value) {
\r
115 if ((old.getAttributeCount () + 1) <= this.getCompressionThreshold ()) {
\r
116 this.search.removeAttributes (this.search);
\r
117 this.search.addAttributes (old);
\r
118 this.search.addAttribute (name, value);
\r
119 this.reclaim (old);
\r
120 return this.getImmutableUniqueSet ();
\r
121 }var ma = this.getMutableAttributeSet (old);
\r
122 ma.addAttribute (name, value);
\r
124 }, "javax.swing.text.AttributeSet,~O,~O");
\r
125 Clazz.overrideMethod (c$, "addAttributes",
\r
126 function (old, attr) {
\r
127 if ((old.getAttributeCount () + attr.getAttributeCount ()) <= this.getCompressionThreshold ()) {
\r
128 this.search.removeAttributes (this.search);
\r
129 this.search.addAttributes (old);
\r
130 this.search.addAttributes (attr);
\r
131 this.reclaim (old);
\r
132 return this.getImmutableUniqueSet ();
\r
133 }var ma = this.getMutableAttributeSet (old);
\r
134 ma.addAttributes (attr);
\r
136 }, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");
\r
137 Clazz.overrideMethod (c$, "removeAttribute",
\r
138 function (old, name) {
\r
139 if ((old.getAttributeCount () - 1) <= this.getCompressionThreshold ()) {
\r
140 this.search.removeAttributes (this.search);
\r
141 this.search.addAttributes (old);
\r
142 this.search.removeAttribute (name);
\r
143 this.reclaim (old);
\r
144 return this.getImmutableUniqueSet ();
\r
145 }var ma = this.getMutableAttributeSet (old);
\r
146 ma.removeAttribute (name);
\r
148 }, "javax.swing.text.AttributeSet,~O");
\r
149 Clazz.defineMethod (c$, "removeAttributes",
\r
150 function (old, names) {
\r
151 if (old.getAttributeCount () <= this.getCompressionThreshold ()) {
\r
152 this.search.removeAttributes (this.search);
\r
153 this.search.addAttributes (old);
\r
154 this.search.removeAttributes (names);
\r
155 this.reclaim (old);
\r
156 return this.getImmutableUniqueSet ();
\r
157 }var ma = this.getMutableAttributeSet (old);
\r
158 ma.removeAttributes (names);
\r
160 }, "javax.swing.text.AttributeSet,java.util.Enumeration");
\r
161 Clazz.defineMethod (c$, "removeAttributes",
\r
162 function (old, attrs) {
\r
163 if (old.getAttributeCount () <= this.getCompressionThreshold ()) {
\r
164 this.search.removeAttributes (this.search);
\r
165 this.search.addAttributes (old);
\r
166 this.search.removeAttributes (attrs);
\r
167 this.reclaim (old);
\r
168 return this.getImmutableUniqueSet ();
\r
169 }var ma = this.getMutableAttributeSet (old);
\r
170 ma.removeAttributes (attrs);
\r
172 }, "javax.swing.text.AttributeSet,javax.swing.text.AttributeSet");
\r
173 Clazz.overrideMethod (c$, "getEmptySet",
\r
175 return javax.swing.text.SimpleAttributeSet.EMPTY;
\r
177 Clazz.overrideMethod (c$, "reclaim",
\r
179 if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
\r
180 this.attributesPool.size ();
\r
181 }}, "javax.swing.text.AttributeSet");
\r
182 Clazz.defineMethod (c$, "getCompressionThreshold",
\r
186 Clazz.defineMethod (c$, "createSmallAttributeSet",
\r
188 return Clazz.innerTypeInstance (javax.swing.text.StyleContext.SmallAttributeSet, this, null, a);
\r
189 }, "javax.swing.text.AttributeSet");
\r
190 Clazz.defineMethod (c$, "createLargeAttributeSet",
\r
192 return new javax.swing.text.SimpleAttributeSet (a);
\r
193 }, "javax.swing.text.AttributeSet");
\r
194 Clazz.defineMethod (c$, "removeUnusedSets",
\r
196 this.attributesPool.size ();
\r
198 Clazz.defineMethod (c$, "getImmutableUniqueSet",
\r
202 Clazz.defineMethod (c$, "getMutableAttributeSet",
\r
204 if (Clazz.instanceOf (a, javax.swing.text.MutableAttributeSet) && a !== javax.swing.text.SimpleAttributeSet.EMPTY) {
\r
206 }return this.createLargeAttributeSet (a);
\r
207 }, "javax.swing.text.AttributeSet");
\r
208 Clazz.defineMethod (c$, "toString",
\r
210 this.removeUnusedSets ();
\r
212 var iterator = this.attributesPool.keySet ().iterator ();
\r
213 while (iterator.hasNext ()) {
\r
214 var set = iterator.next ();
\r
215 s = s + set + "\n";
\r
219 c$.registerStaticAttributeKey = Clazz.defineMethod (c$, "registerStaticAttributeKey",
\r
221 var ioFmt = key.getClass ().getName () + "." + key.toString ();
\r
222 if (javax.swing.text.StyleContext.freezeKeyMap == null) {
\r
223 javax.swing.text.StyleContext.freezeKeyMap = new java.util.Hashtable ();
\r
224 javax.swing.text.StyleContext.thawKeyMap = new java.util.Hashtable ();
\r
225 }javax.swing.text.StyleContext.freezeKeyMap.put (key, ioFmt);
\r
226 javax.swing.text.StyleContext.thawKeyMap.put (ioFmt, key);
\r
228 c$.getStaticAttribute = Clazz.defineMethod (c$, "getStaticAttribute",
\r
230 if (javax.swing.text.StyleContext.thawKeyMap == null || key == null) {
\r
232 }return javax.swing.text.StyleContext.thawKeyMap.get (key);
\r
234 c$.getStaticAttributeKey = Clazz.defineMethod (c$, "getStaticAttributeKey",
\r
236 return key.getClass ().getName () + "." + key.toString ();
\r
238 c$.$StyleContext$SmallAttributeSet$ = function () {
\r
239 Clazz.pu$h(self.c$);
\r
240 c$ = Clazz.decorateAsClass (function () {
\r
241 Clazz.prepareCallback (this, arguments);
\r
242 this.attributes = null;
\r
243 this.resolveParent = null;
\r
244 Clazz.instantialize (this, arguments);
\r
245 }, javax.swing.text.StyleContext, "SmallAttributeSet", null, javax.swing.text.AttributeSet);
\r
246 Clazz.makeConstructor (c$,
\r
248 this.attributes = a;
\r
249 this.updateResolveParent ();
\r
251 Clazz.makeConstructor (c$,
\r
253 var b = a.getAttributeCount ();
\r
254 var c = new Array (2 * b);
\r
255 var d = a.getAttributeNames ();
\r
257 while (d.hasMoreElements ()) {
\r
258 c[e] = d.nextElement ();
\r
259 c[e + 1] = a.getAttribute (c[e]);
\r
262 this.attributes = c;
\r
263 this.updateResolveParent ();
\r
264 }, "javax.swing.text.AttributeSet");
\r
265 Clazz.defineMethod (c$, "updateResolveParent",
\r
267 this.resolveParent = null;
\r
268 var a = this.attributes;
\r
269 for (var b = 0; b < a.length; b += 2) {
\r
270 if (a[b] === javax.swing.text.StyleConstants.ResolveAttribute) {
\r
271 this.resolveParent = a[b + 1];
\r
275 Clazz.defineMethod (c$, "getLocalAttribute",
\r
277 if (a === javax.swing.text.StyleConstants.ResolveAttribute) {
\r
278 return this.resolveParent;
\r
279 }var b = this.attributes;
\r
280 for (var c = 0; c < b.length; c += 2) {
\r
281 if (a.equals (b[c])) {
\r
286 Clazz.overrideMethod (c$, "toString",
\r
289 var b = this.attributes;
\r
290 for (var c = 0; c < b.length; c += 2) {
\r
291 if (Clazz.instanceOf (b[c + 1], javax.swing.text.AttributeSet)) {
\r
292 a = a + b[c] + "=" + "AttributeSet" + ",";
\r
294 a = a + b[c] + "=" + b[c + 1] + ",";
\r
299 Clazz.defineMethod (c$, "hashCode",
\r
302 var b = this.attributes;
\r
303 for (var c = 1; c < b.length; c += 2) {
\r
304 a ^= b[c].hashCode ();
\r
308 Clazz.defineMethod (c$, "equals",
\r
310 if (Clazz.instanceOf (a, javax.swing.text.AttributeSet)) {
\r
312 return ((this.getAttributeCount () == b.getAttributeCount ()) && this.containsAttributes (b));
\r
315 Clazz.overrideMethod (c$, "clone",
\r
319 Clazz.defineMethod (c$, "getAttributeCount",
\r
321 return Clazz.doubleToInt (this.attributes.length / 2);
\r
323 Clazz.overrideMethod (c$, "isDefined",
\r
325 var b = this.attributes;
\r
327 for (var d = 0; d < c; d += 2) {
\r
328 if (a.equals (b[d])) {
\r
333 Clazz.overrideMethod (c$, "isEqual",
\r
335 if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
\r
337 }return ((this.getAttributeCount () == a.getAttributeCount ()) && this.containsAttributes (a));
\r
338 }, "javax.swing.text.AttributeSet");
\r
339 Clazz.overrideMethod (c$, "copyAttributes",
\r
343 Clazz.defineMethod (c$, "getAttribute",
\r
345 var b = this.getLocalAttribute (a);
\r
347 var c = this.getResolveParent ();
\r
348 if (c != null) b = c.getAttribute (a);
\r
351 Clazz.defineMethod (c$, "getAttributeNames",
\r
353 return Clazz.innerTypeInstance (javax.swing.text.StyleContext.KeyEnumeration, this, null, this.attributes);
\r
355 Clazz.overrideMethod (c$, "containsAttribute",
\r
357 return b.equals (this.getAttribute (a));
\r
359 Clazz.overrideMethod (c$, "containsAttributes",
\r
362 var c = a.getAttributeNames ();
\r
363 while (b && c.hasMoreElements ()) {
\r
364 var d = c.nextElement ();
\r
365 b = a.getAttribute (d).equals (this.getAttribute (d));
\r
368 }, "javax.swing.text.AttributeSet");
\r
369 Clazz.overrideMethod (c$, "getResolveParent",
\r
371 return this.resolveParent;
\r
375 c$.$StyleContext$KeyEnumeration$ = function () {
\r
376 Clazz.pu$h(self.c$);
\r
377 c$ = Clazz.decorateAsClass (function () {
\r
378 Clazz.prepareCallback (this, arguments);
\r
381 Clazz.instantialize (this, arguments);
\r
382 }, javax.swing.text.StyleContext, "KeyEnumeration", null, java.util.Enumeration);
\r
383 Clazz.makeConstructor (c$,
\r
388 Clazz.overrideMethod (c$, "hasMoreElements",
\r
390 return this.i < this.attr.length;
\r
392 Clazz.overrideMethod (c$, "nextElement",
\r
394 if (this.i < this.attr.length) {
\r
395 var a = this.attr[this.i];
\r
398 }throw new java.util.NoSuchElementException ();
\r
402 c$.$StyleContext$KeyBuilder$ = function () {
\r
403 Clazz.pu$h(self.c$);
\r
404 c$ = Clazz.decorateAsClass (function () {
\r
405 Clazz.prepareCallback (this, arguments);
\r
408 Clazz.instantialize (this, arguments);
\r
409 }, javax.swing.text.StyleContext, "KeyBuilder");
\r
410 Clazz.prepareFields (c$, function () {
\r
411 this.keys = new java.util.Vector ();
\r
412 this.data = new java.util.Vector ();
\r
414 Clazz.defineMethod (c$, "initialize",
\r
416 if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
\r
417 this.initialize ((a).attributes);
\r
419 this.keys.removeAllElements ();
\r
420 this.data.removeAllElements ();
\r
421 var b = a.getAttributeNames ();
\r
422 while (b.hasMoreElements ()) {
\r
423 var c = b.nextElement ();
\r
424 this.addAttribute (c, a.getAttribute (c));
\r
426 }}, "javax.swing.text.AttributeSet");
\r
427 Clazz.defineMethod (c$, "initialize",
\r
429 this.keys.removeAllElements ();
\r
430 this.data.removeAllElements ();
\r
432 for (var c = 0; c < b; c += 2) {
\r
433 this.keys.addElement (a[c]);
\r
434 this.data.addElement (a[c + 1]);
\r
437 Clazz.defineMethod (c$, "createTable",
\r
439 var a = this.keys.size ();
\r
440 var b = new Array (2 * a);
\r
441 for (var c = 0; c < a; c++) {
\r
443 b[d] = this.keys.elementAt (c);
\r
444 b[d + 1] = this.data.elementAt (c);
\r
448 Clazz.defineMethod (c$, "getCount",
\r
450 return this.keys.size ();
\r
452 Clazz.defineMethod (c$, "addAttribute",
\r
454 this.keys.addElement (a);
\r
455 this.data.addElement (b);
\r
457 Clazz.defineMethod (c$, "addAttributes",
\r
459 if (Clazz.instanceOf (a, javax.swing.text.StyleContext.SmallAttributeSet)) {
\r
460 var b = (a).attributes;
\r
462 for (var d = 0; d < c; d += 2) {
\r
463 this.addAttribute (b[d], b[d + 1]);
\r
466 var b = a.getAttributeNames ();
\r
467 while (b.hasMoreElements ()) {
\r
468 var c = b.nextElement ();
\r
469 this.addAttribute (c, a.getAttribute (c));
\r
471 }}, "javax.swing.text.AttributeSet");
\r
472 Clazz.defineMethod (c$, "removeAttribute",
\r
474 var b = this.keys.size ();
\r
475 for (var c = 0; c < b; c++) {
\r
476 if (this.keys.elementAt (c).equals (a)) {
\r
477 this.keys.removeElementAt (c);
\r
478 this.data.removeElementAt (c);
\r
482 Clazz.defineMethod (c$, "removeAttributes",
\r
484 while (a.hasMoreElements ()) {
\r
485 var b = a.nextElement ();
\r
486 this.removeAttribute (b);
\r
488 }, "java.util.Enumeration");
\r
489 Clazz.defineMethod (c$, "removeAttributes",
\r
491 var b = a.getAttributeNames ();
\r
492 while (b.hasMoreElements ()) {
\r
493 var c = b.nextElement ();
\r
494 var d = a.getAttribute (c);
\r
495 this.removeSearchAttribute (c, d);
\r
497 }, "javax.swing.text.AttributeSet");
\r
498 Clazz.defineMethod (c$, "removeSearchAttribute",
\r
500 var c = this.keys.size ();
\r
501 for (var d = 0; d < c; d++) {
\r
502 if (this.keys.elementAt (d).equals (a)) {
\r
503 if (this.data.elementAt (d).equals (b)) {
\r
504 this.keys.removeElementAt (d);
\r
505 this.data.removeElementAt (d);
\r
511 c$.$StyleContext$NamedStyle$ = function () {
\r
512 Clazz.pu$h(self.c$);
\r
513 c$ = Clazz.decorateAsClass (function () {
\r
514 Clazz.prepareCallback (this, arguments);
\r
515 this.listenerList = null;
\r
516 this.changeEvent = null;
\r
517 this.attributes = null;
\r
518 Clazz.instantialize (this, arguments);
\r
519 }, javax.swing.text.StyleContext, "NamedStyle", null, javax.swing.text.Style);
\r
520 Clazz.prepareFields (c$, function () {
\r
521 this.listenerList = new javax.swing.event.EventListenerList ();
\r
523 Clazz.makeConstructor (c$,
\r
525 this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();
\r
529 this.setResolveParent (b);
\r
530 }}, "~S,javax.swing.text.Style");
\r
531 Clazz.makeConstructor (c$,
\r
533 this.construct (null, a);
\r
534 }, "javax.swing.text.Style");
\r
535 Clazz.makeConstructor (c$,
\r
537 this.attributes = this.b$["javax.swing.text.StyleContext"].getEmptySet ();
\r
539 Clazz.defineMethod (c$, "toString",
\r
541 return "NamedStyle:" + this.getName () + " " + this.attributes;
\r
543 Clazz.overrideMethod (c$, "getName",
\r
545 if (this.isDefined (javax.swing.text.StyleConstants.NameAttribute)) {
\r
546 return this.getAttribute (javax.swing.text.StyleConstants.NameAttribute).toString ();
\r
549 Clazz.defineMethod (c$, "setName",
\r
552 this.addAttribute (javax.swing.text.StyleConstants.NameAttribute, a);
\r
554 Clazz.overrideMethod (c$, "addChangeListener",
\r
556 this.listenerList.add (javax.swing.event.ChangeListener, a);
\r
557 }, "javax.swing.event.ChangeListener");
\r
558 Clazz.overrideMethod (c$, "removeChangeListener",
\r
560 this.listenerList.remove (javax.swing.event.ChangeListener, a);
\r
561 }, "javax.swing.event.ChangeListener");
\r
562 Clazz.defineMethod (c$, "getChangeListeners",
\r
564 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
\r
566 Clazz.defineMethod (c$, "fireStateChanged",
\r
568 var a = this.listenerList.getListenerList ();
\r
569 for (var b = a.length - 2; b >= 0; b -= 2) {
\r
570 if (a[b] === javax.swing.event.ChangeListener) {
\r
571 if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this);
\r
572 (a[b + 1]).stateChanged (this.changeEvent);
\r
575 Clazz.defineMethod (c$, "getListeners",
\r
577 return this.listenerList.getListeners (a);
\r
579 Clazz.defineMethod (c$, "getAttributeCount",
\r
581 return this.attributes.getAttributeCount ();
\r
583 Clazz.defineMethod (c$, "isDefined",
\r
585 return this.attributes.isDefined (a);
\r
587 Clazz.defineMethod (c$, "isEqual",
\r
589 return this.attributes.isEqual (a);
\r
590 }, "javax.swing.text.AttributeSet");
\r
591 Clazz.defineMethod (c$, "copyAttributes",
\r
593 var a = Clazz.innerTypeInstance (javax.swing.text.StyleContext.NamedStyle, this, null);
\r
594 a.attributes = this.attributes.copyAttributes ();
\r
597 Clazz.defineMethod (c$, "getAttribute",
\r
599 return this.attributes.getAttribute (a);
\r
601 Clazz.defineMethod (c$, "getAttributeNames",
\r
603 return this.attributes.getAttributeNames ();
\r
605 Clazz.defineMethod (c$, "containsAttribute",
\r
607 return this.attributes.containsAttribute (a, b);
\r
609 Clazz.defineMethod (c$, "containsAttributes",
\r
611 return this.attributes.containsAttributes (a);
\r
612 }, "javax.swing.text.AttributeSet");
\r
613 Clazz.defineMethod (c$, "getResolveParent",
\r
615 return this.attributes.getResolveParent ();
\r
617 Clazz.overrideMethod (c$, "addAttribute",
\r
619 var c = this.b$["javax.swing.text.StyleContext"];
\r
620 this.attributes = c.addAttribute (this.attributes, a, b);
\r
621 this.fireStateChanged ();
\r
623 Clazz.overrideMethod (c$, "addAttributes",
\r
625 var b = this.b$["javax.swing.text.StyleContext"];
\r
626 this.attributes = b.addAttributes (this.attributes, a);
\r
627 this.fireStateChanged ();
\r
628 }, "javax.swing.text.AttributeSet");
\r
629 Clazz.overrideMethod (c$, "removeAttribute",
\r
631 var b = this.b$["javax.swing.text.StyleContext"];
\r
632 this.attributes = b.removeAttribute (this.attributes, a);
\r
633 this.fireStateChanged ();
\r
635 Clazz.defineMethod (c$, "removeAttributes",
\r
637 var b = this.b$["javax.swing.text.StyleContext"];
\r
638 this.attributes = b.removeAttributes (this.attributes, a);
\r
639 this.fireStateChanged ();
\r
640 }, "java.util.Enumeration");
\r
641 Clazz.defineMethod (c$, "removeAttributes",
\r
643 var b = this.b$["javax.swing.text.StyleContext"];
\r
645 this.attributes = b.getEmptySet ();
\r
647 this.attributes = b.removeAttributes (this.attributes, a);
\r
648 }this.fireStateChanged ();
\r
649 }, "javax.swing.text.AttributeSet");
\r
650 Clazz.overrideMethod (c$, "setResolveParent",
\r
653 this.addAttribute (javax.swing.text.StyleConstants.ResolveAttribute, a);
\r
655 this.removeAttribute (javax.swing.text.StyleConstants.ResolveAttribute);
\r
656 }}, "javax.swing.text.AttributeSet");
\r
659 Clazz.pu$h(self.c$);
\r
660 c$ = Clazz.decorateAsClass (function () {
\r
661 this.family = null;
\r
664 Clazz.instantialize (this, arguments);
\r
665 }, javax.swing.text.StyleContext, "FontKey");
\r
666 Clazz.makeConstructor (c$,
\r
667 function (a, b, c) {
\r
668 this.setValue (a, b, c);
\r
670 Clazz.defineMethod (c$, "setValue",
\r
671 function (a, b, c) {
\r
672 this.family = (a != null) ? a.intern () : null;
\r
676 Clazz.overrideMethod (c$, "hashCode",
\r
678 var a = (this.family != null) ? this.family.hashCode () : 0;
\r
679 return a ^ this.style ^ this.size;
\r
681 Clazz.overrideMethod (c$, "equals",
\r
683 if (Clazz.instanceOf (a, javax.swing.text.StyleContext.FontKey)) {
\r
685 return (this.size == b.size) && (this.style == b.style) && (this.family === b.family);
\r
689 Clazz.defineStatics (c$,
\r
690 "defaultContext", null,
\r
691 "DEFAULT_STYLE", "default",
\r
692 "freezeKeyMap", null,
\r
693 "thawKeyMap", null,
\r