Class StatusListener
- java.lang.Object
-
- org.openscience.jmol.app.jmolpanel.StatusListener
-
- All Implemented Interfaces:
JmolCallbackListener
,JmolStatusListener
,JmolSyncInterface
,JSVInterface
- Direct Known Subclasses:
NMR_JmolPanel.MyStatusListener
public class StatusListener extends java.lang.Object implements JmolStatusListener, JmolSyncInterface, JSVInterface
-
-
Field Summary
Fields Modifier and Type Field Description private DisplayPanel
display
private JmolPanel
jmolPanel
private boolean
jSpecViewForceNew
private jspecview.application.MainFrame
jSpecViewFrame
private java.lang.String
lastSimulate
private int
modificationMode
private java.util.Map<java.lang.String,java.lang.Object>
nboOptions
private static java.lang.String
propertiesFileName
private Viewer
vwr
-
Constructor Summary
Constructors Constructor Description StatusListener(JmolPanel jmolPanel, DisplayPanel display)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkJSpecView(boolean closeAll)
java.lang.String
createImage(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.String
eval(java.lang.String strEval)
void
exitJSpecView(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 void
notifyAtomPicked(java.lang.String info)
void
notifyCallback(CBK type, java.lang.Object[] data)
boolean
notifyEnabled(CBK type)
private void
notifyFileLoaded(java.lang.String fullPathName, java.lang.String fileName, java.lang.String modelName, java.lang.String errorMsg, java.lang.Boolean isAsync)
private void
notifyStructureModified(int atomIndex, int modelIndex, int mode)
void
register(java.lang.String id, JmolSyncInterface jsi)
int[]
resizeInnerPanel(java.lang.String data)
void
runScript(java.lang.String script)
no queuing here -- called by MainFramevoid
saveProperties(java.util.Properties properties)
private void
sendConsoleMessage(java.lang.String strStatus)
void
setCallbackFunction(java.lang.String callbackType, java.lang.String callbackFunction)
void
setJSpecView(java.lang.String peaks, boolean doLoadCheck, boolean isFileLoad)
void
setProperties(java.util.Properties properties)
void
setViewer(Viewer vwr)
void
showUrl(java.lang.String url)
void
syncScript(java.lang.String script)
void
syncToJmol(java.lang.String msg)
-
-
-
Field Detail
-
jmolPanel
private JmolPanel jmolPanel
-
display
private DisplayPanel display
-
vwr
private Viewer vwr
-
jSpecViewFrame
private jspecview.application.MainFrame jSpecViewFrame
-
jSpecViewForceNew
private boolean jSpecViewForceNew
-
nboOptions
private java.util.Map<java.lang.String,java.lang.Object> nboOptions
-
modificationMode
private int modificationMode
-
lastSimulate
private java.lang.String lastSimulate
-
propertiesFileName
private static java.lang.String propertiesFileName
-
-
Constructor Detail
-
StatusListener
public StatusListener(JmolPanel jmolPanel, DisplayPanel display)
-
-
Method Detail
-
setViewer
public void setViewer(Viewer vwr)
-
notifyEnabled
public boolean notifyEnabled(CBK type)
- Specified by:
notifyEnabled
in interfaceJmolCallbackListener
-
notifyCallback
public void notifyCallback(CBK type, java.lang.Object[] data)
- Specified by:
notifyCallback
in interfaceJmolCallbackListener
-
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:
setCallbackFunction
in interfaceJmolCallbackListener
-
eval
public java.lang.String eval(java.lang.String strEval)
- Specified by:
eval
in 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:JmolStatusListener
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. In this way any application can have access to the WRITE command.- Specified by:
createImage
in 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:
showUrl
in interfaceJmolStatusListener
-
functionXY
public float[][] functionXY(java.lang.String functionName, int nX, int nY)
this is just a test method for isosurface FUNCTIONXY- Specified by:
functionXY
in 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:JmolStatusListener
for isosurface FUNCTIONXYZ- Specified by:
functionXYZ
in interfaceJmolStatusListener
- Returns:
- 3D array or null
-
getRegistryInfo
public java.util.Map<java.lang.String,java.lang.Object> getRegistryInfo()
- Specified by:
getRegistryInfo
in interfaceJmolStatusListener
-
resizeInnerPanel
public int[] resizeInnerPanel(java.lang.String data)
- Specified by:
resizeInnerPanel
in 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:
register
in interfaceJmolSyncInterface
-
syncScript
public void syncScript(java.lang.String script)
- Specified by:
syncScript
in interfaceJmolSyncInterface
-
setProperties
public void setProperties(java.util.Properties properties)
- Specified by:
setProperties
in interfaceJSVInterface
-
saveProperties
public void saveProperties(java.util.Properties properties)
- Specified by:
saveProperties
in interfaceJSVInterface
-
exitJSpecView
public void exitJSpecView(boolean withDialog, java.lang.Object frame)
- Specified by:
exitJSpecView
in interfaceJSVInterface
- Parameters:
withDialog
-frame
-
-
runScript
public void runScript(java.lang.String script)
no queuing here -- called by MainFrame- Specified by:
runScript
in interfaceJSVInterface
- Parameters:
script
-
-
syncToJmol
public void syncToJmol(java.lang.String msg)
- Specified by:
syncToJmol
in interfaceJSVInterface
- Parameters:
msg
-
-
getJSpecViewProperty
public java.util.Map<java.lang.String,java.lang.Object> getJSpecViewProperty(java.lang.String type)
- Specified by:
getJSpecViewProperty
in interfaceJmolStatusListener
- Specified by:
getJSpecViewProperty
in interfaceJmolSyncInterface
-
-