Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / ProgressMonitorInputStream.js
index 64ec5bc..e5857ce 100644 (file)
@@ -1,74 +1,74 @@
-Clazz.declarePackage ("javax.swing");\r
-Clazz.load (["java.io.FilterInputStream"], "javax.swing.ProgressMonitorInputStream", ["java.io.InterruptedIOException", "javax.swing.ProgressMonitor"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.monitor = null;\r
-this.nread = 0;\r
-this.size = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing, "ProgressMonitorInputStream", java.io.FilterInputStream);\r
-Clazz.makeConstructor (c$, \r
-function (parentComponent, message, $in) {\r
-Clazz.superConstructor (this, javax.swing.ProgressMonitorInputStream, [$in]);\r
-try {\r
-this.size = $in.available ();\r
-} catch (ioe) {\r
-if (Clazz.exceptionOf (ioe, java.io.IOException)) {\r
-this.size = 0;\r
-} else {\r
-throw ioe;\r
-}\r
-}\r
-this.monitor =  new javax.swing.ProgressMonitor (parentComponent, message, null, 0, this.size);\r
-}, "java.awt.Component,~O,java.io.InputStream");\r
-Clazz.defineMethod (c$, "getProgressMonitor", \r
-function () {\r
-return this.monitor;\r
-});\r
-Clazz.defineMethod (c$, "read", \r
-function () {\r
-var c = this.$in.read ();\r
-if (c >= 0) this.monitor.setProgress (++this.nread);\r
-if (this.monitor.isCanceled ()) {\r
-var exc =  new java.io.InterruptedIOException ("progress");\r
-exc.bytesTransferred = this.nread;\r
-throw exc;\r
-}return c;\r
-});\r
-Clazz.defineMethod (c$, "read", \r
-function (b) {\r
-var nr = this.$in.read (b);\r
-if (nr > 0) this.monitor.setProgress (this.nread += nr);\r
-if (this.monitor.isCanceled ()) {\r
-var exc =  new java.io.InterruptedIOException ("progress");\r
-exc.bytesTransferred = this.nread;\r
-throw exc;\r
-}return nr;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "read", \r
-function (b, off, len) {\r
-var nr = this.$in.read (b, off, len);\r
-if (nr > 0) this.monitor.setProgress (this.nread += nr);\r
-if (this.monitor.isCanceled ()) {\r
-var exc =  new java.io.InterruptedIOException ("progress");\r
-exc.bytesTransferred = this.nread;\r
-throw exc;\r
-}return nr;\r
-}, "~A,~N,~N");\r
-Clazz.overrideMethod (c$, "skip", \r
-function (n) {\r
-var nr = this.$in.skip (n);\r
-if (nr > 0) this.monitor.setProgress (this.nread += nr);\r
-return nr;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "close", \r
-function () {\r
-this.$in.close ();\r
-this.monitor.close ();\r
-});\r
-Clazz.overrideMethod (c$, "reset", \r
-function () {\r
-this.$in.reset ();\r
-this.nread = this.size - this.$in.available ();\r
-this.monitor.setProgress (this.nread);\r
-});\r
-});\r
+Clazz.declarePackage ("javax.swing");
+Clazz.load (["java.io.FilterInputStream"], "javax.swing.ProgressMonitorInputStream", ["java.io.InterruptedIOException", "javax.swing.ProgressMonitor"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.monitor = null;
+this.nread = 0;
+this.size = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing, "ProgressMonitorInputStream", java.io.FilterInputStream);
+Clazz.makeConstructor (c$, 
+function (parentComponent, message, $in) {
+Clazz.superConstructor (this, javax.swing.ProgressMonitorInputStream, [$in]);
+try {
+this.size = $in.available ();
+} catch (ioe) {
+if (Clazz.exceptionOf (ioe, java.io.IOException)) {
+this.size = 0;
+} else {
+throw ioe;
+}
+}
+this.monitor =  new javax.swing.ProgressMonitor (parentComponent, message, null, 0, this.size);
+}, "java.awt.Component,~O,java.io.InputStream");
+Clazz.defineMethod (c$, "getProgressMonitor", 
+function () {
+return this.monitor;
+});
+Clazz.defineMethod (c$, "read", 
+function () {
+var c = this.$in.read ();
+if (c >= 0) this.monitor.setProgress (++this.nread);
+if (this.monitor.isCanceled ()) {
+var exc =  new java.io.InterruptedIOException ("progress");
+exc.bytesTransferred = this.nread;
+throw exc;
+}return c;
+});
+Clazz.defineMethod (c$, "read", 
+function (b) {
+var nr = this.$in.read (b);
+if (nr > 0) this.monitor.setProgress (this.nread += nr);
+if (this.monitor.isCanceled ()) {
+var exc =  new java.io.InterruptedIOException ("progress");
+exc.bytesTransferred = this.nread;
+throw exc;
+}return nr;
+}, "~A");
+Clazz.defineMethod (c$, "read", 
+function (b, off, len) {
+var nr = this.$in.read (b, off, len);
+if (nr > 0) this.monitor.setProgress (this.nread += nr);
+if (this.monitor.isCanceled ()) {
+var exc =  new java.io.InterruptedIOException ("progress");
+exc.bytesTransferred = this.nread;
+throw exc;
+}return nr;
+}, "~A,~N,~N");
+Clazz.overrideMethod (c$, "skip", 
+function (n) {
+var nr = this.$in.skip (n);
+if (nr > 0) this.monitor.setProgress (this.nread += nr);
+return nr;
+}, "~N");
+Clazz.overrideMethod (c$, "close", 
+function () {
+this.$in.close ();
+this.monitor.close ();
+});
+Clazz.overrideMethod (c$, "reset", 
+function () {
+this.$in.reset ();
+this.nread = this.size - this.$in.available ();
+this.monitor.setProgress (this.nread);
+});
+});