org.jmol.viewer

Class StatusManager

class StatusManager extends Object

The StatusManager class handles all details of status reporting, including: 1) saving the message in a queue that replaces the "callback" mechanism, 2) sending messages off to the console, and 3) delivering messages back to the main Jmol.java class in app or applet to handle differences in capabilities, including true callbacks. atomPicked fileLoaded fileLoadError frameChanged measureCompleted measurePending measurePicked newOrientation scriptEcho scriptError scriptMessage scriptStarted scriptStatus scriptTerminated userAction viewerRefreshed Bob Hanson hansonr@stolaf.edu 2/2006
Field Summary
booleanallowStatusReporting
booleandrivingSync
HashtablehtCallbacks
booleanisSynced
JmolStatusListenerjmolStatusListener
HashtablemessageQueue
intminSyncRepeatMs
static intMAXIMUM_QUEUE_LENGTH
StringBufferoutputBuffer
StringstatusList
intstatusPtr
booleansyncDisabled
booleansyncingMouse
booleansyncingScripts
static intSYNC_DISABLE
static intSYNC_DRIVER
static intSYNC_ENABLE
static intSYNC_OFF
static intSYNC_SLAVE
Viewerviewer
Constructor Summary
StatusManager(Viewer viewer)
Method Summary
voidclear()
voidclearConsole()
StringcreateImage(String file, String type, Object text_or_bytes, int quality)
StringdialogAsk(String type, String fileName)
booleandoSync()
Stringeval(String strEval)
float[][]functionXY(String functionName, int nX, int nY)
StringgetCallbackScript(String callbackType)
HashtablegetMessageQueue()
HashtablegetRegistryInfo()
ObjectgetStatusChanged(String statusNameList)
StringgetStatusList()
intgetSyncMode()
booleannotifyEnabled(int type)
voidnotifyMinimizationStatus(String sJmol)
voidpopupMenu(int x, int y)
booleanresetMessageQueue(String statusList)
voidsetAllowStatusReporting(boolean TF)
voidsetCallbackFunction(String callbackType, String callbackFunction)
voidsetJmolStatusListener(JmolStatusListener jmolStatusListener)
voidsetScriptEcho(String strEcho, boolean isScriptQueued)
voidsetScriptStatus(String strStatus, String statusMessage, int msWalltime)
voidsetStatusAtomHovered(String sJmol, int iatom, String strInfo)
voidsetStatusAtomPicked(String sJmol, int atomIndex, String strInfo)
voidsetStatusChanged(String statusName, int intInfo, Object statusInfo, boolean isReplace)
voidsetStatusFileLoaded(String sJmol, String fullPathName, String fileName, String modelName, String errorMsg, int ptLoad)
voidsetStatusFrameChanged(String sJmol, int frameNo, int fileNo, int modelNo, int firstNo, int lastNo)
booleansetStatusList(String statusList)
voidsetStatusMeasurePicked(int iatom, String strMeasure)
voidsetStatusMeasuring(String status, int count, String strMeasure)
voidsetStatusResized(String sJmol, int width, int height)
voidsetStatusScriptStarted(int iscript, String script)
voidsetSync(String mouseCommand)
voidsetSyncDriver(int syncMode)
voidshowConsole(boolean showConsole)
voidshowUrl(String urlString)
voidsyncSend(String script, String appletName)

Field Detail

allowStatusReporting

private boolean allowStatusReporting

drivingSync

boolean drivingSync

htCallbacks

private Hashtable htCallbacks

isSynced

boolean isSynced

jmolStatusListener

private JmolStatusListener jmolStatusListener

messageQueue

private Hashtable messageQueue

minSyncRepeatMs

private int minSyncRepeatMs

MAXIMUM_QUEUE_LENGTH

private static int MAXIMUM_QUEUE_LENGTH

outputBuffer

private StringBuffer outputBuffer

statusList

private String statusList

statusPtr

private int statusPtr

syncDisabled

boolean syncDisabled

syncingMouse

boolean syncingMouse

syncingScripts

boolean syncingScripts

SYNC_DISABLE

static final int SYNC_DISABLE

SYNC_DRIVER

static final int SYNC_DRIVER

SYNC_ENABLE

static final int SYNC_ENABLE

SYNC_OFF

static final int SYNC_OFF

SYNC_SLAVE

static final int SYNC_SLAVE

viewer

private Viewer viewer

Constructor Detail

StatusManager

StatusManager(Viewer viewer)

Method Detail

clear

void clear()

clearConsole

void clearConsole()

createImage

String createImage(String file, String type, Object text_or_bytes, int quality)

dialogAsk

public String dialogAsk(String type, String fileName)

doSync

boolean doSync()

eval

String eval(String strEval)

functionXY

float[][] functionXY(String functionName, int nX, int nY)

getCallbackScript

String getCallbackScript(String callbackType)

getMessageQueue

Hashtable getMessageQueue()

getRegistryInfo

public Hashtable getRegistryInfo()

getStatusChanged

Object getStatusChanged(String statusNameList)

getStatusList

String getStatusList()

getSyncMode

int getSyncMode()

notifyEnabled

private boolean notifyEnabled(int type)

notifyMinimizationStatus

void notifyMinimizationStatus(String sJmol)

popupMenu

void popupMenu(int x, int y)

resetMessageQueue

private boolean resetMessageQueue(String statusList)

setAllowStatusReporting

void setAllowStatusReporting(boolean TF)

setCallbackFunction

void setCallbackFunction(String callbackType, String callbackFunction)

setJmolStatusListener

void setJmolStatusListener(JmolStatusListener jmolStatusListener)

setScriptEcho

void setScriptEcho(String strEcho, boolean isScriptQueued)

setScriptStatus

void setScriptStatus(String strStatus, String statusMessage, int msWalltime)

setStatusAtomHovered

void setStatusAtomHovered(String sJmol, int iatom, String strInfo)

setStatusAtomPicked

void setStatusAtomPicked(String sJmol, int atomIndex, String strInfo)

setStatusChanged

void setStatusChanged(String statusName, int intInfo, Object statusInfo, boolean isReplace)

setStatusFileLoaded

void setStatusFileLoaded(String sJmol, String fullPathName, String fileName, String modelName, String errorMsg, int ptLoad)

setStatusFrameChanged

void setStatusFrameChanged(String sJmol, int frameNo, int fileNo, int modelNo, int firstNo, int lastNo)

setStatusList

private boolean setStatusList(String statusList)

setStatusMeasurePicked

void setStatusMeasurePicked(int iatom, String strMeasure)

setStatusMeasuring

void setStatusMeasuring(String status, int count, String strMeasure)

setStatusResized

void setStatusResized(String sJmol, int width, int height)

setStatusScriptStarted

void setStatusScriptStarted(int iscript, String script)

setSync

void setSync(String mouseCommand)

setSyncDriver

void setSyncDriver(int syncMode)

showConsole

void showConsole(boolean showConsole)

showUrl

void showUrl(String urlString)

syncSend

void syncSend(String script, String appletName)