Class JmolPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openscience.jmol.app.jmolpanel.JmolPanel
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, JsonNioClient, SplashInterface
- Direct Known Subclasses:
Jmol, NMR_JmolPanel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassprotected static classclassprotected classTo shutdown when run as an application.classclassclassclassAn Action to copy the current image into the clipboard.classclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassNested classes/interfaces inherited from class JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyNested classes/interfaces inherited from interface JsonNioClient
JsonNioClient.TouchHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static booleanprotected Stringprotected static final Stringprotected static BannerFrameprotected JsonNioServerprotected static final Stringprotected static final Stringprotected JmolPanel.CopyImageActionprotected static final Stringprotected JmolPanel.CopyScriptActionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected JmolPanel.ExecuteScriptActionprotected static final Stringprotected JmolPanel.ExportActionprotected static final Stringprotected static final Stringprotected static final Stringprotected GaussianDialogstatic HistoryFileprotected Stringprotected booleanprotected JFrameprotected JmolJMEprotected static KioskFrameprotected MeasurementTableprotected JmolAdapterprotected StatusListenerprotected static final Stringprotected static final Stringprotected static intprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringstatic final intprotected JmolPanel.PasteClipboardActionprotected static final Stringstatic HistoryFileprotected JmolPanel.PovrayActionprotected static final Stringprotected PreferencesDialogprotected JmolPanel.PrintActionprotected static final Stringprotected intprotected intprotected org.openscience.jmol.app.jmolpanel.RecentFilesDialogprotected static final Stringprotected static final Stringprotected static final Dimensionprotected static final Stringprotected intprotected intprotected StatusBarprotected SurfaceToolprotected static final Stringprotected JmolPanel.SurfaceToolActionprotected static final Stringprotected JToolBarprotected JmolPanel.ToWebActionprotected static final Stringprotected JmolPanel.TwoDEditorActionprotected static final Stringprotected static final Stringprotected JmolPanel.ViewMeasurementTableActionprotected static final Stringprotected static final Stringprotected Stringprotected JmolPanel.WriteActionprotected static final StringFields inherited from class JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface JsonNioClient
TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddHelpMenuBar(JMenuBar menuBar) static voidaddJmolProperties(Properties props) static voidaddJmolProperty(String key, String value) static voidaddJmolWindowInfo(String name, Component window, Point border) Deprecated.static voidaddJmolWindowInnerInfo(String name, Component window, Dimension inner) protected voidaddMacrosMenu(JMenuBar menuBar) protected voidaddNormalMenuBar(JMenuBar menuBar) protected voidprotected voidprotected GuiMapcreateMenu(String key) Create a menu for the app.protected JMenuBarCreate the menubar for the app.createMenuItem(String cmd) This is the hook through which all menu items are created.protected StatusBarprotected JToolBarCreate the toolbar.protected AbstractButtonCreate a button to go inside of the toolbar.protected booleandoClose(boolean saveSize) protected ActionFetch the action that was created for the given command.protected JmolPlugingetAndRegisterPlugin(String name, String path) protected voidprotected ImageIconstatic ObjectgetInstanceWithParams(String name, Class<?>[] classes, Object... params) voidprotected static voidgetJavaConsole(Jmol jmol) Deprecated.static StringgetJmolProperty(String key, String defaultValue) static JsonNioServerprotected voidprotected JMenuItemgetMenuItem(String cmd) Fetch the menu item that was created for the given command.static StringgetPluginOption(String pluginName, String key, String defaultValue) getPreference(String key) protected StringgetStringX(String cmd) static FileReturns a new File referenced by the property 'user.dir', or null if the property is not defined.protected StringbooleanisServer()protected voidprotected JToolBarnewToolbar(String[] keys) voidnioClosed(JsonNioServer jns) /////// JSON/NIO SERVICE //////////voidnotifyFileOpen(String fullPathName, String title) voidnotifyGaussian(CBK type, Object[] data) voidnotifyGeneralCallback(CBK type, Object[] data, String strInfo) voidnotifyMeasure(Object[] data) voidnotifyMenu(String menuName) voidvoidvoidnotifyPreferences(Object[] data) voidnotifyServer(CBK type, Object[] data) voidprint()added print command, so that it can be used by RasmolScriptHandlervoidprocessNioMessage(byte[] packet) protected voidint[]resizeInnerPanel(String data) protected voidprotected voidvoidsendNioSyncRequest(Object data, int port, String strInfo) voidprotected voidprotected voidprotected voidsetFrameLocation(Point loc, JmolPanel parent) protected voidprotected StringsetMenuKeys(String key, String tokens) opportunity to adjust menus for a custom applicationprotected voidstatic voidsetPluginOption(String pluginName, String key, String value) voidprotected voidprotected voidprotected voidsetupDnD()protected voidvoidshowStatus(String message) voidMethods inherited from class JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class 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, updateMethods inherited from class 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, validateTreeMethods inherited from class 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 Details
-
historyFile
-
pluginFile
-
vwr
-
modelAdapter
-
jmolApp
-
status
-
startupWidth
protected int startupWidth -
startupHeight
protected int startupHeight -
appletContext
-
pcs
-
display
-
gaussianDialog
-
recentFiles
protected org.openscience.jmol.app.jmolpanel.RecentFilesDialog recentFiles -
atomSetChooser
-
frame
-
splash
-
javaConsoleframe
-
clientService
-
qualityJPG
protected int qualityJPG -
qualityPNG
protected int qualityPNG -
imageType
-
guimap
-
executeScriptAction
-
preferencesDialog
-
myStatusListener
-
surfaceTool
-
measurementTable
-
jmolJME
-
commands
-
toolbar
-
twoDEditorAction
-
exportAction
-
povrayAction
-
toWebAction
-
writeAction
-
printAction
-
copyImageAction
-
copyScriptAction
-
surfaceToolAction
-
pasteClipboardAction
-
viewMeasurementTableAction
-
vwrOptions
-
windowName
-
isPlugin
protected boolean isPlugin -
numWindows
protected static int numWindows -
kioskFrame
-
bannerFrame
-
allowJavaConsole
protected static boolean allowJavaConsole -
EDITOR_WINDOW_NAME
- See Also:
-
SCRIPT_WINDOW_NAME
- See Also:
-
FILE_OPEN_WINDOW_NAME
- See Also:
-
WEB_MAKER_WINDOW_NAME
- See Also:
-
SURFACETOOL_WINDOW_NAME
- See Also:
-
screenSize
-
newwinAction
- See Also:
-
openAction
- See Also:
-
openurlAction
- See Also:
-
openpdbAction
- See Also:
-
openmolAction
- See Also:
-
newAction
- See Also:
-
twoDEditorActionProperty
- See Also:
-
exportActionProperty
- See Also:
-
closeAction
- See Also:
-
exitAction
- See Also:
-
aboutAction
- See Also:
-
whatsnewAction
- See Also:
-
creditsAction
- See Also:
-
uguideAction
- See Also:
-
printActionProperty
- See Also:
-
recentFilesAction
- See Also:
-
povrayActionProperty
- See Also:
-
writeActionProperty
- See Also:
-
editorAction
- See Also:
-
consoleAction
- See Also:
-
toWebActionProperty
- See Also:
-
atomsetchooserAction
- See Also:
-
copyImageActionProperty
- See Also:
-
copyScriptActionProperty
- See Also:
-
surfaceToolActionProperty
- See Also:
-
pasteClipboardActionProperty
- See Also:
-
gaussianAction
- See Also:
-
resizeAction
- See Also:
-
OUTSOCKET
public static final int OUTSOCKET- See Also:
-
-
Constructor Details
-
JmolPanel
-
-
Method Details
-
getFrameActions
-
getStringX
-
getIconX
-
getWindowName
-
createGuiMap
-
createStatusBar
-
createToolBar
Create the toolbar. By default this reads the resource file for the definition of the toolbars.- Returns:
- The toolbar
-
newToolbar
-
createDisplayAndAddStatusListener
protected void createDisplayAndAddStatusListener() -
setupModelAdapterAndViewer
protected void setupModelAdapterAndViewer() -
getDialogs
protected void getDialogs() -
getMeasurementTable
protected void getMeasurementTable() -
setCommandHooks
protected void setCommandHooks() -
setupDisplay
protected void setupDisplay() -
setFrameLocation
-
setIntoFrame
protected void setIntoFrame() -
setupConsole
protected void setupConsole() -
setupDnD
protected void setupDnD() -
setAtomChooser
protected void setAtomChooser() -
launchMainFrame
protected void launchMainFrame() -
getJavaConsole
Deprecated. -
getJavaConsole
public void getJavaConsole() -
showStatus
- Specified by:
showStatusin interfaceSplashInterface
-
report
-
say
-
doClose
protected boolean doClose(boolean saveSize) -
saveWindowSizes
protected void saveWindowSizes() -
createMenuItem
-
getMenuItem
-
getAction
-
createToolbarButton
Create a button to go inside of the toolbar. By default this will load an image resource. The image filename is relative to the classpath (including the '.' directory if its a part of the classpath), and may either be in a JAR file or a separate file.- Parameters:
key- The key in the resource file to serve as the basis of lookups.- Returns:
- Button
-
createMenubar
Create the menubar for the app. By default this pulls the definition of the menu from the associated resource file.- Returns:
- Menubar
-
addPluginMenu
-
addMacrosMenu
-
addNormalMenuBar
-
addHelpMenuBar
-
createMenu
-
setMenuKeys
-
setMenuState
protected void setMenuState() -
getAndRegisterPlugin
-
getInstanceWithParams
-
print
public void print()added print command, so that it can be used by RasmolScriptHandler -
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
-
notifyFileOpen
-
resizeInnerPanel
-
nioClosed
/////// JSON/NIO SERVICE //////////- Specified by:
nioClosedin interfaceJsonNioClient
-
sendNioSyncRequest
-
getJsonNioServer
-
updateConsoleFont
public void updateConsoleFont() -
getPreference
-
getConsole
-
getJmolProperty
-
setPluginOption
-
getPluginOption
-
addJmolProperties
-
addJmolProperty
-
setStatus
-
addJmolWindowInfo
Deprecated.Deprecated -- use addJmolWindowInnerInfo(name,window,Dimension inner)- Parameters:
name-window-border-
-
addJmolWindowInnerInfo
-
processNioMessage
- Specified by:
processNioMessagein interfaceJsonNioClient- Throws:
Exception
-
serverCycle
public void serverCycle()- Specified by:
serverCyclein interfaceJsonNioClient
-
isServer
public boolean isServer() -
notifyServer
-
notifyNBO
-
notifyNBO
-
notifyGaussian
-
notifyMenu
-
notifyMeasure
-
notifyPreferences
-
notifyLanguage
public void notifyLanguage() -
notifyGeneralCallback
-