Class ScriptEval

All Implemented Interfaces:
JmolScriptEvaluator

public class ScriptEval extends ScriptExpr
  • Field Details

    • saveList

      private static final String saveList
      See Also:
    • iProcess

      private static int iProcess
    • sm

      public ShapeManager sm
    • isJS

      public boolean isJS
    • scriptDelayThread

      private JmolThread scriptDelayThread
    • fileLoadThread

      private JmolThread fileLoadThread
    • allowJSThreads

      private boolean allowJSThreads
    • isFuncReturn

      private boolean isFuncReturn
    • historyDisabled

      public boolean historyDisabled
    • debugScript

      private boolean debugScript
    • isCmdLine_C_Option

      private boolean isCmdLine_C_Option
    • isCmdLine_c_or_C_Option

      private boolean isCmdLine_c_or_C_Option
    • listCommands

      private boolean listCommands
    • tQuiet

      public boolean tQuiet
    • executionStopped

      private boolean executionStopped
    • executionPaused

      private boolean executionPaused
    • executionStepping

      private boolean executionStepping
    • executing

      private boolean executing
    • isEditor

      private boolean isEditor
    • timeBeginExecution

      private long timeBeginExecution
    • timeEndExecution

      private long timeEndExecution
    • mustResumeEval

      private boolean mustResumeEval
    • currentThread

      private Thread currentThread
    • compiler

      public ScriptCompiler compiler
    • outputBuffer

      public javajs.util.SB outputBuffer
    • contextPath

      private String contextPath
    • scriptFileName

      public String scriptFileName
    • functionName

      public String functionName
    • isStateScript

      public boolean isStateScript
    • scriptLevel

      public int scriptLevel
    • CONTEXT_HOLD_QUEUE

      public static final String CONTEXT_HOLD_QUEUE
      See Also:
    • CONTEXT_DELAY

      public static final String CONTEXT_DELAY
      See Also:
    • DELAY_INTERRUPT_MS

      private static final long DELAY_INTERRUPT_MS
      See Also:
    • EXEC_ASYNC

      private static final int EXEC_ASYNC
      See Also:
    • EXEC_ERR

      private static final int EXEC_ERR
      See Also:
    • EXEC_OK

      private static final int EXEC_OK
      See Also:
    • commandHistoryLevelMax

      public static int commandHistoryLevelMax
    • contextDepthMax

      private static int contextDepthMax
    • scriptReportingLevel

      private static int scriptReportingLevel
    • aatoken

      public T[][] aatoken
    • lineNumbers

      private short[] lineNumbers
    • lineIndices

      private int[][] lineIndices
    • script

      private String script
    • scriptExtensions

      private String scriptExtensions
    • pc

      public int pc
    • thisCommand

      public String thisCommand
    • fullCommand

      public String fullCommand
    • lineEnd

      private int lineEnd
    • pcEnd

      private int pcEnd
    • forceNoAddHydrogens

      private boolean forceNoAddHydrogens
    • isEmbedded

      private boolean isEmbedded
    • isGUI

      private boolean isGUI
    • parallelProcessor

      private JmolParallelProcessor parallelProcessor
    • pcResume

      public int pcResume
  • Constructor Details

    • ScriptEval

      public ScriptEval()
  • Method Details

    • getAllowJSThreads

      public boolean getAllowJSThreads()
    • setAllowJSThreads

      public void setAllowJSThreads(boolean b)
    • doReport

      public boolean doReport()
    • isStateScript

      public boolean isStateScript()
    • setStatic

      public int setStatic(int tok, int ival)
      set a static variable, with checking for range
    • getScript

      public String getScript()
    • setViewer

      public ScriptEval setViewer(Viewer vwr)
    • setCompiler

      public void setCompiler()
    • compileScriptString

      public boolean compileScriptString(String script, boolean tQuiet)
    • compileScriptFile

      public boolean compileScriptFile(String filename, boolean tQuiet)
    • evaluateCompiledScript

      public void evaluateCompiledScript(boolean isCmdLine_c_or_C_Option, boolean isCmdLine_C_Option, boolean historyDisabled, boolean listCommands, javajs.util.SB outputBuffer, boolean allowThreads)
    • useThreads

      public boolean useThreads()
    • executeCommands

      private int executeCommands(boolean isTry, boolean reportCompletion)
    • resumeEval

      public void resumeEval(Object sco)
      From dispatchCommands and JmolThread resumeEval. After throwing a ScriptInterruption, all statements following the current one are lost. When a JavaScript timeout returns from a DELAY, MOVE, MOVETO, or other sleep-requiring command, it is the ScriptContext that contains all have to worry about this, because the current thread is just put to sleep, not stopped, but in JavaScript, where we only have one thread, we need to manage this more carefully. We re-enter the halted script here, using a saved script context. The program counter is incremented to skip the initiating statement, and all parent contexts up the line are set with mustResumeEval = true.
      Parameters:
      sco -
    • resumeViewer

      private void resumeViewer(String why)
    • runScript

      public void runScript(String script) throws ScriptException
      Throws:
      ScriptException
    • runScriptBuffer

      public void runScriptBuffer(String script, javajs.util.SB outputBuffer, boolean isFuncReturn) throws ScriptException
      runs a script immediately and sends selected output to a provided SB
      Parameters:
      outputBuffer -
      script -
      Throws:
      ScriptException
    • checkScriptSilent

      public ScriptContext checkScriptSilent(String script)
      a method for just checking a script
      Parameters:
      script -
      Returns:
      a ScriptContext that indicates errors and provides a tokenized version of the script that has passed all syntax checking, both in the compiler and the evaluator
    • getContextTrace

      static javajs.util.SB getContextTrace(Viewer vwr, ScriptContext sc, javajs.util.SB sb, boolean isTop)
    • setDebugging

      public void setDebugging()
    • haltExecution

      public void haltExecution()
    • pauseExecution

      public void pauseExecution(boolean withDelay)
    • stepPausedExecution

      public void stepPausedExecution()
    • resumePausedExecution

      public void resumePausedExecution()
    • isExecuting

      public boolean isExecuting()
    • isPaused

      public boolean isPaused()
    • isStepping

      public boolean isStepping()
    • isStopped

      public boolean isStopped()
    • getNextStatement

      public String getNextStatement()
      when paused, indicates what statement will be next
      Returns:
      a string indicating the statement
    • getCommand

      private String getCommand(int pc, boolean allThisLine, boolean addSemi)
      used for recall of commands in the application console
      Parameters:
      pc -
      allThisLine -
      addSemi -
      Returns:
      a string representation of the command
    • logDebugScript

      private void logDebugScript(T[] st, int ifLevel)
    • evaluateExpression

      public Object evaluateExpression(Object expr, boolean asVariable, boolean compileOnly)
      a general-use method to evaluate a "SET" type expression.
      Parameters:
      asVariable -
      expr -
      Returns:
      an object of one of the following types: Boolean, Integer, Float, String, Point3f, BitSet
    • runBufferedSafely

      public void runBufferedSafely(String script, javajs.util.SB outputBuffer)
    • runUserAction

      public static SV runUserAction(String functionName, Object[] params, Viewer vwr)
    • evaluate

      private Object evaluate(Object expr, boolean asVariable, boolean compileOnly)
    • checkSelect

      public boolean checkSelect(Map<String,SV> h, T[] where)
      Check a map for a WHERE phrase
    • getAtomBitSet

      public javajs.util.BS getAtomBitSet(Object atomExpression)
      A general method to evaluate a string representing an atom set. Excepts one atom expression or one per line as "OR". Excepts "()" as "none".
      Parameters:
      atomExpression -
      Returns:
      is a bitset indicating the selected atoms
    • compileScript

      public boolean compileScript(String filename, String strScript, boolean debugCompiler)
    • fixScriptPath

      private String fixScriptPath(String strScript, String filename)
    • setScriptExtensions

      private int setScriptExtensions()
    • getScriptFileInternal

      private String getScriptFileInternal(String filename, String localPath, String remotePath, String scriptPath)
      Retrieve the uncompiled script or null if failed
      Parameters:
      filename -
      localPath -
      remotePath -
      scriptPath -
      Returns:
      Jmol script or null
    • evalFunctionFloat

      public float evalFunctionFloat(Object func, Object params, float[] values)
    • getUserFunctionResult

      public SV getUserFunctionResult(String name, javajs.util.Lst<SV> params, SV tokenAtom) throws ScriptException
      Throws:
      ScriptException
    • runFunctionAndRet

      private SV runFunctionAndRet(JmolScriptFunction function, String name, javajs.util.Lst<SV> params, SV tokenAtom, boolean getReturn, boolean setContextPath, boolean allowThreads) throws ScriptException
      Throws:
      ScriptException
    • postProcessTry

      private void postProcessTry(Map<String,SV> cv)
    • breakAt

      private void breakAt(int pt)
    • restoreFunction

      private void restoreFunction(JmolScriptFunction f, javajs.util.Lst<SV> params, SV tokenAtom) throws ScriptException
      note that functions requiring motion cannot be run in JavaScript
      Parameters:
      f -
      params -
      tokenAtom -
      Throws:
      ScriptException
    • clearDefinedVariableAtomSets

      public void clearDefinedVariableAtomSets()
    • defineSets

      private void defineSets()
      support for @xxx or define xxx commands
    • defineAtomSet

      private void defineAtomSet(String script)
    • lookupIdentifierValue

      public javajs.util.BS lookupIdentifierValue(String identifier) throws ScriptException
      Throws:
      ScriptException
    • lookupValue

      private javajs.util.BS lookupValue(String setName, boolean plurals) throws ScriptException
      Throws:
      ScriptException
    • deleteAtomsInVariables

      public void deleteAtomsInVariables(javajs.util.BS bsDeleted)
    • getThisContext

      public ScriptContext getThisContext()
    • clearState

      private void clearState(boolean tQuiet)
    • pushContextDown

      public void pushContextDown(String why)
    • pushContext

      private void pushContext(ContextToken token, String why) throws ScriptException
      Throws:
      ScriptException
    • pushContext2

      private void pushContext2(ContextToken token, String why)
    • getScriptContext

      public ScriptContext getScriptContext(String why)
    • popContext

      void popContext(boolean isFlowCommand, boolean statementOnly)
    • restoreScriptContext

      public void restoreScriptContext(ScriptContext context, boolean isPopContext, boolean isFlowCommand, boolean statementOnly)
    • setException

      public void setException(ScriptException sx, String msg, String untranslated)
    • statementAsString

      public static String statementAsString(Viewer vwr, T[] statement, int iTok, boolean doLogMessages)
    • setObjectPropSafe

      public String setObjectPropSafe(String id, int tokCommand)
      called by Viewer in setting up a PyMOL scene.
    • setAtomProp

      protected void setAtomProp(String prop, Object value, javajs.util.BS bs)
    • restrictSelected

      public void restrictSelected(boolean isBond, boolean doInvert)
    • showString

      public void showString(String str)
    • showStringPrint

      public void showStringPrint(String s, boolean mustDo)
      Specified by:
      showStringPrint in class ScriptError
    • report

      public void report(String s, boolean isError)
    • appendBuffer

      private void appendBuffer(String str, boolean mustDo)
    • addProcess

      private void addProcess(javajs.util.Lst<T[]> vProcess, int pc, int pt)
    • checkContinue

      private boolean checkContinue() throws ScriptException
      checks to see if there is a pause condition, during which commands can still be issued, but with the ! first.
      Returns:
      false if there was a problem
      Throws:
      ScriptException
    • delayScript

      public void delayScript(int millis)
    • doDelay

      private void doDelay(int millis) throws ScriptException
      Parameters:
      millis - negative here bypasses max check
      Throws:
      ScriptException
    • evalParallel

      public boolean evalParallel(ScriptContext context, ShapeManager shapeManager)
    • isCommandDisplayable

      private boolean isCommandDisplayable(int i)
      provides support for the script editor
      Parameters:
      i -
      Returns:
      true if displayable (not a } )
    • loadFileResourceAsync

      public void loadFileResourceAsync(String fileName) throws ScriptException
      load a static file asynchronously
      Throws:
      ScriptException
    • loadFileAsync

      public String loadFileAsync(String prefix, String filename, int i, boolean doClear) throws ScriptException
      Allows asynchronous file loading from the LOAD or SCRIPT command. Saves the context, initiates a FileLoadThread instance. When the file loading completes, the file data (sans filename) is saved in the FileManager cache under cache://localLoad_xxxxx. Context is resumed at this command in the script, and the file is then retrieved from the cache. Only run from JSmol/HTML5 when vwr.isJS; Incompatibilities: LOAD and SCRIPT commands, load() function only; only one "?" per LOAD command
      Parameters:
      prefix -
      filename - or null if end of LOAD command and now just clearing out cache
      i -
      doClear - ensures only one file is in the cache for a given type
      Returns:
      cached file name if it exists
      Throws:
      ScriptException
    • cancelFileThread

      private void cancelFileThread()
    • logLoadInfo

      private void logLoadInfo(String msg, boolean isData)
    • notifyResumeStatus

      public void notifyResumeStatus()
    • refresh

      public void refresh(boolean doDelay) throws ScriptException
      Refresh the display NOW
      Parameters:
      doDelay -
      Throws:
      ScriptException
    • stopScriptThreads

      public void stopScriptThreads()
    • getErrorLineMessage2

      public String getErrorLineMessage2()
    • getLinenumber

      public int getLinenumber(ScriptContext c)
    • dispatchCommands

      public boolean dispatchCommands(boolean isSpt, boolean fromFunc, boolean isTry) throws ScriptException
      Parameters:
      isSpt -
      fromFunc -
      isTry -
      Returns:
      false only when still working through resumeEval
      Throws:
      ScriptException
    • commandLoop

      private void commandLoop(boolean allowJSInterrupt) throws ScriptException
      Throws:
      ScriptException
    • notifyScriptEditor

      private void notifyScriptEditor(int pc)
    • processCommand

      private void processCommand(int tok) throws ScriptException
      Throws:
      ScriptException
    • checkExtension

      private void checkExtension(int tok) throws ScriptException
      Throws:
      ScriptException
    • processShapeCommand

      private void processShapeCommand(int tok) throws ScriptException
      Throws:
      ScriptException
    • cmdAnimation

      private void cmdAnimation() throws ScriptException
      Throws:
      ScriptException
    • setFrameSet

      private void setFrameSet(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdAxes

      private void cmdAxes(int index) throws ScriptException
      Throws:
      ScriptException
    • cmdBackground

      private void cmdBackground(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdBind

      private void cmdBind() throws ScriptException
      Throws:
      ScriptException
    • cmdBondorder

      private void cmdBondorder() throws ScriptException
      Throws:
      ScriptException
    • cmdBoundbox

      private void cmdBoundbox(int index) throws ScriptException
      Throws:
      ScriptException
    • cmdCD

      private void cmdCD() throws ScriptException
      Throws:
      ScriptException
    • cmdCenter

      private void cmdCenter(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdColor

      private void cmdColor() throws ScriptException
      Throws:
      ScriptException
    • cmdDefine

      private void cmdDefine() throws ScriptException
      Throws:
      ScriptException
    • cmdDelay

      private void cmdDelay() throws ScriptException
      Throws:
      ScriptException
    • cmdDelete

      private void cmdDelete() throws ScriptException
      Throws:
      ScriptException
    • cmdDisplay

      private void cmdDisplay(boolean isDisplay) throws ScriptException
      Throws:
      ScriptException
    • cmdDots

      private void cmdDots(int iShape) throws ScriptException
      Throws:
      ScriptException
    • cmdEcho

      private void cmdEcho(int index) throws ScriptException
      Throws:
      ScriptException
    • cmdFile

      private void cmdFile() throws ScriptException
      Throws:
      ScriptException
    • cmdFixed

      private void cmdFixed() throws ScriptException
      Throws:
      ScriptException
    • cmdFor

      private boolean cmdFor(int tok, boolean isForCheck) throws ScriptException
      Throws:
      ScriptException
    • cmdFlow

      private boolean cmdFlow(int tok, boolean isForCheck, javajs.util.Lst<T[]> vProcess) throws ScriptException
      Throws:
      ScriptException
    • cmdFlowSwitch

      private int cmdFlowSwitch(ContextToken c, int tok) throws ScriptException
      Throws:
      ScriptException
    • cmdFont

      private void cmdFont(int shapeType, float fontsize) throws ScriptException
      Throws:
      ScriptException
    • cmdFrank

      private void cmdFrank(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdFunc

      private void cmdFunc() throws ScriptException
      Throws:
      ScriptException
    • cmdGetProperty

      private void cmdGetProperty() throws ScriptException
      Throws:
      ScriptException
    • cmdGoto

      private void cmdGoto(boolean isCmd) throws ScriptException
      Throws:
      ScriptException
    • cmdHbond

      private void cmdHbond() throws ScriptException
      Throws:
      ScriptException
    • cmdHelp

      private void cmdHelp() throws ScriptException
      Throws:
      ScriptException
    • cmdHistory

      private void cmdHistory(int pt) throws ScriptException
      Throws:
      ScriptException
    • cmdHover

      private void cmdHover() throws ScriptException
      Throws:
      ScriptException
    • cmdLabel

      private void cmdLabel(int index, javajs.util.BS bs) throws ScriptException
      Throws:
      ScriptException
    • cmdLoad

      public void cmdLoad() throws ScriptException
      Throws:
      ScriptException
    • checkFileExists

      public String checkFileExists(String prefix, boolean isAsync, String filename, int i, boolean doClear) throws ScriptException
      Throws:
      ScriptException
    • addFilterAttribute

      private void addFilterAttribute(Map<String,Object> htParams, String filter, String key)
    • addLoadData

      private int addLoadData(javajs.util.SB loadScript, String key, Map<String,Object> htParams, int i) throws ScriptException
      Throws:
      ScriptException
    • loadPNGJVar

      private void loadPNGJVar(String varName, Object o, Map<String,Object> htParams) throws ScriptException
      Throws:
      ScriptException
    • getLoadFilesList

      private String getLoadFilesList(int i, javajs.util.SB loadScript, javajs.util.SB sOptions, Map<String,Object> htParams, javajs.util.Lst<String> fNames) throws ScriptException
      Throws:
      ScriptException
    • isLoadOption

      private boolean isLoadOption(int tok)
    • getLoadModelIndex

      private int getLoadModelIndex(int i, javajs.util.SB sOptions, Map<String,Object> htParams) throws ScriptException
      Throws:
      ScriptException
    • finalizeLoad

      private void finalizeLoad(boolean isAppend, boolean appendNew, boolean isConcat, boolean doOrient, int nFiles, int ac0, int modelCount0, boolean isData) throws ScriptException
      Throws:
      ScriptException
    • cmdLog

      private void cmdLog() throws ScriptException
      Throws:
      ScriptException
    • cmdLoop

      private void cmdLoop() throws ScriptException
      Throws:
      ScriptException
    • cmdMessage

      private void cmdMessage() throws ScriptException
      Throws:
      ScriptException
    • cmdModel

      private void cmdModel(int offset) throws ScriptException
      ONE difference between FRAME and MODEL: model 1 sets model NAMED one in the case of PDB frame 1 always sets the first model
      Parameters:
      offset - will be 2 for "anim frame ..."
      Throws:
      ScriptException
    • loadDssr

      private void loadDssr(int modelIndex, String data) throws ScriptException
      Throws:
      ScriptException
    • cmdMove

      private void cmdMove() throws ScriptException
      Throws:
      ScriptException
    • cmdMoveto

      private void cmdMoveto() throws ScriptException
      Throws:
      ScriptException
    • isAtomExpression

      public boolean isAtomExpression(int i)
    • cmdPause

      private boolean cmdPause() throws ScriptException
      Throws:
      ScriptException
    • cmdPrint

      private void cmdPrint() throws ScriptException
      Throws:
      ScriptException
    • cmdPrompt

      private void cmdPrompt() throws ScriptException
      Throws:
      ScriptException
    • cmdReset

      private void cmdReset() throws ScriptException
      Throws:
      ScriptException
    • resetError

      private void resetError()
    • cmdRestrict

      private void cmdRestrict() throws ScriptException
      Throws:
      ScriptException
    • cmdReturn

      private void cmdReturn(SV tv) throws ScriptException
      Throws:
      ScriptException
    • cmdRotate

      public void cmdRotate(boolean isSpin, boolean isSelected) throws ScriptException
      Throws:
      ScriptException
    • cmdRestore

      private void cmdRestore() throws ScriptException
      Throws:
      ScriptException
    • cmdSave

      private void cmdSave() throws ScriptException
      Throws:
      ScriptException
    • cmdScript

      public void cmdScript(int tok, String filename, String theScript) throws ScriptException
      Throws:
      ScriptException
    • isMenu

      private boolean isMenu(String s)
    • cmdSelect

      private void cmdSelect(int i) throws ScriptException
      Parameters:
      i - 2 from RESTRICT BONDS, otherwise 1
      Throws:
      ScriptException
    • cmdSelectionHalos

      private void cmdSelectionHalos(int pt) throws ScriptException
      Throws:
      ScriptException
    • cmdSet

      private void cmdSet() throws ScriptException
      Throws:
      ScriptException
    • cmdScale

      private void cmdScale(int pt) throws ScriptException
      Throws:
      ScriptException
    • cmdSetEcho

      private void cmdSetEcho(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdSetLabel

      private boolean cmdSetLabel(String str) throws ScriptException
      Throws:
      ScriptException
    • cmdSetPicking

      private void cmdSetPicking() throws ScriptException
      Throws:
      ScriptException
    • cmdSetPickingStyle

      private void cmdSetPickingStyle() throws ScriptException
      Throws:
      ScriptException
    • cmdSlab

      private void cmdSlab(boolean isDepth) throws ScriptException
      Throws:
      ScriptException
    • cmdSsbond

      private void cmdSsbond() throws ScriptException
      Throws:
      ScriptException
    • cmdStructure

      private void cmdStructure() throws ScriptException
      Throws:
      ScriptException
    • cmdSubset

      private void cmdSubset() throws ScriptException
      Throws:
      ScriptException
    • cmdSync

      private void cmdSync() throws ScriptException
      Throws:
      ScriptException
    • cmdThrow

      private void cmdThrow() throws ScriptException
      Throws:
      ScriptException
    • saveContext

      private ScriptContext saveContext(String saveName)
    • cmdTimeout

      private void cmdTimeout(int index) throws ScriptException
      Throws:
      ScriptException
    • cmdTranslate

      private void cmdTranslate(boolean isSelected) throws ScriptException
      Throws:
      ScriptException
    • cmdUnbind

      private void cmdUnbind() throws ScriptException
      Throws:
      ScriptException
    • cmdUndoRedo

      public void cmdUndoRedo(int tok) throws ScriptException
      Throws:
      ScriptException
    • setModelCagePts

      public void setModelCagePts(int iModel, javajs.util.T3[] originABC, String name)
    • cmdUnitcell

      private void cmdUnitcell(int i) throws ScriptException
      Throws:
      ScriptException
    • cmdVector

      private void cmdVector() throws ScriptException
      Throws:
      ScriptException
    • cmdVibration

      private void cmdVibration() throws ScriptException
      Throws:
      ScriptException
    • cmdWireframe

      private void cmdWireframe() throws ScriptException
      Throws:
      ScriptException
    • cmdZap

      private void cmdZap(boolean isZapCommand) throws ScriptException
      Throws:
      ScriptException
    • cmdZoom

      private void cmdZoom(boolean isZoomTo) throws ScriptException
      Throws:
      ScriptException
    • colorShape

      private void colorShape(int shapeType, int index, boolean isBackground) throws ScriptException
      Throws:
      ScriptException
    • getPartialCharges

      public void getPartialCharges(javajs.util.BS bs) throws ScriptException
      Throws:
      ScriptException
    • encodeRadiusParameter

      public RadiusData encodeRadiusParameter(int index, boolean isOnly, boolean allowAbsolute) throws ScriptException
      Throws:
      ScriptException
    • expandFloatArray

      public Object expandFloatArray(float[] a, int min, boolean asBS) throws ScriptException
      Accepts a float array and expands [1 -3] to [1 2 3], for example.
      Parameters:
      a -
      min -
      asBS -
      Returns:
      float[] or BS
      Throws:
      ScriptException
    • frameControl

      private void frameControl(int i) throws ScriptException
      Throws:
      ScriptException
    • getColorRange

      public String getColorRange(int i) throws ScriptException
      Throws:
      ScriptException
    • getFullPathName

      public String getFullPathName(boolean withType) throws ScriptException
      Throws:
      ScriptException
    • getObjectBoundingBox

      private javajs.util.P3[] getObjectBoundingBox(String id)
    • getObjectCenter

      protected javajs.util.P3 getObjectCenter(String axisID, int index, int modelIndex)
    • getPlaneForObject

      protected javajs.util.P4 getPlaneForObject(String id, javajs.util.V3 vAB)
    • getQuaternionArray

      public javajs.util.Quat[] getQuaternionArray(Object quaternionOrSVData, int itype)
    • getSetAxesTypeMad10

      public int getSetAxesTypeMad10(int index) throws ScriptException
      Throws:
      ScriptException
    • getSettingFloat

      private float getSettingFloat(int pt) throws ScriptException
      Throws:
      ScriptException
    • getSettingInt

      private int getSettingInt(int pt) throws ScriptException
      Throws:
      ScriptException
    • getSettingStr

      private String getSettingStr(int pt, boolean isJmolSet) throws ScriptException
      Accept an unquoted string if there is just one parameter regardless of its type. In other words, these commands cannot accept a variable name by itself.
      Parameters:
      pt -
      isJmolSet -
      Returns:
      string parameter
      Throws:
      ScriptException
    • getShapeProperty

      public Object getShapeProperty(int shapeType, String propertyName)
    • getShapePropertyData

      public boolean getShapePropertyData(int shapeType, String propertyName, Object[] data)
    • getShapeType

      private int getShapeType(int tok) throws ScriptException
      Throws:
      ScriptException
    • getTranslucentLevel

      public float getTranslucentLevel(int i) throws ScriptException
      Throws:
      ScriptException
    • getZoom

      private float getZoom(int ptCenter, int i, javajs.util.BS bs, float currentZoom) throws ScriptException
      Throws:
      ScriptException
    • setElementColor

      private boolean setElementColor(String str, int argb)
    • setMeshDisplayProperty

      public boolean setMeshDisplayProperty(int shape, int i, int tok) throws ScriptException
      Parameters:
      shape -
      i -
      tok -
      Returns:
      true if successful
      Throws:
      ScriptException
    • setObjectArgb

      private void setObjectArgb(String str, int argb)
    • setObjectMad10

      public void setObjectMad10(int iShape, String name, int mad10)
    • setObjectProp

      private String setObjectProp(String id, int tokCommand, int ptColor) throws ScriptException
      Throws:
      ScriptException
    • setObjectProperty

      public String setObjectProperty() throws ScriptException
      Throws:
      ScriptException
    • setShapeNameParameter

      public String setShapeNameParameter(int i) throws ScriptException
      Throws:
      ScriptException
    • setShapeProperty

      public void setShapeProperty(int shapeType, String propertyName, Object propertyValue)
    • setShapePropertyBs

      public void setShapePropertyBs(int iShape, String propertyName, Object propertyValue, javajs.util.BS bs)
    • setShapeSize

      private void setShapeSize(int shapeType, RadiusData rd)
    • setShapeSizeBs

      public void setShapeSizeBs(int shapeType, int size, javajs.util.BS bs)
    • setShapeTranslucency

      public void setShapeTranslucency(int shapeType, String prefix, String translucency, float translucentLevel, javajs.util.BS bs)
    • setSize

      private void setSize(int shape, float scale) throws ScriptException
      Throws:
      ScriptException
    • setSizeBio

      private void setSizeBio(int iShape) throws ScriptException
      Throws:
      ScriptException
    • setUnits

      private boolean setUnits(String units, int tok) throws ScriptException
      Throws:
      ScriptException
    • toString

      public String toString()
      Overrides:
      toString in class Object