Package jspecview.api
Interface JSVAppletInterface
- All Known Subinterfaces:
JSVAppInterface
- All Known Implementing Classes:
JSVApp
,JSVApplet
,JSVAppletPro
,JSVAppPro
,MainFrame
public interface JSVAppletInterface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
checkScript
(String script) exportSpectrum
(String type, int n) Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML, PDF(base64-encoded)Method that can be called from another applet or from javascript to return the coordinate of clicked point in the plot area of theJSVPanel
getPropertyAsJSON
(String key) Returns the calculated colour of a visible spectrum (Transmittance)boolean
isPro()
boolean
isSigned()
void
loadInline
(String data) Loads in-line JCAMP-DX data into the existing applet windowvoid
Method that can be called from another applet or from javascript that removes all highlights from the plot area of aJSVPanel
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
void
Method that can be called from another applet or from javascript that toggles reversing the plot on aJSVPanel
void
runs a script in proper order as listedboolean
runScriptNow
(String script) void
setFilePath
(String tmpFilePath) void
setSpectrumNumber
(int i) Sets the spectrum to the specified block numbervoid
setVisible
(boolean b) void
syncScript
(String peakScript) precede <Peaks here with full name of Jmol applet (including syncID)void
Method that can be called from another applet or from javascript that toggles the coordinate on aJSVPanel
void
Method that can be called from another applet or from javascript that toggles the grid on aJSVPanel
void
Method that can be called from another applet or from javascript that toggles the integration graph of aJSVPanel
.void
Method that can be called from another applet or from javascript that toggles the flag for points only on aJSVPanel
void
writeStatus
(String msg) Writes a message to the status label
-
Method Details
-
getSolnColour
String getSolnColour()Returns the calculated colour of a visible spectrum (Transmittance)- Returns:
- Color
-
getCoordinate
String 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
- Returns:
- A String representation of the coordinate
-
loadInline
Loads in-line JCAMP-DX data into the existing applet window- Parameters:
data
- String
-
exportSpectrum
Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML, PDF(base64-encoded)- Parameters:
type
-n
-- Returns:
- data
-
setFilePath
-
setSpectrumNumber
void setSpectrumNumber(int i) Sets the spectrum to the specified block number- Parameters:
i
-
-
toggleGrid
void toggleGrid()Method that can be called from another applet or from javascript that toggles the grid on aJSVPanel
-
toggleCoordinate
void toggleCoordinate()Method that can be called from another applet or from javascript that toggles the coordinate on aJSVPanel
-
togglePointsOnly
void togglePointsOnly()Method that can be called from another applet or from javascript that toggles the flag for points only on aJSVPanel
-
toggleIntegration
void toggleIntegration()Method that can be called from another applet or from javascript that toggles the integration graph of aJSVPanel
. -
addHighlight
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
- 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
-
removeAllHighlights
void removeAllHighlights()Method that can be called from another applet or from javascript that removes all highlights from the plot area of aJSVPanel
-
removeHighlight
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
- Parameters:
x1
- the starting x valuex2
- the ending x value
-
reversePlot
void reversePlot()Method that can be called from another applet or from javascript that toggles reversing the plot on aJSVPanel
-
runScript
runs a script in proper order as listed- Parameters:
script
-
-
syncScript
precede <Peaks here with full name of Jmol applet (including syncID)- Parameters:
peakScript
-
-
writeStatus
Writes a message to the status label- Parameters:
msg
- the message
-
getPropertyAsJavaObject
-
getPropertyAsJSON
-
isSigned
boolean isSigned() -
isPro
boolean isPro() -
setVisible
void setVisible(boolean b) -
runScriptNow
-
print
-
checkScript
-