# Class StatusManager

java.lang.Object
org.jmol.viewer.StatusManager

public 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 vwrRefreshed Bob Hanson hansonr@stolaf.edu 2/2006

## Field Summary

Fields
Modifier and Type
Field
Description
`boolean`
`allowStatusReporting`
`JmolCallbackListener`
`cbl`
`Map<String, Lst<Lst<Object>>>`
`messageQueue`
`String`
`statusList`
`static final int`
`SYNC_DISABLE`
`static final int`
`SYNC_DRIVER`
`static final int`
`SYNC_ENABLE`
`static final int`
`SYNC_OFF`
`static final int`
`SYNC_SLAVE`
`static final int`
`SYNC_STEREO`
`boolean`
`syncingScripts`
`protected Viewer`
`vwr`

## Method Summary

Modifier and Type
Method
Description
`void`
`clearConsole()`
`void`
`closeAllAudio()`
`int`
`getSyncMode()`
`void`
`notifyAudioStatus(Map<String,Object> htParams)`
called from JmolAudio
`void`
`playAudio(Map<String,Object> htParams)`
`Object`
`processService(Map<String,Object> info)`
service is expected to return a value in the "ret" key
`void`
`registerAudio(String id, Map<String,Object> htParams)`
`int[]`
`resizeInnerPanel(int width, int height)`
`void`
`resizeInnerPanelString(String data)`
called by file droppers
`void`
`setCallbackFunction(String callbackType, Object callbackObject)`
Set a JmolScript or JavaScript or Java callback.
`void`
`setStatusStructureModified(int atomIndex, int modelIndex, int mode, String msg, int n, BS bsAtoms)`
`void`
`stopAudio(String id)`
`Object`
`syncSend(String script, Object appletNameOrProp, int port)`

### Methods inherited from class Object

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

## Field Details

### vwr

protected Viewer vwr

### cbl

public JmolCallbackListener cbl

### statusList

public String statusList

### allowStatusReporting

public boolean allowStatusReporting

### messageQueue

public Map<String, Lst<Lst<Object>>> messageQueue

### syncingScripts

public boolean syncingScripts

### SYNC_OFF

public static final int SYNC_OFF

See Also:
  - Constant Field Values

### SYNC_DRIVER

public static final int SYNC_DRIVER

See Also:
  - Constant Field Values

### SYNC_SLAVE

public static final int SYNC_SLAVE

See Also:
  - Constant Field Values

### SYNC_DISABLE

public static final int SYNC_DISABLE

See Also:
  - Constant Field Values

### SYNC_ENABLE

public static final int SYNC_ENABLE

See Also:
  - Constant Field Values

### SYNC_STEREO

public static final int SYNC_STEREO

See Also:
  - Constant Field Values

## Method Details

### setCallbackFunction

public void setCallbackFunction(String callbackType, Object callbackObject)
Set a JmolScript or JavaScript or Java callback. This method can be called with a JavaScript function, but only directly by an applet method, not using Jmol scripting.

Parameters:
  `callbackType` -
  `callbackObject` -

### setStatusStructureModified

public void setStatusStructureModified(int atomIndex, int modelIndex, int mode, String msg, int n, BS bsAtoms)

### syncSend

public Object syncSend(String script, Object appletNameOrProp, int port)

### processService

public Object processService(Map<String,Object> info)
service is expected to return a value in the "ret" key

Parameters:
  `info` - with key "service"
Returns:
  info, for chaining

### getSyncMode

public int getSyncMode()

### clearConsole

public void clearConsole()

### resizeInnerPanel

public int[] resizeInnerPanel(int width, int height)

### resizeInnerPanelString

public void resizeInnerPanelString(String data)
called by file droppers

Parameters:
  `data` -

### registerAudio

public void registerAudio(String id, Map<String,Object> htParams)

### stopAudio

public void stopAudio(String id)

### playAudio

public void playAudio(Map<String,Object> htParams)

### closeAllAudio

public void closeAllAudio()

### notifyAudioStatus

public void notifyAudioStatus(Map<String,Object> htParams)
called from JmolAudio

Parameters:
  `htParams` -