Class StatusListener
- java.lang.Object
-
- org.openscience.jmol.app.jmolpanel.StatusListener
-
- All Implemented Interfaces:
JmolCallbackListener,JmolStatusListener,JmolSyncInterface,JSVInterface
class StatusListener extends java.lang.Object implements JmolStatusListener, JmolSyncInterface, JSVInterface
-
-
Field Summary
Fields Modifier and Type Field Description private DisplayPaneldisplayprivate JmolPaneljmolprivate booleanjSpecViewForceNewprivate jspecview.application.MainFramejSpecViewFrameprivate java.lang.StringlastSimulateprivate intmodificationModeprivate static java.lang.StringpropertiesFileNameprivate Viewervwr
-
Constructor Summary
Constructors Constructor Description StatusListener(JmolPanel jmol, DisplayPanel display)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckJSpecView(boolean closeAll)java.lang.StringcreateImage(java.lang.String fileName, java.lang.String type, java.lang.Object text_or_bytes, int quality)Starting with Jmol 11.8.RC5, for a context where the Jmol application is embedded in another application simply to send the returned message to the application.java.lang.Stringeval(java.lang.String strEval)voidexitJSpecView(boolean withDialog, java.lang.Object frame)float[][]functionXY(java.lang.String functionName, int nX, int nY)this is just a test method for isosurface FUNCTIONXYfloat[][][]functionXYZ(java.lang.String functionName, int nX, int nY, int nZ)for isosurface FUNCTIONXYZjava.util.Map<java.lang.String,java.lang.Object>getJSpecViewProperty(java.lang.String type)java.util.Map<java.lang.String,java.lang.Object>getRegistryInfo()private voidnotifyAtomPicked(java.lang.String info)voidnotifyCallback(CBK type, java.lang.Object[] data)booleannotifyEnabled(CBK type)private voidnotifyFileLoaded(java.lang.String fullPathName, java.lang.String fileName, java.lang.String modelName, java.lang.String errorMsg, java.lang.Boolean isAsync)private voidnotifyStructureModified(int atomIndex, int modelIndex, int mode)private voidplayAudio(java.lang.String fileName)WAV only for applicationvoidregister(java.lang.String id, JmolSyncInterface jsi)int[]resizeInnerPanel(java.lang.String data)voidrunScript(java.lang.String script)no queuing here -- called by MainFramevoidsaveProperties(java.util.Properties properties)private voidsendConsoleMessage(java.lang.String strStatus)voidsetCallbackFunction(java.lang.String callbackType, java.lang.String callbackFunction)voidsetJSpecView(java.lang.String peaks, boolean doLoadCheck, boolean isFileLoad)voidsetProperties(java.util.Properties properties)(package private) voidsetViewer(Viewer vwr)voidshowUrl(java.lang.String url)voidsyncScript(java.lang.String script)voidsyncToJmol(java.lang.String msg)
-
-
-
Field Detail
-
jmol
private JmolPanel jmol
-
display
private DisplayPanel display
-
vwr
private Viewer vwr
-
jSpecViewFrame
private jspecview.application.MainFrame jSpecViewFrame
-
jSpecViewForceNew
private boolean jSpecViewForceNew
-
modificationMode
private int modificationMode
-
lastSimulate
private java.lang.String lastSimulate
-
propertiesFileName
private static java.lang.String propertiesFileName
-
-
Constructor Detail
-
StatusListener
StatusListener(JmolPanel jmol, DisplayPanel display)
-
-
Method Detail
-
setViewer
void setViewer(Viewer vwr)
-
notifyEnabled
public boolean notifyEnabled(CBK type)
- Specified by:
notifyEnabledin interfaceJmolCallbackListener
-
notifyCallback
public void notifyCallback(CBK type, java.lang.Object[] data)
- Specified by:
notifyCallbackin interfaceJmolCallbackListener
-
playAudio
private void playAudio(java.lang.String fileName)
WAV only for application- Parameters:
fileName-
-
notifyStructureModified
private void notifyStructureModified(int atomIndex, int modelIndex, int mode)- Parameters:
atomIndex-modelIndex-mode-
-
setCallbackFunction
public void setCallbackFunction(java.lang.String callbackType, java.lang.String callbackFunction)- Specified by:
setCallbackFunctionin interfaceJmolCallbackListener
-
eval
public java.lang.String eval(java.lang.String strEval)
- Specified by:
evalin interfaceJmolStatusListener
-
createImage
public java.lang.String createImage(java.lang.String fileName, java.lang.String type, java.lang.Object text_or_bytes, int quality)Description copied from interface:JmolStatusListenerStarting with Jmol 11.8.RC5, for a context where the Jmol application is embedded in another application simply to send the returned message to the application. In this way any application can have access to the WRITE command.- Specified by:
createImagein interfaceJmolStatusListener- Parameters:
fileName-type-text_or_bytes-quality-- Returns:
- null ("you do it" or canceled) or a message starting with OK or an error message
-
notifyAtomPicked
private void notifyAtomPicked(java.lang.String info)
-
notifyFileLoaded
private void notifyFileLoaded(java.lang.String fullPathName, java.lang.String fileName, java.lang.String modelName, java.lang.String errorMsg, java.lang.Boolean isAsync)
-
sendConsoleMessage
private void sendConsoleMessage(java.lang.String strStatus)
-
showUrl
public void showUrl(java.lang.String url)
- Specified by:
showUrlin interfaceJmolStatusListener
-
functionXY
public float[][] functionXY(java.lang.String functionName, int nX, int nY)this is just a test method for isosurface FUNCTIONXY- Specified by:
functionXYin interfaceJmolStatusListener- Parameters:
functionName-nX-nY-- Returns:
- f(x,y) as a 2D array
-
functionXYZ
public float[][][] functionXYZ(java.lang.String functionName, int nX, int nY, int nZ)Description copied from interface:JmolStatusListenerfor isosurface FUNCTIONXYZ- Specified by:
functionXYZin interfaceJmolStatusListener- Returns:
- 3D array or null
-
getRegistryInfo
public java.util.Map<java.lang.String,java.lang.Object> getRegistryInfo()
- Specified by:
getRegistryInfoin interfaceJmolStatusListener
-
resizeInnerPanel
public int[] resizeInnerPanel(java.lang.String data)
- Specified by:
resizeInnerPanelin interfaceJmolStatusListener
-
checkJSpecView
private void checkJSpecView(boolean closeAll)
-
setJSpecView
public void setJSpecView(java.lang.String peaks, boolean doLoadCheck, boolean isFileLoad)
-
register
public void register(java.lang.String id, JmolSyncInterface jsi)- Specified by:
registerin interfaceJmolSyncInterface
-
syncScript
public void syncScript(java.lang.String script)
- Specified by:
syncScriptin interfaceJmolSyncInterface
-
setProperties
public void setProperties(java.util.Properties properties)
- Specified by:
setPropertiesin interfaceJSVInterface
-
saveProperties
public void saveProperties(java.util.Properties properties)
- Specified by:
savePropertiesin interfaceJSVInterface
-
exitJSpecView
public void exitJSpecView(boolean withDialog, java.lang.Object frame)- Specified by:
exitJSpecViewin interfaceJSVInterface- Parameters:
withDialog-frame-
-
runScript
public void runScript(java.lang.String script)
no queuing here -- called by MainFrame- Specified by:
runScriptin interfaceJSVInterface- Parameters:
script-
-
syncToJmol
public void syncToJmol(java.lang.String msg)
- Specified by:
syncToJmolin interfaceJSVInterface- Parameters:
msg-
-
getJSpecViewProperty
public java.util.Map<java.lang.String,java.lang.Object> getJSpecViewProperty(java.lang.String type)
- Specified by:
getJSpecViewPropertyin interfaceJmolStatusListener- Specified by:
getJSpecViewPropertyin interfaceJmolSyncInterface
-
-