Package jspecview.app
Class JSVApp
java.lang.Object
jspecview.app.JSVApp
- All Implemented Interfaces:
JSVAppInterface,JSVAppletInterface,PanelListener,ScriptInterface
- Direct Known Subclasses:
JSVAppPro
JSpecView Applet class. For a list of parameters and scripting functionality
see the file JSpecView_Applet_Specification.html.
- Author:
- Bob Hanson, Debbie-Ann Facey, Khari A. Bryan, Craig A. D. Walters, Prof Robert J. Lancashire
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHighlight(double x1, double x2, int r, int g, int b, int a) Method that can be called from another applet or from javascript that adds a highlight to a portion of the plot area of aJSVPanelcheckScript(String script) voiddispose()voiddoAdvanced(String filePath) called by Pro's popup window Advanced...exportSpectrum(String type, int n) Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CMLstatic StringMethod that can be called from another applet or from javascript to return the coordinate of clicked point in the plot area of theJSVPanelgetPropertyAsJSON(String key) Returns the calculated colour of a visible spectrum (Transmittance)voidinitParams(String params) starts or restarts applet display from scratch or from a JSVApplet.script() JavaScript command Involves a two-pass sequence through parsing the parameters, because order is not important in this sort of call.booleanisPro()booleanisSigned()voidloadInline(String data) Loads in-line JCAMP-DX data into the existing applet windowvoidpanelEvent(Object eventObj) called by notifyPeakPickedListeners in JSVPanelvoidMethod that can be called from another applet or from javascript that removes all highlights from the plot area of aJSVPanelvoidremoveHighlight(double x1, double x2) Method that can be called from another applet or from javascript that removes a highlight from the plot area of aJSVPanelvoidrepaint()voidMethod that can be called from another applet or from javascript that toggles reversing the plot on aJSVPanelvoidruns a script in proper order as listedbooleanrunScriptNow(String params) voidsetCursor(int id) voidsetFilePath(String tmpFilePath) voidsetSpectrumNumber(int n) Sets the spectrum to the specified block numbervoidsetVisible(boolean b) voidsiCheckCallbacks(String title) voidsiExecHidden(boolean b) voidsiExecScriptComplete(String msg, boolean isOK) voidsiExecSetCallback(ScriptToken st, String value) voidsiExecTest(String value) siGetNewJSVPanel(Spectrum spec) siGetNewJSVPanel2(Lst<Spectrum> specs) voidsiNewWindow(boolean isSelected, boolean fromFrame) Shows the applet in a FramevoidvoidsiOpenDataOrFile(Object data, String name, Lst<Spectrum> specs, String url, int firstSpec, int lastSpec, boolean isAppend, String script, String id) voidsiProcessCommand(String scriptItem) overloaded in JSVAppletProvoidvoidsiSetCurrentSource(JDXSource source) voidsiSetLoaded(String fileName, String filePath) voidsiSetMenuEnables(PanelNode node, boolean isSplit) voidsiSetPropertiesFromPreferences(JSVPanel jsvp, boolean includeMeasures) voidsiSetSelectedPanel(JSVPanel jsvp) voidsiSourceClosed(JDXSource source) voidsiSyncLoad(String filePath) Loads a new file into the existing applet windowvoidsiUpdateBoolean(ScriptToken st, boolean TF) voidsiUpdateRecentMenus(String filePath) voidsiValidateAndRepaint(boolean isAll) voidsyncScript(String peakScript) precede invalid input: '<'Peaks here with full name of Jmol applet (including syncID)voidsyncToJmol(String msg) voidMethod that can be called from another applet or from javascript that toggles the coordinate on aJSVPanelvoidMethod that can be called from another applet or from javascript that toggles the grid on aJSVPanelvoidMethod that can be called from another applet or from javascript that toggles the integration graph of aJSVPanel.voidMethod that can be called from another applet or from javascript that toggles the coordinate on aJSVPanelvoidupdateJS(int width, int height) voidwriteStatus(String msg) Writes a message to the status label
-
Field Details
-
CREDITS
- See Also:
-
appletFrame
-
appletReadyCallbackFunctionName
-
vwr
-
-
Constructor Details
-
JSVApp
-
-
Method Details
-
isPro
public boolean isPro()- Specified by:
isProin interfaceJSVAppletInterface
-
isSigned
public boolean isSigned()- Specified by:
isSignedin interfaceJSVAppletInterface- Specified by:
isSignedin interfaceScriptInterface
-
getAppletFrame
-
dispose
public void dispose() -
getPropertyAsJavaObject
- Specified by:
getPropertyAsJavaObjectin interfaceJSVAppletInterface
-
getPropertyAsJSON
- Specified by:
getPropertyAsJSONin interfaceJSVAppletInterface
-
getCoordinate
Method that can be called from another applet or from javascript to return the coordinate of clicked point in the plot area of theJSVPanel- Specified by:
getCoordinatein interfaceJSVAppletInterface- Returns:
- A String representation of the coordinate
-
loadInline
Loads in-line JCAMP-DX data into the existing applet window- Specified by:
loadInlinein interfaceJSVAppletInterface- Parameters:
data- String
-
exportSpectrum
Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML- Specified by:
exportSpectrumin interfaceJSVAppletInterface- Parameters:
type-n-- Returns:
- data
-
setFilePath
- Specified by:
setFilePathin interfaceJSVAppletInterface
-
setSpectrumNumber
public void setSpectrumNumber(int n) Sets the spectrum to the specified block number- Specified by:
setSpectrumNumberin interfaceJSVAppletInterface- Parameters:
n-
-
reversePlot
public void reversePlot()Method that can be called from another applet or from javascript that toggles reversing the plot on aJSVPanel- Specified by:
reversePlotin interfaceJSVAppletInterface
-
toggleGrid
public void toggleGrid()Method that can be called from another applet or from javascript that toggles the grid on aJSVPanel- Specified by:
toggleGridin interfaceJSVAppletInterface
-
toggleCoordinate
public void toggleCoordinate()Method that can be called from another applet or from javascript that toggles the coordinate on aJSVPanel- Specified by:
toggleCoordinatein interfaceJSVAppletInterface
-
togglePointsOnly
public void togglePointsOnly()Method that can be called from another applet or from javascript that toggles the coordinate on aJSVPanel- Specified by:
togglePointsOnlyin interfaceJSVAppletInterface
-
toggleIntegration
public void toggleIntegration()Method that can be called from another applet or from javascript that toggles the integration graph of aJSVPanel.- Specified by:
toggleIntegrationin interfaceJSVAppletInterface
-
addHighlight
public void addHighlight(double x1, double x2, int r, int g, int b, int a) Method that can be called from another applet or from javascript that adds a highlight to a portion of the plot area of aJSVPanel- Specified by:
addHighlightin interfaceJSVAppletInterface- Parameters:
x1- the starting x valuex2- the ending x valuer- the red portion of the highlight colorg- the green portion of the highlight colorb- the blue portion of the highlight colora- the alpha portion of the highlight color
-
removeHighlight
public void removeHighlight(double x1, double x2) Method that can be called from another applet or from javascript that removes a highlight from the plot area of aJSVPanel- Specified by:
removeHighlightin interfaceJSVAppletInterface- Parameters:
x1- the starting x valuex2- the ending x value
-
removeAllHighlights
public void removeAllHighlights()Method that can be called from another applet or from javascript that removes all highlights from the plot area of aJSVPanel- Specified by:
removeAllHighlightsin interfaceJSVAppletInterface
-
syncScript
Description copied from interface:JSVAppletInterfaceprecede invalid input: '<'Peaks here with full name of Jmol applet (including syncID)- Specified by:
syncScriptin interfaceJSVAppletInterface- Parameters:
peakScript-
-
writeStatus
Writes a message to the status label- Specified by:
writeStatusin interfaceJSVAppletInterface- Specified by:
writeStatusin interfaceScriptInterface- Parameters:
msg- the message
-
initParams
starts or restarts applet display from scratch or from a JSVApplet.script() JavaScript command Involves a two-pass sequence through parsing the parameters, because order is not important in this sort of call. To call a script and have commands execute in order, use JSVApplet.runScript(script) instead- Parameters:
params-
-
repaint
public void repaint()- Specified by:
repaintin interfaceScriptInterface
-
updateJS
public void updateJS(int width, int height) - Parameters:
width-height-
-
runScriptNow
- Specified by:
runScriptNowin interfaceJSVAppletInterface- Specified by:
runScriptNowin interfaceScriptInterface
-
doAdvanced
called by Pro's popup window Advanced...- Parameters:
filePath-
-
panelEvent
called by notifyPeakPickedListeners in JSVPanel- Specified by:
panelEventin interfacePanelListener
-
getSolnColour
Returns the calculated colour of a visible spectrum (Transmittance)- Specified by:
getSolnColourin interfaceJSVAppletInterface- Returns:
- Color
-
syncToJmol
- Specified by:
syncToJmolin interfaceScriptInterface- Parameters:
msg-
-
setVisible
public void setVisible(boolean b) - Specified by:
setVisiblein interfaceJSVAppInterface
-
setCursor
public void setCursor(int id) - Specified by:
setCursorin interfaceScriptInterface
-
runScript
Description copied from interface:JSVAppletInterfaceruns a script in proper order as listed- Specified by:
runScriptin interfaceJSVAppletInterface- Specified by:
runScriptin interfaceScriptInterface- Parameters:
script-
-
getScriptQueue
- Specified by:
getScriptQueuein interfaceJSVAppInterface
-
siSetCurrentSource
- Specified by:
siSetCurrentSourcein interfaceScriptInterface
-
siSendPanelChange
public void siSendPanelChange()- Specified by:
siSendPanelChangein interfaceScriptInterface
-
siNewWindow
public void siNewWindow(boolean isSelected, boolean fromFrame) Shows the applet in a Frame- Specified by:
siNewWindowin interfaceScriptInterface- Parameters:
isSelected-
-
siValidateAndRepaint
public void siValidateAndRepaint(boolean isAll) - Specified by:
siValidateAndRepaintin interfaceScriptInterface
-
siSyncLoad
Loads a new file into the existing applet window- Specified by:
siSyncLoadin interfaceScriptInterface- Parameters:
filePath-
-
siOpenDataOrFile
public void siOpenDataOrFile(Object data, String name, Lst<Spectrum> specs, String url, int firstSpec, int lastSpec, boolean isAppend, String script, String id) - Specified by:
siOpenDataOrFilein interfaceScriptInterface
-
siProcessCommand
overloaded in JSVAppletPro- Specified by:
siProcessCommandin interfaceScriptInterface- Parameters:
scriptItem-
-
siSetSelectedPanel
- Specified by:
siSetSelectedPanelin interfaceScriptInterface
-
siExecSetCallback
- Specified by:
siExecSetCallbackin interfaceScriptInterface
-
siLoaded
- Specified by:
siLoadedin interfaceScriptInterface
-
siExecHidden
public void siExecHidden(boolean b) - Specified by:
siExecHiddenin interfaceScriptInterface
-
siExecScriptComplete
- Specified by:
siExecScriptCompletein interfaceScriptInterface
-
siUpdateBoolean
- Specified by:
siUpdateBooleanin interfaceScriptInterface
-
siCheckCallbacks
- Specified by:
siCheckCallbacksin interfaceScriptInterface
-
siNodeSet
- Specified by:
siNodeSetin interfaceScriptInterface
-
siSourceClosed
- Specified by:
siSourceClosedin interfaceScriptInterface
-
siGetNewJSVPanel
- Specified by:
siGetNewJSVPanelin interfaceScriptInterface
-
siGetNewJSVPanel2
- Specified by:
siGetNewJSVPanel2in interfaceScriptInterface
-
siSetPropertiesFromPreferences
- Specified by:
siSetPropertiesFromPreferencesin interfaceScriptInterface
-
siSetLoaded
- Specified by:
siSetLoadedin interfaceScriptInterface
-
siSetMenuEnables
- Specified by:
siSetMenuEnablesin interfaceScriptInterface
-
siUpdateRecentMenus
- Specified by:
siUpdateRecentMenusin interfaceScriptInterface
-
siExecTest
- Specified by:
siExecTestin interfaceScriptInterface
-
print
- Specified by:
printin interfaceJSVAppletInterface
-
checkScript
- Specified by:
checkScriptin interfaceJSVAppletInterface
-
getAppletInfo
-