0c94b752b8a2e8fc50db5882708ab64d33f6d5da
[jalviewjs.git] / site / swingjs / j2s / javax / swing / text / InternationalFormatter.js
1 Clazz.declarePackage ("javax.swing.text");\r
2 Clazz.load (["javax.swing.AbstractAction", "javax.swing.text.DefaultFormatter"], "javax.swing.text.InternationalFormatter", ["java.lang.StringBuffer", "java.util.ArrayList", "$.BitSet", "java.text.AttributedCharacterIterator.Attribute", "java.text.ParseException"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.format = null;\r
5 this.max = null;\r
6 this.min = null;\r
7 this.literalMask = null;\r
8 this.iterator = null;\r
9 this.validMask = false;\r
10 this.string = null;\r
11 this.ignoreDocumentMutate = false;\r
12 if (!Clazz.isClassDefined ("javax.swing.text.InternationalFormatter.IncrementAction")) {\r
13 javax.swing.text.InternationalFormatter.$InternationalFormatter$IncrementAction$ ();\r
14 }\r
15 Clazz.instantialize (this, arguments);\r
16 }, javax.swing.text, "InternationalFormatter", javax.swing.text.DefaultFormatter);\r
17 Clazz.makeConstructor (c$, \r
18 function () {\r
19 Clazz.superConstructor (this, javax.swing.text.InternationalFormatter, []);\r
20 this.setOverwriteMode (false);\r
21 });\r
22 Clazz.makeConstructor (c$, \r
23 function (format) {\r
24 this.construct ();\r
25 this.setFormat (format);\r
26 }, "java.text.Format");\r
27 Clazz.defineMethod (c$, "setFormat", \r
28 function (format) {\r
29 this.format = format;\r
30 }, "java.text.Format");\r
31 Clazz.defineMethod (c$, "getFormat", \r
32 function () {\r
33 return this.format;\r
34 });\r
35 Clazz.defineMethod (c$, "setMinimum", \r
36 function (minimum) {\r
37 if (this.getValueClass () == null && minimum != null) {\r
38 this.setValueClass (minimum.getClass ());\r
39 }this.min = minimum;\r
40 }, "Comparable");\r
41 Clazz.defineMethod (c$, "getMinimum", \r
42 function () {\r
43 return this.min;\r
44 });\r
45 Clazz.defineMethod (c$, "setMaximum", \r
46 function (max) {\r
47 if (this.getValueClass () == null && max != null) {\r
48 this.setValueClass (max.getClass ());\r
49 }this.max = max;\r
50 }, "Comparable");\r
51 Clazz.defineMethod (c$, "getMaximum", \r
52 function () {\r
53 return this.max;\r
54 });\r
55 Clazz.defineMethod (c$, "install", \r
56 function (ftf) {\r
57 Clazz.superCall (this, javax.swing.text.InternationalFormatter, "install", [ftf]);\r
58 this.updateMaskIfNecessary ();\r
59 this.positionCursorAtInitialLocation ();\r
60 }, "javax.swing.JFormattedTextField");\r
61 Clazz.overrideMethod (c$, "valueToString", \r
62 function (value) {\r
63 if (value == null) {\r
64 return "";\r
65 }var f = this.getFormat ();\r
66 if (f == null) {\r
67 return value.toString ();\r
68 }return f.format (value);\r
69 }, "~O");\r
70 Clazz.defineMethod (c$, "stringToValue", \r
71 function (text) {\r
72 var value = this.stringToValueParse (text, this.getFormat ());\r
73 if (value != null && this.getValueClass () != null && !this.getValueClass ().isInstance (value)) {\r
74 value = Clazz.superCall (this, javax.swing.text.InternationalFormatter, "stringToValue", [value.toString ()]);\r
75 }try {\r
76 if (!this.isValidValue (value, true)) {\r
77 throw  new java.text.ParseException ("Value not within min/max range", 0);\r
78 }} catch (cce) {\r
79 if (Clazz.exceptionOf (cce, ClassCastException)) {\r
80 throw  new java.text.ParseException ("Class cast exception comparing values: " + cce, 0);\r
81 } else {\r
82 throw cce;\r
83 }\r
84 }\r
85 return value;\r
86 }, "~S");\r
87 Clazz.defineMethod (c$, "getFields", \r
88 function (offset) {\r
89 if (this.getAllowsInvalid ()) {\r
90 this.updateMask ();\r
91 }var attrs = this.getAttributes (offset);\r
92 if (attrs != null && attrs.size () > 0) {\r
93 var al =  new java.util.ArrayList ();\r
94 al.addAll (attrs.keySet ());\r
95 return al.toArray (javax.swing.text.InternationalFormatter.EMPTY_FIELD_ARRAY);\r
96 }return javax.swing.text.InternationalFormatter.EMPTY_FIELD_ARRAY;\r
97 }, "~N");\r
98 Clazz.defineMethod (c$, "clone", \r
99 function () {\r
100 var formatter = Clazz.superCall (this, javax.swing.text.InternationalFormatter, "clone", []);\r
101 formatter.literalMask = null;\r
102 formatter.iterator = null;\r
103 formatter.validMask = false;\r
104 formatter.string = null;\r
105 return formatter;\r
106 });\r
107 Clazz.overrideMethod (c$, "getActions", \r
108 function () {\r
109 if (this.getSupportsIncrement ()) {\r
110 return  Clazz.newArray (-1, [Clazz.innerTypeInstance (javax.swing.text.InternationalFormatter.IncrementAction, this, null, "increment", 1), Clazz.innerTypeInstance (javax.swing.text.InternationalFormatter.IncrementAction, this, null, "decrement", -1)]);\r
111 }return null;\r
112 });\r
113 Clazz.defineMethod (c$, "stringToValueParse", \r
114 function (text, f) {\r
115 if (f == null) {\r
116 return text;\r
117 }return f.parseObject (text);\r
118 }, "~S,java.text.Format");\r
119 Clazz.defineMethod (c$, "isValidValue", \r
120 function (value, wantsCCE) {\r
121 var min = this.getMinimum ();\r
122 try {\r
123 if (min != null && min.compareTo (value) > 0) {\r
124 return false;\r
125 }} catch (cce) {\r
126 if (Clazz.exceptionOf (cce, ClassCastException)) {\r
127 if (wantsCCE) {\r
128 throw cce;\r
129 }return false;\r
130 } else {\r
131 throw cce;\r
132 }\r
133 }\r
134 var max = this.getMaximum ();\r
135 try {\r
136 if (max != null && max.compareTo (value) < 0) {\r
137 return false;\r
138 }} catch (cce) {\r
139 if (Clazz.exceptionOf (cce, ClassCastException)) {\r
140 if (wantsCCE) {\r
141 throw cce;\r
142 }return false;\r
143 } else {\r
144 throw cce;\r
145 }\r
146 }\r
147 return true;\r
148 }, "~O,~B");\r
149 Clazz.defineMethod (c$, "getAttributes", \r
150 function (index) {\r
151 if (this.isValidMask ()) {\r
152 var iterator = this.getIterator ();\r
153 if (index >= 0 && index <= iterator.getEndIndex ()) {\r
154 iterator.setIndex (index);\r
155 return iterator.getAttributes ();\r
156 }}return null;\r
157 }, "~N");\r
158 Clazz.defineMethod (c$, "getAttributeStart", \r
159 function (id) {\r
160 if (this.isValidMask ()) {\r
161 var iterator = this.getIterator ();\r
162 iterator.first ();\r
163 while (iterator.current () != '\uffff') {\r
164 if (iterator.getAttribute (id) != null) {\r
165 return iterator.getIndex ();\r
166 }iterator.next ();\r
167 }\r
168 }return -1;\r
169 }, "java.text.AttributedCharacterIterator.Attribute");\r
170 Clazz.defineMethod (c$, "getIterator", \r
171 function () {\r
172 return this.iterator;\r
173 });\r
174 Clazz.defineMethod (c$, "updateMaskIfNecessary", \r
175 function () {\r
176 if (!this.getAllowsInvalid () && (this.getFormat () != null)) {\r
177 if (!this.isValidMask ()) {\r
178 this.updateMask ();\r
179 } else {\r
180 var newString = this.getFormattedTextField ().getText ();\r
181 if (!newString.equals (this.string)) {\r
182 this.updateMask ();\r
183 }}}});\r
184 Clazz.defineMethod (c$, "updateMask", \r
185 function () {\r
186 if (this.getFormat () != null) {\r
187 var doc = this.getFormattedTextField ().getDocument ();\r
188 this.validMask = false;\r
189 if (doc != null) {\r
190 try {\r
191 this.string = doc.getText (0, doc.getLength ());\r
192 } catch (ble) {\r
193 if (Clazz.exceptionOf (ble, javax.swing.text.BadLocationException)) {\r
194 this.string = null;\r
195 } else {\r
196 throw ble;\r
197 }\r
198 }\r
199 if (this.string != null) {\r
200 try {\r
201 var value = this.stringToValue (this.string);\r
202 var iterator = this.getFormat ().formatToCharacterIterator (value);\r
203 this.updateMask (iterator);\r
204 } catch (e$$) {\r
205 if (Clazz.exceptionOf (e$$, java.text.ParseException)) {\r
206 var pe = e$$;\r
207 {\r
208 }\r
209 } else if (Clazz.exceptionOf (e$$, IllegalArgumentException)) {\r
210 var iae = e$$;\r
211 {\r
212 }\r
213 } else if (Clazz.exceptionOf (e$$, NullPointerException)) {\r
214 var npe = e$$;\r
215 {\r
216 }\r
217 } else {\r
218 throw e$$;\r
219 }\r
220 }\r
221 }}}});\r
222 Clazz.defineMethod (c$, "getLiteralCountTo", \r
223 function (index) {\r
224 var lCount = 0;\r
225 for (var counter = 0; counter < index; counter++) {\r
226 if (this.isLiteral (counter)) {\r
227 lCount++;\r
228 }}\r
229 return lCount;\r
230 }, "~N");\r
231 Clazz.defineMethod (c$, "isLiteral", \r
232 function (index) {\r
233 if (this.isValidMask () && index < this.string.length) {\r
234 return this.literalMask.get (index);\r
235 }return false;\r
236 }, "~N");\r
237 Clazz.defineMethod (c$, "getLiteral", \r
238 function (index) {\r
239 if (this.isValidMask () && this.string != null && index < this.string.length) {\r
240 return this.string.charAt (index);\r
241 }return String.fromCharCode (0);\r
242 }, "~N");\r
243 Clazz.overrideMethod (c$, "isNavigatable", \r
244 function (offset) {\r
245 return !this.isLiteral (offset);\r
246 }, "~N");\r
247 Clazz.defineMethod (c$, "updateValue", \r
248 function (value) {\r
249 Clazz.superCall (this, javax.swing.text.InternationalFormatter, "updateValue", [value]);\r
250 this.updateMaskIfNecessary ();\r
251 }, "~O");\r
252 Clazz.defineMethod (c$, "replace", \r
253 function (fb, offset, length, text, attrs) {\r
254 if (this.ignoreDocumentMutate) {\r
255 fb.replace (offset, length, text, attrs);\r
256 return;\r
257 }Clazz.superCall (this, javax.swing.text.InternationalFormatter, "replace", [fb, offset, length, text, attrs]);\r
258 }, "javax.swing.text.DocumentFilter.FilterBypass,~N,~N,~S,javax.swing.text.AttributeSet");\r
259 Clazz.defineMethod (c$, "getNextNonliteralIndex", \r
260  function (index, direction) {\r
261 var max = this.getFormattedTextField ().getDocument ().getLength ();\r
262 while (index >= 0 && index < max) {\r
263 if (this.isLiteral (index)) {\r
264 index += direction;\r
265 } else {\r
266 return index;\r
267 }}\r
268 return (direction == -1) ? 0 : max;\r
269 }, "~N,~N");\r
270 Clazz.defineMethod (c$, "canReplace", \r
271 function (rh) {\r
272 if (!this.getAllowsInvalid ()) {\r
273 var text = rh.text;\r
274 var tl = (text != null) ? text.length : 0;\r
275 if (tl == 0 && rh.length == 1 && this.getFormattedTextField ().getSelectionStart () != rh.offset) {\r
276 rh.offset = this.getNextNonliteralIndex (rh.offset, -1);\r
277 }if (this.getOverwriteMode ()) {\r
278 var replace = null;\r
279 for (var counter = 0, textIndex = 0, max = Math.max (tl, rh.length); counter < max; counter++) {\r
280 if (this.isLiteral (rh.offset + counter)) {\r
281 if (replace != null) {\r
282 replace.append (this.getLiteral (rh.offset + counter));\r
283 }if (textIndex < tl && text.charAt (textIndex) == this.getLiteral (rh.offset + counter)) {\r
284 textIndex++;\r
285 } else if (textIndex == 0) {\r
286 rh.offset++;\r
287 rh.length--;\r
288 counter--;\r
289 max--;\r
290 } else if (replace == null) {\r
291 replace =  new StringBuffer (max);\r
292 replace.append (text.substring (0, textIndex));\r
293 replace.append (this.getLiteral (rh.offset + counter));\r
294 }} else if (textIndex < tl) {\r
295 if (replace != null) {\r
296 replace.append (text.charAt (textIndex));\r
297 }textIndex++;\r
298 } else {\r
299 if (replace == null) {\r
300 replace =  new StringBuffer (max);\r
301 if (textIndex > 0) {\r
302 replace.append (text.substring (0, textIndex));\r
303 }}if (replace != null) {\r
304 replace.append (' ');\r
305 }}}\r
306 if (replace != null) {\r
307 rh.text = replace.toString ();\r
308 }} else if (tl > 0) {\r
309 rh.offset = this.getNextNonliteralIndex (rh.offset, 1);\r
310 } else {\r
311 rh.offset = this.getNextNonliteralIndex (rh.offset, -1);\r
312 }(rh).endOffset = rh.offset;\r
313 (rh).endTextLength = (rh.text != null) ? rh.text.length : 0;\r
314 } else {\r
315 (rh).endOffset = rh.offset;\r
316 (rh).endTextLength = (rh.text != null) ? rh.text.length : 0;\r
317 }var can = Clazz.superCall (this, javax.swing.text.InternationalFormatter, "canReplace", [rh]);\r
318 if (can && !this.getAllowsInvalid ()) {\r
319 (rh).resetFromValue (this);\r
320 }return can;\r
321 }, "javax.swing.text.DefaultFormatter.ReplaceHolder");\r
322 Clazz.defineMethod (c$, "replace", \r
323 function (rh) {\r
324 var start = -1;\r
325 var direction = 1;\r
326 var literalCount = -1;\r
327 if (rh.length > 0 && (rh.text == null || rh.text.length == 0) && (this.getFormattedTextField ().getSelectionStart () != rh.offset || rh.length > 1)) {\r
328 direction = -1;\r
329 }if (!this.getAllowsInvalid ()) {\r
330 if ((rh.text == null || rh.text.length == 0) && rh.length > 0) {\r
331 start = this.getFormattedTextField ().getSelectionStart ();\r
332 } else {\r
333 start = rh.offset;\r
334 }literalCount = this.getLiteralCountTo (start);\r
335 }if (Clazz.superCall (this, javax.swing.text.InternationalFormatter, "replace", [rh])) {\r
336 if (start != -1) {\r
337 var end = (rh).endOffset;\r
338 end += (rh).endTextLength;\r
339 this.repositionCursor (literalCount, end, direction);\r
340 } else {\r
341 start = (rh).endOffset;\r
342 if (direction == 1) {\r
343 start += (rh).endTextLength;\r
344 }this.repositionCursor (start, direction);\r
345 }return true;\r
346 }return false;\r
347 }, "javax.swing.text.DefaultFormatter.ReplaceHolder");\r
348 Clazz.defineMethod (c$, "repositionCursor", \r
349  function (startLiteralCount, end, direction) {\r
350 var endLiteralCount = this.getLiteralCountTo (end);\r
351 if (endLiteralCount != end) {\r
352 end -= startLiteralCount;\r
353 for (var counter = 0; counter < end; counter++) {\r
354 if (this.isLiteral (counter)) {\r
355 end++;\r
356 }}\r
357 }this.repositionCursor (end, 1);\r
358 }, "~N,~N,~N");\r
359 Clazz.defineMethod (c$, "getBufferedChar", \r
360 function (index) {\r
361 if (this.isValidMask ()) {\r
362 if (this.string != null && index < this.string.length) {\r
363 return this.string.charAt (index);\r
364 }}return String.fromCharCode (0);\r
365 }, "~N");\r
366 Clazz.defineMethod (c$, "isValidMask", \r
367 function () {\r
368 return this.validMask;\r
369 });\r
370 Clazz.defineMethod (c$, "isLiteral", \r
371 function (attributes) {\r
372 return ((attributes == null) || attributes.size () == 0);\r
373 }, "java.util.Map");\r
374 Clazz.defineMethod (c$, "updateMask", \r
375  function (iterator) {\r
376 if (iterator != null) {\r
377 this.validMask = true;\r
378 this.iterator = iterator;\r
379 if (this.literalMask == null) {\r
380 this.literalMask =  new java.util.BitSet ();\r
381 } else {\r
382 for (var counter = this.literalMask.length () - 1; counter >= 0; counter--) {\r
383 this.literalMask.clear (counter);\r
384 }\r
385 }iterator.first ();\r
386 while (iterator.current () != '\uffff') {\r
387 var attributes = iterator.getAttributes ();\r
388 var set = this.isLiteral (attributes);\r
389 var start = iterator.getIndex ();\r
390 var end = iterator.getRunLimit ();\r
391 while (start < end) {\r
392 if (set) {\r
393 this.literalMask.set (start);\r
394 } else {\r
395 this.literalMask.clear (start);\r
396 }start++;\r
397 }\r
398 iterator.setIndex (start);\r
399 }\r
400 }}, "java.text.AttributedCharacterIterator");\r
401 Clazz.defineMethod (c$, "canIncrement", \r
402 function (field, cursorPosition) {\r
403 return (field != null);\r
404 }, "~O,~N");\r
405 Clazz.defineMethod (c$, "selectField", \r
406 function (f, count) {\r
407 var iterator = this.getIterator ();\r
408 if (iterator != null && (Clazz.instanceOf (f, java.text.AttributedCharacterIterator.Attribute))) {\r
409 var field = f;\r
410 iterator.first ();\r
411 while (iterator.current () != '\uffff') {\r
412 while (iterator.getAttribute (field) == null && iterator.next () != '\uffff') ;\r
413 if (iterator.current () != '\uffff') {\r
414 var limit = iterator.getRunLimit (field);\r
415 if (--count <= 0) {\r
416 this.getFormattedTextField ().select (iterator.getIndex (), limit);\r
417 break;\r
418 }iterator.setIndex (limit);\r
419 iterator.next ();\r
420 }}\r
421 }}, "~O,~N");\r
422 Clazz.defineMethod (c$, "getAdjustField", \r
423 function (start, attributes) {\r
424 return null;\r
425 }, "~N,java.util.Map");\r
426 Clazz.defineMethod (c$, "getFieldTypeCountTo", \r
427  function (f, start) {\r
428 var iterator = this.getIterator ();\r
429 var count = 0;\r
430 if (iterator != null && (Clazz.instanceOf (f, java.text.AttributedCharacterIterator.Attribute))) {\r
431 var field = f;\r
432 var index = 0;\r
433 iterator.first ();\r
434 while (iterator.getIndex () < start) {\r
435 while (iterator.getAttribute (field) == null && iterator.next () != '\uffff') ;\r
436 if (iterator.current () != '\uffff') {\r
437 iterator.setIndex (iterator.getRunLimit (field));\r
438 iterator.next ();\r
439 count++;\r
440 } else {\r
441 break;\r
442 }}\r
443 }return count;\r
444 }, "~O,~N");\r
445 Clazz.defineMethod (c$, "adjustValue", \r
446 function (value, attributes, field, direction) {\r
447 return null;\r
448 }, "~O,java.util.Map,~O,~N");\r
449 Clazz.defineMethod (c$, "getSupportsIncrement", \r
450 function () {\r
451 return false;\r
452 });\r
453 Clazz.defineMethod (c$, "resetValue", \r
454 function (value) {\r
455 var doc = this.getFormattedTextField ().getDocument ();\r
456 var string = this.valueToString (value);\r
457 try {\r
458 this.ignoreDocumentMutate = true;\r
459 doc.remove (0, doc.getLength ());\r
460 doc.insertString (0, string, null);\r
461 } finally {\r
462 this.ignoreDocumentMutate = false;\r
463 }\r
464 this.updateValue (value);\r
465 }, "~O");\r
466 Clazz.defineMethod (c$, "getReplaceHolder", \r
467 function (fb, offset, length, text, attrs) {\r
468 if (this.replaceHolder == null) {\r
469 this.replaceHolder =  new javax.swing.text.InternationalFormatter.ExtendedReplaceHolder ();\r
470 }return Clazz.superCall (this, javax.swing.text.InternationalFormatter, "getReplaceHolder", [fb, offset, length, text, attrs]);\r
471 }, "javax.swing.text.DocumentFilter.FilterBypass,~N,~N,~S,javax.swing.text.AttributeSet");\r
472 c$.$InternationalFormatter$IncrementAction$ = function () {\r
473 Clazz.pu$h(self.c$);\r
474 c$ = Clazz.decorateAsClass (function () {\r
475 Clazz.prepareCallback (this, arguments);\r
476 this.direction = 0;\r
477 Clazz.instantialize (this, arguments);\r
478 }, javax.swing.text.InternationalFormatter, "IncrementAction", javax.swing.AbstractAction);\r
479 Clazz.makeConstructor (c$, \r
480 function (a, b) {\r
481 Clazz.superConstructor (this, javax.swing.text.InternationalFormatter.IncrementAction, [a]);\r
482 this.direction = b;\r
483 }, "~S,~N");\r
484 Clazz.overrideMethod (c$, "actionPerformed", \r
485 function (a) {\r
486 if (this.b$["javax.swing.text.InternationalFormatter"].getFormattedTextField ().isEditable ()) {\r
487 if (this.b$["javax.swing.text.InternationalFormatter"].getAllowsInvalid ()) {\r
488 this.b$["javax.swing.text.InternationalFormatter"].updateMask ();\r
489 }var b = false;\r
490 if (this.b$["javax.swing.text.InternationalFormatter"].isValidMask ()) {\r
491 var c = this.b$["javax.swing.text.InternationalFormatter"].getFormattedTextField ().getSelectionStart ();\r
492 if (c != -1) {\r
493 var d = this.b$["javax.swing.text.InternationalFormatter"].getIterator ();\r
494 d.setIndex (c);\r
495 var e = d.getAttributes ();\r
496 var f = this.b$["javax.swing.text.InternationalFormatter"].getAdjustField (c, e);\r
497 if (this.b$["javax.swing.text.InternationalFormatter"].canIncrement (f, c)) {\r
498 try {\r
499 var g = this.b$["javax.swing.text.InternationalFormatter"].stringToValue (this.b$["javax.swing.text.InternationalFormatter"].getFormattedTextField ().getText ());\r
500 var h = this.b$["javax.swing.text.InternationalFormatter"].getFieldTypeCountTo (f, c);\r
501 g = this.b$["javax.swing.text.InternationalFormatter"].adjustValue (g, e, f, this.direction);\r
502 if (g != null && this.b$["javax.swing.text.InternationalFormatter"].isValidValue (g, false)) {\r
503 this.b$["javax.swing.text.InternationalFormatter"].resetValue (g);\r
504 this.b$["javax.swing.text.InternationalFormatter"].updateMask ();\r
505 if (this.b$["javax.swing.text.InternationalFormatter"].isValidMask ()) {\r
506 this.b$["javax.swing.text.InternationalFormatter"].selectField (f, h);\r
507 }b = true;\r
508 }} catch (e$$) {\r
509 if (Clazz.exceptionOf (e$$, java.text.ParseException)) {\r
510 var pe = e$$;\r
511 {\r
512 }\r
513 } else if (Clazz.exceptionOf (e$$, javax.swing.text.BadLocationException)) {\r
514 var ble = e$$;\r
515 {\r
516 }\r
517 } else {\r
518 throw e$$;\r
519 }\r
520 }\r
521 }}}if (!b) {\r
522 this.b$["javax.swing.text.InternationalFormatter"].invalidEdit ();\r
523 }}}, "java.awt.event.ActionEvent");\r
524 c$ = Clazz.p0p ();\r
525 };\r
526 Clazz.pu$h(self.c$);\r
527 c$ = Clazz.decorateAsClass (function () {\r
528 this.endOffset = 0;\r
529 this.endTextLength = 0;\r
530 Clazz.instantialize (this, arguments);\r
531 }, javax.swing.text.InternationalFormatter, "ExtendedReplaceHolder", javax.swing.text.DefaultFormatter.ReplaceHolder);\r
532 Clazz.defineMethod (c$, "resetFromValue", \r
533 function (a) {\r
534 this.offset = 0;\r
535 try {\r
536 this.text = a.valueToString (this.value);\r
537 } catch (pe) {\r
538 if (Clazz.exceptionOf (pe, java.text.ParseException)) {\r
539 this.text = "";\r
540 } else {\r
541 throw pe;\r
542 }\r
543 }\r
544 this.length = this.fb.getDocument ().getLength ();\r
545 }, "javax.swing.text.InternationalFormatter");\r
546 c$ = Clazz.p0p ();\r
547 c$.EMPTY_FIELD_ARRAY = c$.prototype.EMPTY_FIELD_ARRAY =  new Array (0);\r
548 });\r