Class NMR_JmolPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.openscience.jmol.app.jmolpanel.JmolPanel
-
- org.openscience.jmol.app.janocchio.NMR_JmolPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,JsonNioClient
,SplashInterface
public class NMR_JmolPanel extends JmolPanel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
NMR_JmolPanel.AtomSetChooserAction
class
NMR_JmolPanel.DetachAppletAction
class
NMR_JmolPanel.JumpBestFrameAction
class
NMR_JmolPanel.LabelNmrAction
private class
NMR_JmolPanel.MoleculeDependentAction
(package private) class
NMR_JmolPanel.MyStatusListener
class
NMR_JmolPanel.ReadNamfisAction
class
NMR_JmolPanel.ReadNmrAction
class
NMR_JmolPanel.ReattachAppletAction
(package private) class
NMR_JmolPanel.SaveNmrAction
class
NMR_JmolPanel.ViewCoupleTableAction
class
NMR_JmolPanel.ViewNoeTableAction
class
NMR_JmolPanel.WriteNamfisAction
-
Nested classes/interfaces inherited from class org.openscience.jmol.app.jmolpanel.JmolPanel
JmolPanel.AboutAction, JmolPanel.ActionChangedListener, JmolPanel.AnimButton, JmolPanel.AppCloser, JmolPanel.CloseAction, JmolPanel.ConsoleAction, JmolPanel.CopyImageAction, JmolPanel.CopyScriptAction, JmolPanel.CreditsAction, JmolPanel.ExecuteScriptAction, JmolPanel.ExitAction, JmolPanel.ExportAction, JmolPanel.GaussianAction, JmolPanel.NewAction, JmolPanel.NewwinAction, JmolPanel.OpenAction, JmolPanel.OpenMolAction, JmolPanel.OpenPdbAction, JmolPanel.OpenUrlAction, JmolPanel.PasteClipboardAction, JmolPanel.PovrayAction, JmolPanel.PrintAction, JmolPanel.RecentFilesAction, JmolPanel.ResizeAction, JmolPanel.ScriptEditorAction, JmolPanel.ScriptWindowAction, JmolPanel.SurfaceToolAction, JmolPanel.ToWebAction, JmolPanel.UguideAction, JmolPanel.ViewMeasurementTableAction, JmolPanel.WhatsNewAction, JmolPanel.WriteAction
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from interface org.openscience.jmol.app.jsonkiosk.JsonNioClient
JsonNioClient.TouchHandler
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.awt.Point
border
static java.lang.String
chemFileProperty
CoupleTable
coupleTable
protected static java.io.File
currentDir
private static java.lang.String
detachAppletAction
(package private) javax.swing.JFileChooser
exportChooser
FrameCounter
frameCounter
FrameDeltaDisplay
frameDeltaDisplay
(package private) static java.lang.Boolean
haveBorder
(package private) static java.util.Set<java.lang.String>
htGuiChanges
protected java.util.Map<java.lang.String,java.lang.Thread>
htMessageCallbacks
(package private) boolean
isApplet
private static java.lang.String
jumpBestFrameAction
private static java.lang.String
labelNmrAction
LabelSetter
labelSetter
javax.swing.JSplitPane
mainSplitPane
(package private) static int
MIN_SIZE
(package private) NmrApplet
nmrApplet
private NMR_DisplayPanel
nmrDisplay
private NmrGuiMap
nmrguimap
NoeTable
noeTable
(package private) FileChooser
openChooser
PopulationDisplay
populationDisplay
private static java.lang.String
readNamfisAction
(package private) javax.swing.JFileChooser
readNamfisChooser
private static java.lang.String
readNmrAction
(package private) javax.swing.JFileChooser
readNmrChooser
private static java.lang.String
reattachAppletAction
(package private) javax.swing.JFileChooser
saveNamfisChooser
private static java.lang.String
saveNmrAction
(package private) javax.swing.JFileChooser
saveNmrChooser
private static java.lang.String
writeNamfisAction
-
Fields inherited from class org.openscience.jmol.app.jmolpanel.JmolPanel
aboutAction, allowJavaConsole, appletContext, atomSetChooser, atomsetchooserAction, bannerFrame, clientService, closeAction, commands, consoleAction, consoleframe, copyImageAction, copyImageActionProperty, copyScriptAction, copyScriptActionProperty, creditsAction, display, EDITOR_WINDOW_NAME, editorAction, executeScriptAction, exitAction, exportAction, exportActionProperty, FILE_OPEN_WINDOW_NAME, frame, gaussianAction, gaussianDialog, guimap, historyFile, imageType, isPlugin, jmolApp, kioskFrame, measurementTable, menuItems, modelAdapter, myStatusListener, newAction, newwinAction, numWindows, openAction, openmolAction, openpdbAction, openurlAction, OUTSOCKET, pasteClipboardAction, pasteClipboardActionProperty, pcs, pluginFile, povrayAction, povrayActionProperty, preferencesDialog, printAction, printActionProperty, qualityJPG, qualityPNG, recentFiles, recentFilesAction, resizeAction, screenSize, SCRIPT_WINDOW_NAME, splash, startupHeight, startupWidth, status, surfaceTool, SURFACETOOL_WINDOW_NAME, surfaceToolAction, surfaceToolActionProperty, toolbar, toWebAction, toWebActionProperty, uguideAction, viewMeasurementTableAction, vwr, vwrOptions, WEB_MAKER_WINDOW_NAME, whatsnewAction, windowName, writeAction, writeActionProperty
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description NMR_JmolPanel(JmolApp jmolApp, Splash splash, javax.swing.JFrame frame, Jmol parent, int startupWidth, int startupHeight, java.util.Map<java.lang.String,java.lang.Object> vwrOptions, java.awt.Point loc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkLoadAndRun(java.lang.String structureFile, java.lang.Object fileData, java.lang.String fileType)
(package private) void
clearViewerSelection()
protected void
createDisplayAndAddStatusListener()
protected GuiMap
createGuiMap()
protected StatusBar
createStatusBar()
protected javax.swing.JToolBar
createToolBar()
Create the toolbar.protected boolean
doClose(boolean saveSize)
protected static void
dumpContainer(java.awt.Container c, java.lang.String s)
private static java.lang.String
firstLineOf(java.lang.String s)
(package private) javajs.util.BS[]
getAllMolecules()
java.lang.String
getCurrentStructureFile()
protected void
getDialogs()
(package private) NmrMolecule
getDistanceJMolecule(javajs.util.BS mol, java.lang.String[] labelArray, boolean forNOE)
protected java.util.List<javax.swing.Action>
getFrameActions()
int
getFrameAtomCount()
protected javax.swing.ImageIcon
getIconX(java.lang.String img)
void
getJavaConsole()
protected void
getMeasurementTable()
javax.swing.JMenuItem
getMenuItem(java.lang.String name)
Fetch the menu item that was created for the given command.int
getMinindex()
protected java.lang.String
getStringX(java.lang.String cmd)
static java.io.File
getUserDirectory()
Returns a new File referenced by the property 'user.dir', or null if the property is not defined.(package private) Atom[]
getViewerMeasurement(int vRow, int type)
(package private) int
getViewerRow(int row, int type)
protected java.lang.String
getWindowName()
protected void
launchMainFrame()
(package private) void
notifyScriptCallback(java.lang.String script)
void
readNmrData(java.io.File file)
void
readNmrDataJSON(java.io.File file)
(package private) void
runScriptWithCallback(java.lang.Thread t, java.lang.String command)
protected void
saveWindowSizes()
protected void
setAtomChooser()
(package private) void
setCurrentDirectoryAll(java.io.File cDir)
protected void
setFrameLocation(java.awt.Point loc, JmolPanel parent)
protected void
setIntoFrame()
protected java.lang.String
setMenuKeys(java.lang.String key, java.lang.String tokens)
opportunity to adjust menus for a custom applicationprotected void
setupConsole()
protected void
setupDisplay()
protected void
setupDnD()
protected void
setupModelAdapterAndViewer()
protected static java.lang.String[]
tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries.void
writeNmrData(java.io.File file)
-
Methods inherited from class org.openscience.jmol.app.jmolpanel.JmolPanel
addHelpMenuBar, addJmolProperties, addJmolProperty, addJmolWindowInfo, addJmolWindowInnerInfo, addMacrosMenu, addNormalMenuBar, addPluginMenu, createMenu, createMenubar, createMenuItem, createToolbarButton, getAction, getAndRegisterPlugin, getInstanceWithParams, getJavaConsole, getJmolProperty, getJsonNioServer, getPluginOption, getPreference, isServer, newToolbar, nioClosed, nioSync, print, processNioMessage, report, say, serverCycle, setCommandHooks, setMenuState, setPluginOption, setStatus, showStatus, syncScript, updateConsoleFont
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
MIN_SIZE
static final int MIN_SIZE
- See Also:
- Constant Field Values
-
nmrDisplay
private NMR_DisplayPanel nmrDisplay
-
mainSplitPane
public javax.swing.JSplitPane mainSplitPane
-
noeTable
public NoeTable noeTable
-
coupleTable
public CoupleTable coupleTable
-
frameCounter
public FrameCounter frameCounter
-
labelSetter
public LabelSetter labelSetter
-
populationDisplay
public PopulationDisplay populationDisplay
-
frameDeltaDisplay
public FrameDeltaDisplay frameDeltaDisplay
-
currentDir
protected static java.io.File currentDir
-
openChooser
FileChooser openChooser
-
exportChooser
javax.swing.JFileChooser exportChooser
-
saveNmrChooser
javax.swing.JFileChooser saveNmrChooser
-
readNmrChooser
javax.swing.JFileChooser readNmrChooser
-
saveNamfisChooser
javax.swing.JFileChooser saveNamfisChooser
-
readNamfisChooser
javax.swing.JFileChooser readNamfisChooser
-
nmrApplet
NmrApplet nmrApplet
-
isApplet
boolean isApplet
-
nmrguimap
private NmrGuiMap nmrguimap
-
border
static java.awt.Point border
-
haveBorder
static java.lang.Boolean haveBorder
-
htGuiChanges
static java.util.Set<java.lang.String> htGuiChanges
-
saveNmrAction
private static final java.lang.String saveNmrAction
- See Also:
- Constant Field Values
-
readNmrAction
private static final java.lang.String readNmrAction
- See Also:
- Constant Field Values
-
detachAppletAction
private static final java.lang.String detachAppletAction
- See Also:
- Constant Field Values
-
reattachAppletAction
private static final java.lang.String reattachAppletAction
- See Also:
- Constant Field Values
-
writeNamfisAction
private static final java.lang.String writeNamfisAction
- See Also:
- Constant Field Values
-
readNamfisAction
private static final java.lang.String readNamfisAction
- See Also:
- Constant Field Values
-
jumpBestFrameAction
private static final java.lang.String jumpBestFrameAction
- See Also:
- Constant Field Values
-
labelNmrAction
private static final java.lang.String labelNmrAction
- See Also:
- Constant Field Values
-
chemFileProperty
public static final java.lang.String chemFileProperty
- See Also:
- Constant Field Values
-
htMessageCallbacks
protected java.util.Map<java.lang.String,java.lang.Thread> htMessageCallbacks
-
-
Method Detail
-
getMenuItem
public javax.swing.JMenuItem getMenuItem(java.lang.String name)
Description copied from class:JmolPanel
Fetch the menu item that was created for the given command.- Overrides:
getMenuItem
in classJmolPanel
- Parameters:
name
- Name of the action.- Returns:
- item created for the given command or null if one wasn't created.
-
getDistanceJMolecule
NmrMolecule getDistanceJMolecule(javajs.util.BS mol, java.lang.String[] labelArray, boolean forNOE)
-
getAllMolecules
javajs.util.BS[] getAllMolecules()
-
getWindowName
protected java.lang.String getWindowName()
- Overrides:
getWindowName
in classJmolPanel
-
getFrameActions
protected java.util.List<javax.swing.Action> getFrameActions()
- Overrides:
getFrameActions
in classJmolPanel
- Returns:
- A list of Actions that is understood by the upper level application
-
getStringX
protected java.lang.String getStringX(java.lang.String cmd)
- Overrides:
getStringX
in classJmolPanel
-
getIconX
protected javax.swing.ImageIcon getIconX(java.lang.String img)
-
createGuiMap
protected GuiMap createGuiMap()
- Overrides:
createGuiMap
in classJmolPanel
-
createStatusBar
protected StatusBar createStatusBar()
- Overrides:
createStatusBar
in classJmolPanel
-
createToolBar
protected javax.swing.JToolBar createToolBar()
Description copied from class:JmolPanel
Create the toolbar. By default this reads the resource file for the definition of the toolbars.- Overrides:
createToolBar
in classJmolPanel
- Returns:
- The toolbar
-
createDisplayAndAddStatusListener
protected void createDisplayAndAddStatusListener()
- Overrides:
createDisplayAndAddStatusListener
in classJmolPanel
-
setupModelAdapterAndViewer
protected void setupModelAdapterAndViewer()
- Overrides:
setupModelAdapterAndViewer
in classJmolPanel
-
getDialogs
protected void getDialogs()
- Overrides:
getDialogs
in classJmolPanel
-
getMeasurementTable
protected void getMeasurementTable()
- Overrides:
getMeasurementTable
in classJmolPanel
-
setupDisplay
protected void setupDisplay()
- Overrides:
setupDisplay
in classJmolPanel
-
setFrameLocation
protected void setFrameLocation(java.awt.Point loc, JmolPanel parent)
- Overrides:
setFrameLocation
in classJmolPanel
-
setIntoFrame
protected void setIntoFrame()
- Overrides:
setIntoFrame
in classJmolPanel
-
setupConsole
protected void setupConsole()
- Overrides:
setupConsole
in classJmolPanel
-
setAtomChooser
protected void setAtomChooser()
- Overrides:
setAtomChooser
in classJmolPanel
-
launchMainFrame
protected void launchMainFrame()
- Overrides:
launchMainFrame
in classJmolPanel
-
saveWindowSizes
protected void saveWindowSizes()
- Overrides:
saveWindowSizes
in classJmolPanel
-
getJavaConsole
public void getJavaConsole()
- Overrides:
getJavaConsole
in classJmolPanel
-
setMenuKeys
protected java.lang.String setMenuKeys(java.lang.String key, java.lang.String tokens)
Description copied from class:JmolPanel
opportunity to adjust menus for a custom application- Overrides:
setMenuKeys
in classJmolPanel
- Returns:
- possibly changed token string
-
setCurrentDirectoryAll
void setCurrentDirectoryAll(java.io.File cDir)
-
getMinindex
public int getMinindex()
-
getCurrentStructureFile
public java.lang.String getCurrentStructureFile()
-
getUserDirectory
public static java.io.File getUserDirectory()
Returns a new File referenced by the property 'user.dir', or null if the property is not defined.- Returns:
- a File to the user directory
-
dumpContainer
protected static void dumpContainer(java.awt.Container c, java.lang.String s)
-
tokenize
protected static java.lang.String[] tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries. This is useful for trying to get an array of strings out of the resource file.- Parameters:
input
- String to chop- Returns:
- Strings chopped on whitespace boundries
-
writeNmrData
public void writeNmrData(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
readNmrData
public void readNmrData(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readNmrDataJSON
public void readNmrDataJSON(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
checkLoadAndRun
private void checkLoadAndRun(java.lang.String structureFile, java.lang.Object fileData, java.lang.String fileType)
-
firstLineOf
private static java.lang.String firstLineOf(java.lang.String s)
-
runScriptWithCallback
void runScriptWithCallback(java.lang.Thread t, java.lang.String command)
-
notifyScriptCallback
void notifyScriptCallback(java.lang.String script)
-
getFrameAtomCount
public int getFrameAtomCount()
-
getViewerMeasurement
Atom[] getViewerMeasurement(int vRow, int type)
-
getViewerRow
int getViewerRow(int row, int type)
-
clearViewerSelection
void clearViewerSelection()
-
-