# Interface JSVAppletInterface

All Known Subinterfaces:
  `JSVAppInterface`

All Known Implementing Classes:
  `JSVApp, JSVApplet, JSVAppletPro, JSVAppPro`

public interface JSVAppletInterface

## Method Summary

Modifier and Type
Method
Description
`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 a `JSVPanel`
`String`
`checkScript(String script)`
`String`
`exportSpectrum(String type, int n)`
Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML, PDF(base64-encoded)
`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 the `JSVPanel`
`Map<String,Object>`
`getPropertyAsJavaObject(String key)`
`String`
`getPropertyAsJSON(String key)`
`String`
`getSolnColour()`
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 window
`String`
`print(String fileName)`
`void`
`removeAllHighlights()`
Method that can be called from another applet or from javascript that removes all highlights from the plot area of a `JSVPanel`
`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 a `JSVPanel`
`void`
`reversePlot()`
Method that can be called from another applet or from javascript that toggles reversing the plot on a `JSVPanel`
`void`
`runScript(String script)`
runs a script in proper order as listed
`boolean`
`runScriptNow(String script)`
`void`
`setFilePath(String tmpFilePath)`
`void`
`setSpectrumNumber(int i)`
Sets the spectrum to the specified block number
`void`
`syncScript(String peakScript)`
precede invalid input: '<'Peaks here with full name of Jmol applet (including syncID)
`void`
`toggleCoordinate()`
Method that can be called from another applet or from javascript that toggles the coordinate on a `JSVPanel`
`void`
`toggleGrid()`
Method that can be called from another applet or from javascript that toggles the grid on a `JSVPanel`
`void`
`toggleIntegration()`
Method that can be called from another applet or from javascript that toggles the integration graph of a `JSVPanel`.
`void`
`togglePointsOnly()`
Method that can be called from another applet or from javascript that toggles the flag for points only on a `JSVPanel`
`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 the `JSVPanel`

Returns:
  A String representation of the coordinate

### loadInline

void loadInline(String data)
Loads in-line JCAMP-DX data into the existing applet window

Parameters:
  `data` - String

### exportSpectrum

String exportSpectrum(String type, int n)
Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML, PDF(base64-encoded)

Parameters:
  `type` -
  `n` -
Returns:
  data

### setFilePath

void setFilePath(String tmpFilePath)

### 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 a `JSVPanel`

### toggleCoordinate

void toggleCoordinate()
Method that can be called from another applet or from javascript that toggles the coordinate on a `JSVPanel`

### togglePointsOnly

void togglePointsOnly()
Method that can be called from another applet or from javascript that toggles the flag for points only on a `JSVPanel`

### toggleIntegration

void toggleIntegration()
Method that can be called from another applet or from javascript that toggles the integration graph of a `JSVPanel`.

### 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 a `JSVPanel`

Parameters:
  `x1` - the starting x value
  `x2` - the ending x value
  `r` - the red portion of the highlight color
  `g` - the green portion of the highlight color
  `b` - the blue portion of the highlight color
  `a` - 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 a `JSVPanel`

### 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 a `JSVPanel`

Parameters:
  `x1` - the starting x value
  `x2` - the ending x value

### reversePlot

void reversePlot()
Method that can be called from another applet or from javascript that toggles reversing the plot on a `JSVPanel`

### runScript

void runScript(String script)
runs a script in proper order as listed

Parameters:
  `script` -

### syncScript

void syncScript(String peakScript)
precede invalid input: '<'Peaks here with full name of Jmol applet (including syncID)

Parameters:
  `peakScript` -

### writeStatus

void writeStatus(String msg)
Writes a message to the status label

Parameters:
  `msg` - the message

### getPropertyAsJavaObject

Map<String,Object> getPropertyAsJavaObject(String key)

### getPropertyAsJSON

String getPropertyAsJSON(String key)

### isSigned

boolean isSigned()

### isPro

boolean isPro()

### runScriptNow

boolean runScriptNow(String script)

### print

String print(String fileName)

### checkScript

String checkScript(String script)