Skip to content

Commit 78c4caf

Browse files
committed
Url, zip, nonqualified name directories
1 parent 232dffc commit 78c4caf

34 files changed

+6905
-272
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package javajs.api;
2+
3+
/**
4+
* called by JSmol JavaScript methods using
5+
*
6+
* this._applet.xxxx()
7+
*
8+
*/
9+
public interface JSInterface {
10+
11+
int cacheFileByName(String fileName, boolean isAdd);
12+
void cachePut(String key, Object data);
13+
void destroy();
14+
String getFullName();
15+
void openFileAsyncSpecial(String fileName, int flags);
16+
boolean processMouseEvent(int id, int x, int y, int modifiers, long time);
17+
void processTwoPointGesture(float[][][] touches);
18+
void setDisplay(Object canvas);
19+
void setScreenDimension(int width, int height);
20+
boolean setStatusDragDropped(int mode, int x, int y, String fileName);
21+
void startHoverWatcher(boolean enable);
22+
23+
// these are not general methods
24+
//Object getGLmolView();
25+
//String loadInlineString(String mol, String script, boolean isAppend);
26+
//String openFile(String fileName);
27+
28+
}
29+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package javajs.api;
2+
3+
/**
4+
* methods in JSmol JavaScript accessed in Jmol (aka J2S)
5+
*/
6+
public interface JmolObjectInterface {
7+
8+
Object _doAjax(Object url, String postOut, Object bytesOrStringOut, boolean isBinary);
9+
10+
void _apply(Object func, Object data);
11+
12+
}

sources/net.sf.j2s.java.core/.j2s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#Java2Script Configuration
22
#Sat Aug 05 16:17:42 EDT 2017
33
j2s.compiler.abbreviation=false
4-
j2s.output.path=bin
4+
j2s.output.path=binjs
55
j2s.compiler.status=enable
66
j2s.compiler.mode=debug
77

sources/net.sf.j2s.java.core/src/java/io/BufferedInputStream.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,13 @@ public synchronized long skip(long amount) throws IOException {
374374
}
375375
return read + in.skip(amount - read);
376376
}
377+
378+
/**
379+
* BH: Addeed to allow full reset of a bundled stream
380+
*/
381+
@Override
382+
public void resetStream() {
383+
markpos = pos = count = 0;
384+
in.resetStream();
385+
}
377386
}

sources/net.sf.j2s.java.core/src/java/io/ByteArrayInputStream.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,14 @@ public synchronized long skip(long n) {
212212
pos = this.count - pos < n ? this.count : (int) (pos + n);
213213
return pos - temp;
214214
}
215+
216+
/**
217+
* BH: Allows resetting of the stream when a new InputStreamReader is invoked
218+
*/
219+
@Override
220+
public void resetStream() {
221+
mark = pos = 0;
222+
}
223+
224+
215225
}

0 commit comments

Comments
 (0)