1 package swingjs.api.js;
3 import java.awt.Component;
5 import java.util.Hashtable;
9 * An interface to J2S.xxx() functions.
15 public interface J2SInterface {
17 void addBinaryFileType(String ext);
19 void addDirectDatabaseCall(String domain);
25 HTML5Applet findApplet(String htmlName);
27 Object getCachedJavaFile(String key);
31 * @param isAll true for check of navigator; otherwise just J2S._lang from j2sLang=xx_XX in URI
34 String getDefaultLanguage(boolean isAll);
36 Object getFileData(String fileName, Object fWhenDone, boolean doProcess, boolean isBinary);
38 void getFileFromDialog(Object fWhenDone, String type);
40 Object getJavaResource(String resourceName, boolean isJavaPath);
42 String getJavaVersion();
44 int getKeyModifiers(Object jQueryEvent);
46 Point getMousePosition(Point p);
48 String getResourcePath(String resourceName, boolean isJavaPath);
50 Hashtable<String, Object> getSetJavaFileCache(Object object);
52 Object getSwing(); // JSSwingMenu
54 int getZ(HTML5Applet applet, String frameType);
56 boolean isBinaryUrl(String filename);
58 boolean isResourceLoaded(String file, boolean done);
60 void readyCallback(String appId, String fullId, boolean isReady,
61 Object javaApplet, Object javaAppletPanel);
63 void saveFile(String fileName, Object data, String mimeType, String encoding);
65 void setDragDropTarget(Component target, DOMNode node, boolean adding);
67 void setDraggable(DOMNode tagNode, Object targetNodeOrFDown);
69 void setKeyListener(DOMNode node);
71 void setMouse(DOMNode frameNode, boolean isSwingJS);
73 int setWindowZIndex(DOMNode domNode, int pos);
75 void unsetMouse(DOMNode frameNode);
77 String fixCachePath(String uri);
79 void showStatus(String msg, boolean doFadeOut);