static
{
- Platform.loadStaticResource("core/core_jvjmol.z.js",
- "org.jmol.viewer.Viewer");
+ Platform.ensureJmol();
}
private static final String UNKNOWN_VIEWER_TYPE = "Unknown structure viewer type ";
public enum ViewerType
{
JMOL, CHIMERA
- };
+ }
/**
* Constructor
import jalview.javascript.json.JSON;
-import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.MouseEvent;
public static void streamToFile(InputStream is, File outFile)
throws IOException
{
+ if (isJS() && /**
+ * JSTempFile direct transfer
+ *
+ * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) &&
+ */
+ true)
+ {
+ return;
+ }
FileOutputStream fio = new FileOutputStream(outFile);
try
{
- if (isJS()
- && /**
- * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) &&
- */
- true)
- {
- return;
- }
byte[] bb = new byte[32 * 1024];
int l;
while ((l = is.read(bb)) > 0)
*/
}
+ public static void ensureJmol()
+ {
+ loadStaticResource("core/core_jvjmol.z.js", "org.jmol.viewer.Viewer");
+ }
+
public static void ensureRegex()
{
loadStaticResource("core/core_stevesoft.z.js",
}
+
}