1 Clazz.declarePackage ("javax.swing.text");
\r
2 Clazz.load (["javax.swing.text.AttributeSet"], "javax.swing.text.StyleConstants", ["java.lang.Boolean", "$.Float", "java.awt.Color"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.representation = null;
\r
5 Clazz.instantialize (this, arguments);
\r
6 }, javax.swing.text, "StyleConstants");
\r
7 Clazz.overrideMethod (c$, "toString",
\r
9 return this.representation;
\r
11 c$.getBidiLevel = Clazz.defineMethod (c$, "getBidiLevel",
\r
13 var o = a.getAttribute (javax.swing.text.StyleConstants.BidiLevel);
\r
15 return o.intValue ();
\r
17 }, "javax.swing.text.AttributeSet");
\r
18 c$.setBidiLevel = Clazz.defineMethod (c$, "setBidiLevel",
\r
20 a.addAttribute (javax.swing.text.StyleConstants.BidiLevel, new Integer (o));
\r
21 }, "javax.swing.text.MutableAttributeSet,~N");
\r
22 c$.getComponent = Clazz.defineMethod (c$, "getComponent",
\r
24 return a.getAttribute (javax.swing.text.StyleConstants.ComponentAttribute);
\r
25 }, "javax.swing.text.AttributeSet");
\r
26 c$.setComponent = Clazz.defineMethod (c$, "setComponent",
\r
28 a.addAttribute ("$ename", "component");
\r
29 a.addAttribute (javax.swing.text.StyleConstants.ComponentAttribute, c);
\r
30 }, "javax.swing.text.MutableAttributeSet,java.awt.Component");
\r
31 c$.getIcon = Clazz.defineMethod (c$, "getIcon",
\r
33 return a.getAttribute (javax.swing.text.StyleConstants.IconAttribute);
\r
34 }, "javax.swing.text.AttributeSet");
\r
35 c$.setIcon = Clazz.defineMethod (c$, "setIcon",
\r
37 a.addAttribute ("$ename", "icon");
\r
38 a.addAttribute (javax.swing.text.StyleConstants.IconAttribute, c);
\r
39 }, "javax.swing.text.MutableAttributeSet,javax.swing.Icon");
\r
40 c$.getFontFamily = Clazz.defineMethod (c$, "getFontFamily",
\r
42 var family = a.getAttribute (javax.swing.text.StyleConstants.FontFamily);
\r
43 if (family == null) {
\r
44 family = "Monospaced";
\r
46 }, "javax.swing.text.AttributeSet");
\r
47 c$.setFontFamily = Clazz.defineMethod (c$, "setFontFamily",
\r
49 a.addAttribute (javax.swing.text.StyleConstants.FontFamily, fam);
\r
50 }, "javax.swing.text.MutableAttributeSet,~S");
\r
51 c$.getFontSize = Clazz.defineMethod (c$, "getFontSize",
\r
53 var size = a.getAttribute (javax.swing.text.StyleConstants.FontSize);
\r
55 return size.intValue ();
\r
57 }, "javax.swing.text.AttributeSet");
\r
58 c$.setFontSize = Clazz.defineMethod (c$, "setFontSize",
\r
60 a.addAttribute (javax.swing.text.StyleConstants.FontSize, new Integer (s));
\r
61 }, "javax.swing.text.MutableAttributeSet,~N");
\r
62 c$.isBold = Clazz.defineMethod (c$, "isBold",
\r
64 var bold = a.getAttribute (javax.swing.text.StyleConstants.Bold);
\r
66 return bold.booleanValue ();
\r
68 }, "javax.swing.text.AttributeSet");
\r
69 c$.setBold = Clazz.defineMethod (c$, "setBold",
\r
71 a.addAttribute (javax.swing.text.StyleConstants.Bold, Boolean.$valueOf (b));
\r
72 }, "javax.swing.text.MutableAttributeSet,~B");
\r
73 c$.isItalic = Clazz.defineMethod (c$, "isItalic",
\r
75 var italic = a.getAttribute (javax.swing.text.StyleConstants.Italic);
\r
76 if (italic != null) {
\r
77 return italic.booleanValue ();
\r
79 }, "javax.swing.text.AttributeSet");
\r
80 c$.setItalic = Clazz.defineMethod (c$, "setItalic",
\r
82 a.addAttribute (javax.swing.text.StyleConstants.Italic, Boolean.$valueOf (b));
\r
83 }, "javax.swing.text.MutableAttributeSet,~B");
\r
84 c$.isUnderline = Clazz.defineMethod (c$, "isUnderline",
\r
86 var underline = a.getAttribute (javax.swing.text.StyleConstants.Underline);
\r
87 if (underline != null) {
\r
88 return underline.booleanValue ();
\r
90 }, "javax.swing.text.AttributeSet");
\r
91 c$.isStrikeThrough = Clazz.defineMethod (c$, "isStrikeThrough",
\r
93 var strike = a.getAttribute (javax.swing.text.StyleConstants.StrikeThrough);
\r
94 if (strike != null) {
\r
95 return strike.booleanValue ();
\r
97 }, "javax.swing.text.AttributeSet");
\r
98 c$.isSuperscript = Clazz.defineMethod (c$, "isSuperscript",
\r
100 var superscript = a.getAttribute (javax.swing.text.StyleConstants.Superscript);
\r
101 if (superscript != null) {
\r
102 return superscript.booleanValue ();
\r
104 }, "javax.swing.text.AttributeSet");
\r
105 c$.isSubscript = Clazz.defineMethod (c$, "isSubscript",
\r
107 var subscript = a.getAttribute (javax.swing.text.StyleConstants.Subscript);
\r
108 if (subscript != null) {
\r
109 return subscript.booleanValue ();
\r
111 }, "javax.swing.text.AttributeSet");
\r
112 c$.setUnderline = Clazz.defineMethod (c$, "setUnderline",
\r
114 a.addAttribute (javax.swing.text.StyleConstants.Underline, Boolean.$valueOf (b));
\r
115 }, "javax.swing.text.MutableAttributeSet,~B");
\r
116 c$.setStrikeThrough = Clazz.defineMethod (c$, "setStrikeThrough",
\r
118 a.addAttribute (javax.swing.text.StyleConstants.StrikeThrough, Boolean.$valueOf (b));
\r
119 }, "javax.swing.text.MutableAttributeSet,~B");
\r
120 c$.setSuperscript = Clazz.defineMethod (c$, "setSuperscript",
\r
122 a.addAttribute (javax.swing.text.StyleConstants.Superscript, Boolean.$valueOf (b));
\r
123 }, "javax.swing.text.MutableAttributeSet,~B");
\r
124 c$.setSubscript = Clazz.defineMethod (c$, "setSubscript",
\r
126 a.addAttribute (javax.swing.text.StyleConstants.Subscript, Boolean.$valueOf (b));
\r
127 }, "javax.swing.text.MutableAttributeSet,~B");
\r
128 c$.getForeground = Clazz.defineMethod (c$, "getForeground",
\r
130 var fg = a.getAttribute (javax.swing.text.StyleConstants.Foreground);
\r
132 fg = java.awt.Color.black;
\r
134 }, "javax.swing.text.AttributeSet");
\r
135 c$.setForeground = Clazz.defineMethod (c$, "setForeground",
\r
137 a.addAttribute (javax.swing.text.StyleConstants.Foreground, fg);
\r
138 }, "javax.swing.text.MutableAttributeSet,java.awt.Color");
\r
139 c$.getBackground = Clazz.defineMethod (c$, "getBackground",
\r
141 var fg = a.getAttribute (javax.swing.text.StyleConstants.Background);
\r
143 fg = java.awt.Color.black;
\r
145 }, "javax.swing.text.AttributeSet");
\r
146 c$.setBackground = Clazz.defineMethod (c$, "setBackground",
\r
148 a.addAttribute (javax.swing.text.StyleConstants.Background, fg);
\r
149 }, "javax.swing.text.MutableAttributeSet,java.awt.Color");
\r
150 c$.getFirstLineIndent = Clazz.defineMethod (c$, "getFirstLineIndent",
\r
152 var indent = a.getAttribute (javax.swing.text.StyleConstants.FirstLineIndent);
\r
153 if (indent != null) {
\r
154 return indent.floatValue ();
\r
156 }, "javax.swing.text.AttributeSet");
\r
157 c$.setFirstLineIndent = Clazz.defineMethod (c$, "setFirstLineIndent",
\r
159 a.addAttribute (javax.swing.text.StyleConstants.FirstLineIndent, new Float (i));
\r
160 }, "javax.swing.text.MutableAttributeSet,~N");
\r
161 c$.getRightIndent = Clazz.defineMethod (c$, "getRightIndent",
\r
163 var indent = a.getAttribute (javax.swing.text.StyleConstants.RightIndent);
\r
164 if (indent != null) {
\r
165 return indent.floatValue ();
\r
167 }, "javax.swing.text.AttributeSet");
\r
168 c$.setRightIndent = Clazz.defineMethod (c$, "setRightIndent",
\r
170 a.addAttribute (javax.swing.text.StyleConstants.RightIndent, new Float (i));
\r
171 }, "javax.swing.text.MutableAttributeSet,~N");
\r
172 c$.getLeftIndent = Clazz.defineMethod (c$, "getLeftIndent",
\r
174 var indent = a.getAttribute (javax.swing.text.StyleConstants.LeftIndent);
\r
175 if (indent != null) {
\r
176 return indent.floatValue ();
\r
178 }, "javax.swing.text.AttributeSet");
\r
179 c$.setLeftIndent = Clazz.defineMethod (c$, "setLeftIndent",
\r
181 a.addAttribute (javax.swing.text.StyleConstants.LeftIndent, new Float (i));
\r
182 }, "javax.swing.text.MutableAttributeSet,~N");
\r
183 c$.getLineSpacing = Clazz.defineMethod (c$, "getLineSpacing",
\r
185 var space = a.getAttribute (javax.swing.text.StyleConstants.LineSpacing);
\r
186 if (space != null) {
\r
187 return space.floatValue ();
\r
189 }, "javax.swing.text.AttributeSet");
\r
190 c$.setLineSpacing = Clazz.defineMethod (c$, "setLineSpacing",
\r
192 a.addAttribute (javax.swing.text.StyleConstants.LineSpacing, new Float (i));
\r
193 }, "javax.swing.text.MutableAttributeSet,~N");
\r
194 c$.getSpaceAbove = Clazz.defineMethod (c$, "getSpaceAbove",
\r
196 var space = a.getAttribute (javax.swing.text.StyleConstants.SpaceAbove);
\r
197 if (space != null) {
\r
198 return space.floatValue ();
\r
200 }, "javax.swing.text.AttributeSet");
\r
201 c$.setSpaceAbove = Clazz.defineMethod (c$, "setSpaceAbove",
\r
203 a.addAttribute (javax.swing.text.StyleConstants.SpaceAbove, new Float (i));
\r
204 }, "javax.swing.text.MutableAttributeSet,~N");
\r
205 c$.getSpaceBelow = Clazz.defineMethod (c$, "getSpaceBelow",
\r
207 var space = a.getAttribute (javax.swing.text.StyleConstants.SpaceBelow);
\r
208 if (space != null) {
\r
209 return space.floatValue ();
\r
211 }, "javax.swing.text.AttributeSet");
\r
212 c$.setSpaceBelow = Clazz.defineMethod (c$, "setSpaceBelow",
\r
214 a.addAttribute (javax.swing.text.StyleConstants.SpaceBelow, new Float (i));
\r
215 }, "javax.swing.text.MutableAttributeSet,~N");
\r
216 c$.getAlignment = Clazz.defineMethod (c$, "getAlignment",
\r
218 var align = a.getAttribute (javax.swing.text.StyleConstants.Alignment);
\r
219 if (align != null) {
\r
220 return align.intValue ();
\r
222 }, "javax.swing.text.AttributeSet");
\r
223 c$.setAlignment = Clazz.defineMethod (c$, "setAlignment",
\r
224 function (a, align) {
\r
225 a.addAttribute (javax.swing.text.StyleConstants.Alignment, new Integer (align));
\r
226 }, "javax.swing.text.MutableAttributeSet,~N");
\r
227 c$.getTabSet = Clazz.defineMethod (c$, "getTabSet",
\r
229 var tabs = a.getAttribute (javax.swing.text.StyleConstants.TabSet);
\r
231 }, "javax.swing.text.AttributeSet");
\r
232 c$.setTabSet = Clazz.defineMethod (c$, "setTabSet",
\r
233 function (a, tabs) {
\r
234 a.addAttribute (javax.swing.text.StyleConstants.TabSet, tabs);
\r
235 }, "javax.swing.text.MutableAttributeSet,javax.swing.text.TabSet");
\r
236 Clazz.makeConstructor (c$,
\r
237 function (representation) {
\r
238 this.representation = representation;
\r
240 Clazz.pu$h(self.c$);
\r
241 c$ = Clazz.declareType (javax.swing.text.StyleConstants, "ParagraphConstants", javax.swing.text.StyleConstants, javax.swing.text.AttributeSet.ParagraphAttribute);
\r
243 Clazz.pu$h(self.c$);
\r
244 c$ = Clazz.declareType (javax.swing.text.StyleConstants, "CharacterConstants", javax.swing.text.StyleConstants, javax.swing.text.AttributeSet.CharacterAttribute);
\r
246 Clazz.pu$h(self.c$);
\r
247 c$ = Clazz.declareType (javax.swing.text.StyleConstants, "ColorConstants", javax.swing.text.StyleConstants, [javax.swing.text.AttributeSet.ColorAttribute, javax.swing.text.AttributeSet.CharacterAttribute]);
\r
249 Clazz.pu$h(self.c$);
\r
250 c$ = Clazz.declareType (javax.swing.text.StyleConstants, "FontConstants", javax.swing.text.StyleConstants, [javax.swing.text.AttributeSet.FontAttribute, javax.swing.text.AttributeSet.CharacterAttribute]);
\r
252 Clazz.defineStatics (c$,
\r
253 "ComponentElementName", "component",
\r
254 "IconElementName", "icon");
\r
255 c$.NameAttribute = c$.prototype.NameAttribute = new javax.swing.text.StyleConstants ("name");
\r
256 c$.ResolveAttribute = c$.prototype.ResolveAttribute = new javax.swing.text.StyleConstants ("resolver");
\r
257 c$.ModelAttribute = c$.prototype.ModelAttribute = new javax.swing.text.StyleConstants ("model");
\r
258 c$.BidiLevel = c$.prototype.BidiLevel = new javax.swing.text.StyleConstants.CharacterConstants ("bidiLevel");
\r
259 c$.FontFamily = c$.prototype.FontFamily = new javax.swing.text.StyleConstants.FontConstants ("family");
\r
260 c$.Family = c$.prototype.Family = javax.swing.text.StyleConstants.FontFamily;
\r
261 c$.FontSize = c$.prototype.FontSize = new javax.swing.text.StyleConstants.FontConstants ("size");
\r
262 c$.Size = c$.prototype.Size = javax.swing.text.StyleConstants.FontSize;
\r
263 c$.Bold = c$.prototype.Bold = new javax.swing.text.StyleConstants.FontConstants ("bold");
\r
264 c$.Italic = c$.prototype.Italic = new javax.swing.text.StyleConstants.FontConstants ("italic");
\r
265 c$.Underline = c$.prototype.Underline = new javax.swing.text.StyleConstants.CharacterConstants ("underline");
\r
266 c$.StrikeThrough = c$.prototype.StrikeThrough = new javax.swing.text.StyleConstants.CharacterConstants ("strikethrough");
\r
267 c$.Superscript = c$.prototype.Superscript = new javax.swing.text.StyleConstants.CharacterConstants ("superscript");
\r
268 c$.Subscript = c$.prototype.Subscript = new javax.swing.text.StyleConstants.CharacterConstants ("subscript");
\r
269 c$.Foreground = c$.prototype.Foreground = new javax.swing.text.StyleConstants.ColorConstants ("foreground");
\r
270 c$.Background = c$.prototype.Background = new javax.swing.text.StyleConstants.ColorConstants ("background");
\r
271 c$.ComponentAttribute = c$.prototype.ComponentAttribute = new javax.swing.text.StyleConstants.CharacterConstants ("component");
\r
272 c$.IconAttribute = c$.prototype.IconAttribute = new javax.swing.text.StyleConstants.CharacterConstants ("icon");
\r
273 c$.ComposedTextAttribute = c$.prototype.ComposedTextAttribute = new javax.swing.text.StyleConstants ("composed text");
\r
274 c$.FirstLineIndent = c$.prototype.FirstLineIndent = new javax.swing.text.StyleConstants.ParagraphConstants ("FirstLineIndent");
\r
275 c$.LeftIndent = c$.prototype.LeftIndent = new javax.swing.text.StyleConstants.ParagraphConstants ("LeftIndent");
\r
276 c$.RightIndent = c$.prototype.RightIndent = new javax.swing.text.StyleConstants.ParagraphConstants ("RightIndent");
\r
277 c$.LineSpacing = c$.prototype.LineSpacing = new javax.swing.text.StyleConstants.ParagraphConstants ("LineSpacing");
\r
278 c$.SpaceAbove = c$.prototype.SpaceAbove = new javax.swing.text.StyleConstants.ParagraphConstants ("SpaceAbove");
\r
279 c$.SpaceBelow = c$.prototype.SpaceBelow = new javax.swing.text.StyleConstants.ParagraphConstants ("SpaceBelow");
\r
280 c$.Alignment = c$.prototype.Alignment = new javax.swing.text.StyleConstants.ParagraphConstants ("Alignment");
\r
281 c$.TabSet = c$.prototype.TabSet = new javax.swing.text.StyleConstants.ParagraphConstants ("TabSet");
\r
282 c$.Orientation = c$.prototype.Orientation = new javax.swing.text.StyleConstants.ParagraphConstants ("Orientation");
\r
283 Clazz.defineStatics (c$,
\r
287 "ALIGN_JUSTIFIED", 3);
\r
288 c$.keys = c$.prototype.keys = Clazz.newArray (-1, [javax.swing.text.StyleConstants.NameAttribute, javax.swing.text.StyleConstants.ResolveAttribute, javax.swing.text.StyleConstants.BidiLevel, javax.swing.text.StyleConstants.FontFamily, javax.swing.text.StyleConstants.FontSize, javax.swing.text.StyleConstants.Bold, javax.swing.text.StyleConstants.Italic, javax.swing.text.StyleConstants.Underline, javax.swing.text.StyleConstants.StrikeThrough, javax.swing.text.StyleConstants.Superscript, javax.swing.text.StyleConstants.Subscript, javax.swing.text.StyleConstants.Foreground, javax.swing.text.StyleConstants.Background, javax.swing.text.StyleConstants.ComponentAttribute, javax.swing.text.StyleConstants.IconAttribute, javax.swing.text.StyleConstants.FirstLineIndent, javax.swing.text.StyleConstants.LeftIndent, javax.swing.text.StyleConstants.RightIndent, javax.swing.text.StyleConstants.LineSpacing, javax.swing.text.StyleConstants.SpaceAbove, javax.swing.text.StyleConstants.SpaceBelow, javax.swing.text.StyleConstants.Alignment, javax.swing.text.StyleConstants.TabSet, javax.swing.text.StyleConstants.Orientation, javax.swing.text.StyleConstants.ModelAttribute, javax.swing.text.StyleConstants.ComposedTextAttribute]);
\r