public class MainFrame extends javax.swing.JFrame implements JmolSyncInterface, PanelListener, ScriptInterface, JSVAppletInterface
| Modifier and Type | Field and Description |
|---|---|
java.awt.dnd.DropTargetListener |
dtl |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
MainFrame(java.awt.Component jmolDisplay,
JSVInterface jmolOrAdvancedApplet)
Constructor
|
| Modifier and Type | Method and 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 |
void |
awaken(boolean visible) |
void |
checkCallbacks(java.lang.String title) |
void |
checkOverlay() |
void |
closeSource(JDXSource source)
Closes the
JDXSource specified by source |
JDXSource |
createSource(java.lang.String data,
java.lang.String filePath,
java.net.URL base,
int firstSpec,
int lastSpec) |
void |
enableStatus(boolean TF) |
void |
enableToolbar(boolean isEnabled) |
void |
execClose(java.lang.String value,
boolean fromScript) |
java.lang.String |
execExport(JSVPanel jsvp,
java.lang.String value) |
void |
execHidden(boolean b) |
java.lang.String |
execLoad(java.lang.String value) |
void |
execScriptComplete(java.lang.String msg,
boolean isOK) |
void |
execSetAutoIntegrate(boolean b) |
void |
execSetCallback(ScriptToken st,
java.lang.String value) |
void |
execSetInterface(java.lang.String value) |
void |
execTest(java.lang.String value) |
java.lang.String |
exportSpectrum(java.lang.String type,
int n)
Delivers spectrum coded as desired: XY, SQZ, PAC, DIF, DIFDUP, FIX, AML, CML
|
boolean |
getAutoCombine() |
boolean |
getAutoShowLegend() |
java.lang.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 |
JDXSource |
getCurrentSource() |
java.net.URL |
getDocumentBase() |
java.lang.String |
getFileAsString(java.lang.String value) |
int |
getFileCount() |
java.lang.String |
getIntegrationRatios() |
JDXSpectrum.IRMode |
getIRMode() |
JSVPanel |
getNewJSVPanel(JDXSpectrum spec) |
JSVPanel |
getNewJSVPanel(java.util.List<JDXSpectrum> specs) |
JSVPanelNode |
getNewPanelNode(java.lang.String id,
java.lang.String fileName,
JDXSource source,
JSVPanel jsvp) |
JSVDialog |
getOverlayLegend(JSVPanel jsvp) |
PanelData |
getPanelData() |
java.util.List<JSVPanelNode> |
getPanelNodes() |
Parameters |
getParameters() |
java.lang.Object |
getPopupMenu() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperty(java.lang.String key) |
java.util.Map<java.lang.String,java.lang.Object> |
getPropertyAsJavaObject(java.lang.String key) |
java.lang.String |
getPropertyAsJSON(java.lang.String key) |
java.lang.String |
getReturnFromJmolModel() |
JSVPanel |
getSelectedPanel() |
java.lang.String |
getSolnColour()
Returns the calculated colour of a visible spectrum (Transmittance)
|
java.lang.Object |
getSpectraTree() |
int |
incrementScriptLevelCount(int n) |
int |
incrementViewCount(int n) |
boolean |
isPro() |
boolean |
isSigned() |
void |
loadInline(java.lang.String data)
Loads in-line JCAMP-DX data into the existing applet window
|
static void |
main(java.lang.String[] args) |
void |
openDataOrFile(java.lang.String data,
java.lang.String name,
java.util.List<JDXSpectrum> specs,
java.lang.String url,
int firstSpec,
int lastSpec,
boolean isAppend) |
void |
openFile(java.lang.String fileName,
boolean closeFirst)
Opens and displays a file
|
void |
openURL() |
void |
panelEvent(java.lang.Object eventObj) |
java.lang.String |
print(java.lang.String pdfFileName) |
void |
processCommand(java.lang.String script) |
void |
register(java.lang.String appletID,
JmolSyncInterface jmolStatusListener)
called by Jmol's StatusListener to register itself, indicating to JSpecView
that it needs to synchronize with it
|
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 |
repaintCompleted() |
void |
requestRepaint() |
void |
reversePlot()
Method that can be called from another applet or from javascript that
toggles reversing the plot on a
JSVPanel |
void |
runScript(java.lang.String script)
ScriptInterface requires this.
|
boolean |
runScriptNow(java.lang.String peakScript) |
void |
sendPanelChange(JSVPanel jsvp) |
void |
setCurrentSource(JDXSource source) |
void |
setCursorObject(java.lang.Object c) |
void |
setFileCount(int n) |
void |
setFilePath(java.lang.String tmpFilePath) |
void |
setIntegrationRatios(java.lang.String value) |
void |
setIRMode(JDXSpectrum.IRMode mode) |
void |
setLoaded(java.lang.String fileName,
java.lang.String filePath) |
void |
setLoadImaginary(boolean TF) |
void |
setMenuEnables(JSVPanelNode node,
boolean isSplit) |
void |
setNode(JSVPanelNode panelNode,
boolean fromTree) |
JSVPanelNode |
setOverlayVisibility(JSVPanelNode node) |
void |
setPropertiesFromPreferences(JSVPanel jsvp,
boolean includeMeasures)
Sets the display properties as specified from the preferences dialog or the
properties file
|
void |
setProperty(java.lang.String key,
java.lang.String value) |
void |
setRecentURL(java.lang.String filePath) |
void |
setReturnFromJmolModel(java.lang.String model) |
void |
setSelectedPanel(JSVPanel jsvp) |
JSVPanel |
setSpectrum(java.lang.String value) |
void |
setSpectrumNumber(int i)
Sets the spectrum to the specified block number
|
void |
setSplitPane(boolean TF) |
void |
showNotImplementedOptionPane()
Shows a dialog with the message "Not Yet Implemented"
|
void |
showPreferences() |
void |
showProperties() |
void |
syncLoad(java.lang.String filePath) |
void |
syncScript(java.lang.String peakScript)
precede |
void |
syncToJmol(java.lang.String msg) |
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 |
toggleOverlayKey() |
void |
updateBoolean(ScriptToken st,
boolean TF) |
void |
updateRecentMenus(java.lang.String filePath) |
void |
validateAndRepaint() |
void |
writeStatus(java.lang.String msg)
Writes a message to the status bar
|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleequals, getClass, hashCode, notify, notifyAll, wait, wait, waitrepaintsetVisiblepublic MainFrame(java.awt.Component jmolDisplay,
JSVInterface jmolOrAdvancedApplet)
jmolDisplay - jmolOrAdvancedApplet - public static void main(java.lang.String[] args)
public boolean isPro()
isPro in interface JSVAppletInterfacepublic boolean isSigned()
isSigned in interface JSVAppletInterfaceisSigned in interface ScriptInterfacepublic boolean getAutoCombine()
getAutoCombine in interface ScriptInterfacepublic boolean getAutoShowLegend()
getAutoShowLegend in interface ScriptInterfacepublic JDXSource getCurrentSource()
getCurrentSource in interface ScriptInterfacepublic int getFileCount()
getFileCount in interface ScriptInterfacepublic void setFileCount(int n)
setFileCount in interface ScriptInterfacepublic java.lang.String getIntegrationRatios()
getIntegrationRatios in interface ScriptInterfacepublic void setIntegrationRatios(java.lang.String value)
setIntegrationRatios in interface ScriptInterfacepublic JDXSpectrum.IRMode getIRMode()
getIRMode in interface ScriptInterfacepublic void setIRMode(JDXSpectrum.IRMode mode)
setIRMode in interface ScriptInterfacepublic void setLoadImaginary(boolean TF)
setLoadImaginary in interface ScriptInterfacepublic java.util.List<JSVPanelNode> getPanelNodes()
getPanelNodes in interface ScriptInterfacepublic Parameters getParameters()
getParameters in interface ScriptInterfacepublic java.lang.Object getPopupMenu()
getPopupMenu in interface ScriptInterfacepublic void setReturnFromJmolModel(java.lang.String model)
setReturnFromJmolModel in interface ScriptInterfacepublic java.lang.String getReturnFromJmolModel()
getReturnFromJmolModel in interface ScriptInterfacepublic JSVPanel getSelectedPanel()
getSelectedPanel in interface ScriptInterfacepublic java.lang.Object getSpectraTree()
getSpectraTree in interface ScriptInterfacepublic int incrementScriptLevelCount(int n)
incrementScriptLevelCount in interface ScriptInterfacepublic int incrementViewCount(int n)
incrementViewCount in interface ScriptInterfacepublic void awaken(boolean visible)
public void openDataOrFile(java.lang.String data,
java.lang.String name,
java.util.List<JDXSpectrum> specs,
java.lang.String url,
int firstSpec,
int lastSpec,
boolean isAppend)
openDataOrFile in interface ScriptInterfacepublic void setCurrentSource(JDXSource source)
setCurrentSource in interface ScriptInterfacepublic void setPropertiesFromPreferences(JSVPanel jsvp, boolean includeMeasures)
setPropertiesFromPreferences in interface ScriptInterfacejsvp - the display panelpublic void showNotImplementedOptionPane()
public void processCommand(java.lang.String script)
public boolean runScriptNow(java.lang.String peakScript)
runScriptNow in interface JSVAppletInterfacepublic void panelEvent(java.lang.Object eventObj)
panelEvent in interface PanelListenerpublic void setSelectedPanel(JSVPanel jsvp)
setSelectedPanel in interface ScriptInterfacepublic void sendPanelChange(JSVPanel jsvp)
sendPanelChange in interface ScriptInterfacepublic void setSplitPane(boolean TF)
public void enableToolbar(boolean isEnabled)
public void showPreferences()
public java.util.Map<java.lang.String,java.lang.Object> getProperty(java.lang.String key)
getProperty in interface JmolSyncInterfacepublic void register(java.lang.String appletID,
JmolSyncInterface jmolStatusListener)
register in interface JmolSyncInterfacepublic void syncToJmol(java.lang.String msg)
syncToJmol in interface ScriptInterfacepublic void syncScript(java.lang.String peakScript)
JSVAppletInterfacesyncScript in interface JSVAppletInterfacesyncScript in interface JmolSyncInterfacepublic void syncLoad(java.lang.String filePath)
syncLoad in interface ScriptInterfacepublic void validateAndRepaint()
validateAndRepaint in interface ScriptInterfacepublic void execClose(java.lang.String value,
boolean fromScript)
execClose in interface ScriptInterfacepublic void execHidden(boolean b)
execHidden in interface ScriptInterfacepublic java.lang.String execLoad(java.lang.String value)
execLoad in interface ScriptInterfacepublic java.lang.String execExport(JSVPanel jsvp, java.lang.String value)
execExport in interface ScriptInterfacepublic void execSetInterface(java.lang.String value)
execSetInterface in interface ScriptInterfacepublic void execScriptComplete(java.lang.String msg,
boolean isOK)
execScriptComplete in interface ScriptInterfacepublic JSVPanel setSpectrum(java.lang.String value)
setSpectrum in interface ScriptInterfacepublic void execSetAutoIntegrate(boolean b)
execSetAutoIntegrate in interface ScriptInterfacepublic PanelData getPanelData()
getPanelData in interface ScriptInterfacepublic JSVDialog getOverlayLegend(JSVPanel jsvp)
getOverlayLegend in interface ScriptInterfacepublic void addHighlight(double x1,
double x2,
int r,
int g,
int b,
int a)
JSVAppletInterfaceJSVPaneladdHighlight in interface JSVAppletInterfacex1 - 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 colorpublic java.lang.String exportSpectrum(java.lang.String type,
int n)
JSVAppletInterfaceexportSpectrum in interface JSVAppletInterfacepublic java.lang.String getCoordinate()
JSVAppletInterface
JSVPanelgetCoordinate in interface JSVAppletInterfacepublic java.lang.String getPropertyAsJSON(java.lang.String key)
getPropertyAsJSON in interface JSVAppletInterfacepublic java.util.Map<java.lang.String,java.lang.Object> getPropertyAsJavaObject(java.lang.String key)
getPropertyAsJavaObject in interface JSVAppletInterfacepublic java.lang.String getSolnColour()
JSVAppletInterfacegetSolnColour in interface JSVAppletInterfacepublic void loadInline(java.lang.String data)
JSVAppletInterfaceloadInline in interface JSVAppletInterfacedata - Stringpublic void setFilePath(java.lang.String tmpFilePath)
setFilePath in interface JSVAppletInterfacepublic void runScript(java.lang.String script)
runScript in interface JSVAppletInterfacerunScript in interface ScriptInterfacepublic void removeAllHighlights()
JSVAppletInterfaceJSVPanelremoveAllHighlights in interface JSVAppletInterfacepublic void removeHighlight(double x1,
double x2)
JSVAppletInterfaceJSVPanelremoveHighlight in interface JSVAppletInterfacex1 - the starting x valuex2 - the ending x valuepublic void reversePlot()
JSVAppletInterfaceJSVPanelreversePlot in interface JSVAppletInterfacepublic void setSpectrumNumber(int i)
JSVAppletInterfacesetSpectrumNumber in interface JSVAppletInterfacepublic void toggleCoordinate()
JSVAppletInterfaceJSVPaneltoggleCoordinate in interface JSVAppletInterfacepublic void toggleGrid()
JSVAppletInterfaceJSVPaneltoggleGrid in interface JSVAppletInterfacepublic void toggleIntegration()
JSVAppletInterfaceJSVPanel.toggleIntegration in interface JSVAppletInterfacepublic void execSetCallback(ScriptToken st, java.lang.String value)
execSetCallback in interface ScriptInterfacepublic void openFile(java.lang.String fileName,
boolean closeFirst)
fileName - closeFirst - public void showProperties()
showProperties in interface ScriptInterfacepublic void updateBoolean(ScriptToken st, boolean TF)
updateBoolean in interface ScriptInterfacepublic void enableStatus(boolean TF)
public void openURL()
public java.lang.String print(java.lang.String pdfFileName)
print in interface JSVAppletInterfaceprint in interface ScriptInterfacepublic void toggleOverlayKey()
public void checkCallbacks(java.lang.String title)
checkCallbacks in interface ScriptInterfacepublic JSVPanelNode setOverlayVisibility(JSVPanelNode node)
setOverlayVisibility in interface ScriptInterfacepublic void setNode(JSVPanelNode panelNode, boolean fromTree)
setNode in interface ScriptInterfacepublic void closeSource(JDXSource source)
JDXSource specified by sourcecloseSource in interface ScriptInterfacesource - the JDXSourcepublic void setRecentURL(java.lang.String filePath)
setRecentURL in interface ScriptInterfacepublic void writeStatus(java.lang.String msg)
writeStatus in interface JSVAppletInterfacewriteStatus in interface ScriptInterfacemsg - the messagepublic void setLoaded(java.lang.String fileName,
java.lang.String filePath)
setLoaded in interface ScriptInterfacepublic void updateRecentMenus(java.lang.String filePath)
updateRecentMenus in interface ScriptInterfacepublic void setMenuEnables(JSVPanelNode node, boolean isSplit)
setMenuEnables in interface ScriptInterfacepublic JDXSource createSource(java.lang.String data, java.lang.String filePath, java.net.URL base, int firstSpec, int lastSpec) throws java.lang.Exception
createSource in interface ScriptInterfacejava.lang.Exceptionpublic java.net.URL getDocumentBase()
getDocumentBase in interface ScriptInterfacepublic JSVPanel getNewJSVPanel(java.util.List<JDXSpectrum> specs)
getNewJSVPanel in interface ScriptInterfacepublic JSVPanel getNewJSVPanel(JDXSpectrum spec)
getNewJSVPanel in interface ScriptInterfacepublic JSVPanelNode getNewPanelNode(java.lang.String id, java.lang.String fileName, JDXSource source, JSVPanel jsvp)
getNewPanelNode in interface ScriptInterfacepublic void checkOverlay()
checkOverlay in interface ScriptInterfacepublic void setCursorObject(java.lang.Object c)
setCursorObject in interface ScriptInterfacepublic void execTest(java.lang.String value)
execTest in interface ScriptInterfacepublic void requestRepaint()
requestRepaint in interface ScriptInterfacepublic void repaintCompleted()
repaintCompleted in interface ScriptInterfacepublic void setProperty(java.lang.String key,
java.lang.String value)
setProperty in interface ScriptInterfacepublic java.lang.String getFileAsString(java.lang.String value)
getFileAsString in interface ScriptInterface