Jmol
Date: 2019-10-22

org.jmol.appletjs

## Class Jmol

- java.lang.Object
- - org.jmol.util.GenericApplet
  - - org.jmol.appletjs.Jmol

- All Implemented Interfaces:
    javajs.api.JSInterface, JmolAppletInterface, JmolCallbackListener, JmolStatusListener, JmolSyncInterface

      public class Jmol
      extends GenericApplet
      implements javajs.api.JSInterface

  Java2Script rendition of Jmol using HTML5-only or WebGL-based graphics
  Author:
    Bob Hanson hansonr@stolaf.edu, Takanori Nakane, with the assistance of Jhou Renjian

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.Map<java.lang.String,java.lang.Object>` | `htParams`

    - ### Fields inherited from class org.jmol.util.GenericApplet

      `appletObject, callbacks, codeBase, documentBase, doTranslate, fullName, gRight, haveDocumentAccess, haveNotifiedError, htmlName, htRegistry, isJNLP, isJS, isSigned, isStereoSlave, language, mayScript, statusForm, statusText, statusTextarea, viewer, vwrOptions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Jmol(java.util.Map<java.lang.String,java.lang.Object> vwrOptions)` cannot ignore super because it involves preparing fields

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `cacheFileByName(java.lang.String fileName, boolean isAdd)`
    `void` | `cachePut(java.lang.String key, java.lang.Object data)`
    `protected java.lang.String` | `doEval(java.lang.String strEval)` return RAW JAVASCRIPT OBJECT, NOT A STRING
    `protected float[][]` | `doFunctionXY(java.lang.String functionName, int nX, int nY)`
    `protected float[][][]` | `doFunctionXYZ(java.lang.String functionName, int nX, int nY, int nZ)`
    `protected java.lang.String` | `doSendCallback(java.lang.String callback, java.lang.Object[] data, java.lang.String strInfo)`
    `protected void` | `doSendJsTextareaStatus(java.lang.String message)`
    `protected void` | `doSendJsTextStatus(java.lang.String message)`
    `protected void` | `doShowDocument(java.net.URL url)`
    `protected void` | `doShowStatus(java.lang.String message)`
    `java.lang.String` | `getFullName()`
    `java.lang.Object` | `getGLmolView()` This method is only called by JmolGLmol applet._refresh();
    `protected java.lang.String` | `getJmolParameter(java.lang.String paramName)`
    `protected void` | `initOptions()`
    `java.lang.String` | `openFile(java.lang.String fileName)` possibly called from JSmolApplet.js upon start up
    `void` | `openFileAsyncSpecial(java.lang.String fileName, int flags)`
    `boolean` | `processMouseEvent(int id, int x, int y, int modifiers, long time)`
    `void` | `processTwoPointGesture(float[][][] touches)`
    `(package private) void` | `resizeDisplay(int width, int height)`
    `int[]` | `resizeInnerPanel(java.lang.String data)`
    `void` | `setDisplay(java.lang.Object canvas)`
    `void` | `setScreenDimension(int width, int height)`
    `boolean` | `setStatusDragDropped(int mode, int x, int y, java.lang.String fileName)`
    `java.lang.Object` | `setStereoGraphics(boolean isStereo)`
    `void` | `startHoverWatcher(boolean enable)`
    `void` | `update()`

    - ### Methods inherited from class org.jmol.util.GenericApplet

      `createImage, destroy, eval, functionXY, functionXYZ, getAppletInfo, getBooleanValue, getJSpecViewProperty, getModelIndexFromId, getProperty, getProperty, getPropertyAsJSON, getPropertyAsJSON, getPropertyAsString, getPropertyAsString, getRegistryInfo, getValue, handleEvent, init, loadDOMNode, loadInline, loadInline, loadInline, loadInline, loadInlineArray, loadInlineString, notifyAudioEnded, notifyCallback, notifyEnabled, output, register, script, scriptCheck, scriptNoWait, scriptWait, scriptWait, scriptWaitOutput, setCallbackFunction, showUrl, syncScript`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javajs.api.JSInterface

      `destroy`

- - ### Field Detail

    - #### htParams

          private java.util.Map<java.lang.String,java.lang.Object> htParams

  - ### Constructor Detail

    - #### Jmol

          public Jmol(java.util.Map<java.lang.String,java.lang.Object> vwrOptions)

      cannot ignore super because it involves preparing fields
      Parameters:
        `vwrOptions` -

  - ### Method Detail

    - #### setStereoGraphics

          public java.lang.Object setStereoGraphics(boolean isStereo)

      Specified by:
        `setStereoGraphics` in interface `JmolAppletInterface`

    - #### initOptions

          protected void initOptions()

      Specified by:
        `initOptions` in class `GenericApplet`

    - #### getJmolParameter

          protected java.lang.String getJmolParameter(java.lang.String paramName)

      Specified by:
        `getJmolParameter` in class `GenericApplet`

    - #### doSendJsTextStatus

          protected void doSendJsTextStatus(java.lang.String message)

      Specified by:
        `doSendJsTextStatus` in class `GenericApplet`

    - #### doSendJsTextareaStatus

          protected void doSendJsTextareaStatus(java.lang.String message)

      Specified by:
        `doSendJsTextareaStatus` in class `GenericApplet`

    - #### doFunctionXY

          protected float[][] doFunctionXY(java.lang.String functionName,
                                           int nX,
                                           int nY)

      Specified by:
        `doFunctionXY` in class `GenericApplet`

    - #### doFunctionXYZ

          protected float[][][] doFunctionXYZ(java.lang.String functionName,
                                              int nX,
                                              int nY,
                                              int nZ)

      Specified by:
        `doFunctionXYZ` in class `GenericApplet`

    - #### doShowDocument

          protected void doShowDocument(java.net.URL url)

      Specified by:
        `doShowDocument` in class `GenericApplet`

    - #### doSendCallback

          protected java.lang.String doSendCallback(java.lang.String callback,
                                                    java.lang.Object[] data,
                                                    java.lang.String strInfo)

      Specified by:
        `doSendCallback` in class `GenericApplet`

    - #### doEval

          protected java.lang.String doEval(java.lang.String strEval)

      return RAW JAVASCRIPT OBJECT, NOT A STRING
      Specified by:
        `doEval` in class `GenericApplet`

    - #### doShowStatus

          protected void doShowStatus(java.lang.String message)

      Specified by:
        `doShowStatus` in class `GenericApplet`

    - #### getGLmolView

          public java.lang.Object getGLmolView()

      This method is only called by JmolGLmol applet._refresh();
      Returns:
        enough data to update a WebGL view

    - #### openFile

          public java.lang.String openFile(java.lang.String fileName)

      possibly called from JSmolApplet.js upon start up
      Parameters:
        `fileName` -
      Returns:
        error or null

    - #### cacheFileByName

          public int cacheFileByName(java.lang.String fileName,
                                     boolean isAdd)

      Specified by:
        `cacheFileByName` in interface `javajs.api.JSInterface`

    - #### cachePut

          public void cachePut(java.lang.String key,
                               java.lang.Object data)

      Specified by:
        `cachePut` in interface `javajs.api.JSInterface`

    - #### getFullName

          public java.lang.String getFullName()

      Specified by:
        `getFullName` in interface `javajs.api.JSInterface`

    - #### processMouseEvent

          public boolean processMouseEvent(int id,
                                           int x,
                                           int y,
                                           int modifiers,
                                           long time)

      Specified by:
        `processMouseEvent` in interface `javajs.api.JSInterface`

    - #### setDisplay

          public void setDisplay(java.lang.Object canvas)

      Specified by:
        `setDisplay` in interface `javajs.api.JSInterface`

    - #### setStatusDragDropped

          public boolean setStatusDragDropped(int mode,
                                              int x,
                                              int y,
                                              java.lang.String fileName)

      Specified by:
        `setStatusDragDropped` in interface `javajs.api.JSInterface`

    - #### startHoverWatcher

          public void startHoverWatcher(boolean enable)

      Specified by:
        `startHoverWatcher` in interface `javajs.api.JSInterface`

    - #### update

          public void update()

      Specified by:
        `update` in interface `javajs.api.JSInterface`

    - #### openFileAsyncSpecial

          public void openFileAsyncSpecial(java.lang.String fileName,
                                           int flags)

      Specified by:
        `openFileAsyncSpecial` in interface `javajs.api.JSInterface`

    - #### processTwoPointGesture

          public void processTwoPointGesture(float[][][] touches)

      Specified by:
        `processTwoPointGesture` in interface `javajs.api.JSInterface`

    - #### setScreenDimension

          public void setScreenDimension(int width,
                                         int height)

      Specified by:
        `setScreenDimension` in interface `javajs.api.JSInterface`

    - #### resizeInnerPanel

          public int[] resizeInnerPanel(java.lang.String data)

      Specified by:
        `resizeInnerPanel` in interface `JmolStatusListener`
      Overrides:
        `resizeInnerPanel` in class `GenericApplet`

    - #### resizeDisplay

          void resizeDisplay(int width,
                             int height)