X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Ftext%2FFormat.js;h=c21042e5b2bd736d794036985880da7deafd704a;hp=90e82396b013b54cc50e54343d81c06907921cc7;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/text/Format.js b/site/j2s/java/text/Format.js index 90e8239..c21042e 100644 --- a/site/j2s/java/text/Format.js +++ b/site/j2s/java/text/Format.js @@ -1,61 +1,61 @@ -Clazz.declarePackage ("java.text"); -Clazz.load (["java.text.AttributedCharacterIterator"], "java.text.Format", ["java.lang.StringBuffer", "java.text.AttributedString", "$.FieldPosition", "$.ParseException", "$.ParsePosition"], function () { -c$ = Clazz.declareType (java.text, "Format", null, [java.io.Serializable, Cloneable]); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "format", -function (obj) { -return this.format (obj, new StringBuffer (), new java.text.FieldPosition (0)).toString (); -}, "~O"); -Clazz.defineMethod (c$, "formatToCharacterIterator", -function (obj) { -return this.createAttributedCharacterIterator (this.format (obj)); -}, "~O"); -Clazz.defineMethod (c$, "parseObject", -function (source) { -var pos = new java.text.ParsePosition (0); -var result = this.parseObject (source, pos); -if (pos.index == 0) { -throw new java.text.ParseException ("Format.parseObject(String) failed", pos.errorIndex); -}return result; -}, "~S"); -Clazz.defineMethod (c$, "clone", -function () { -try { -return Clazz.superCall (this, java.text.Format, "clone", []); -} catch (e) { -if (Clazz.exceptionOf (e, CloneNotSupportedException)) { -return null; -} else { -throw e; -} -} -}); -Clazz.defineMethod (c$, "createAttributedCharacterIterator", -function (s) { -var as = new java.text.AttributedString (s); -return as.getIterator (); -}, "~S"); -Clazz.defineMethod (c$, "createAttributedCharacterIterator", -function (iterators) { -var as = new java.text.AttributedString (iterators); -return as.getIterator (); -}, "~A"); -Clazz.defineMethod (c$, "createAttributedCharacterIterator", -function (string, key, value) { -var as = new java.text.AttributedString (string); -as.addAttribute (key, value); -return as.getIterator (); -}, "~S,java.text.AttributedCharacterIterator.Attribute,~O"); -Clazz.defineMethod (c$, "createAttributedCharacterIterator", -function (iterator, key, value) { -var as = new java.text.AttributedString (iterator); -as.addAttribute (key, value); -return as.getIterator (); -}, "java.text.AttributedCharacterIterator,java.text.AttributedCharacterIterator.Attribute,~O"); -Clazz.pu$h(self.c$); -c$ = Clazz.declareType (java.text.Format, "Field", java.text.AttributedCharacterIterator.Attribute); -c$ = Clazz.p0p (); -Clazz.declareInterface (java.text.Format, "FieldDelegate"); -}); +Clazz.declarePackage ("java.text"); +Clazz.load (["java.text.AttributedCharacterIterator"], "java.text.Format", ["java.lang.StringBuffer", "java.text.AttributedString", "$.FieldPosition", "$.ParseException", "$.ParsePosition"], function () { +c$ = Clazz.declareType (java.text, "Format", null, [java.io.Serializable, Cloneable]); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "format", +function (obj) { +return this.format (obj, new StringBuffer (), new java.text.FieldPosition (0)).toString (); +}, "~O"); +Clazz.defineMethod (c$, "formatToCharacterIterator", +function (obj) { +return this.createAttributedCharacterIterator (this.format (obj)); +}, "~O"); +Clazz.defineMethod (c$, "parseObject", +function (source) { +var pos = new java.text.ParsePosition (0); +var result = this.parseObject (source, pos); +if (pos.index == 0) { +throw new java.text.ParseException ("Format.parseObject(String) failed", pos.errorIndex); +}return result; +}, "~S"); +Clazz.defineMethod (c$, "clone", +function () { +try { +return Clazz.superCall (this, java.text.Format, "clone", []); +} catch (e) { +if (Clazz.exceptionOf (e, CloneNotSupportedException)) { +return null; +} else { +throw e; +} +} +}); +Clazz.defineMethod (c$, "createAttributedCharacterIterator", +function (s) { +var as = new java.text.AttributedString (s); +return as.getIterator (); +}, "~S"); +Clazz.defineMethod (c$, "createAttributedCharacterIterator", +function (iterators) { +var as = new java.text.AttributedString (iterators); +return as.getIterator (); +}, "~A"); +Clazz.defineMethod (c$, "createAttributedCharacterIterator", +function (string, key, value) { +var as = new java.text.AttributedString (string); +as.addAttribute (key, value); +return as.getIterator (); +}, "~S,java.text.AttributedCharacterIterator.Attribute,~O"); +Clazz.defineMethod (c$, "createAttributedCharacterIterator", +function (iterator, key, value) { +var as = new java.text.AttributedString (iterator); +as.addAttribute (key, value); +return as.getIterator (); +}, "java.text.AttributedCharacterIterator,java.text.AttributedCharacterIterator.Attribute,~O"); +Clazz.pu$h(self.c$); +c$ = Clazz.declareType (java.text.Format, "Field", java.text.AttributedCharacterIterator.Attribute); +c$ = Clazz.p0p (); +Clazz.declareInterface (java.text.Format, "FieldDelegate"); +});