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 TypeClassDescriptionclass
protected static class
class
protected class
To shutdown when run as an application.class
class
class
class
An Action to copy the current image into the clipboard.class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Nested classes/interfaces inherited from interface org.openscience.jmol.app.jsonkiosk.JsonNioClient
JsonNioClient.TouchHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static boolean
protected String
protected static final String
protected static BannerFrame
protected JsonNioServer
protected static final String
protected static final String
protected JFrame
protected JmolPanel.CopyImageAction
protected static final String
protected JmolPanel.CopyScriptAction
protected static final String
protected static final String
protected static final String
protected static final String
protected JmolPanel.ExecuteScriptAction
protected static final String
protected JmolPanel.ExportAction
protected static final String
protected static final String
protected static final String
protected GaussianDialog
static HistoryFile
protected String
protected boolean
protected JmolJME
protected static KioskFrame
protected MeasurementTable
protected JmolAdapter
protected StatusListener
protected static final String
protected static final String
protected static int
protected static final String
protected static final String
protected static final String
protected static final String
static final int
protected JmolPanel.PasteClipboardAction
protected static final String
static HistoryFile
protected JmolPanel.PovrayAction
protected static final String
protected PreferencesDialog
protected JmolPanel.PrintAction
protected static final String
protected int
protected int
protected org.openscience.jmol.app.jmolpanel.RecentFilesDialog
protected static final String
protected static final String
protected static final Dimension
protected static final String
protected int
protected int
protected StatusBar
protected SurfaceTool
protected static final String
protected JmolPanel.SurfaceToolAction
protected static final String
protected JToolBar
protected JmolPanel.ToWebAction
protected static final String
protected JmolPanel.TwoDEditorAction
protected static final String
protected static final String
protected JmolPanel.ViewMeasurementTableAction
protected static final String
protected static final String
protected String
protected JmolPanel.WriteAction
protected static final String
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
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface org.openscience.jmol.app.jsonkiosk.JsonNioClient
TYPES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addHelpMenuBar
(JMenuBar menuBar) static void
addJmolProperties
(Properties props) static void
addJmolProperty
(String key, String value) static void
addJmolWindowInfo
(String name, Component window, Point border) Deprecated.static void
addJmolWindowInnerInfo
(String name, Component window, Dimension inner) protected void
addMacrosMenu
(JMenuBar menuBar) protected void
addNormalMenuBar
(JMenuBar menuBar) protected void
protected void
protected GuiMap
createMenu
(String key) Create a menu for the app.protected JMenuBar
Create the menubar for the app.createMenuItem
(String cmd) This is the hook through which all menu items are created.protected StatusBar
protected JToolBar
Create the toolbar.protected AbstractButton
Create a button to go inside of the toolbar.protected boolean
doClose
(boolean saveSize) protected Action
Fetch the action that was created for the given command.protected JmolPlugin
getAndRegisterPlugin
(String name, String path) protected void
protected ImageIcon
static Object
getInstanceWithParams
(String name, Class<?>[] classes, Object... params) void
protected static void
getJavaConsole
(Jmol jmol) Deprecated.static String
getJmolProperty
(String key, String defaultValue) static JsonNioServer
protected void
protected JMenuItem
getMenuItem
(String cmd) Fetch the menu item that was created for the given command.static String
getPluginOption
(String pluginName, String key, String defaultValue) getPreference
(String key) protected String
getStringX
(String cmd) static File
Returns a new File referenced by the property 'user.dir', or null if the property is not defined.protected String
boolean
isServer()
protected void
protected JToolBar
newToolbar
(String[] keys) void
nioClosed
(JsonNioServer jns) void
print()
added print command, so that it can be used by RasmolScriptHandlervoid
processNioMessage
(byte[] packet) protected void
protected void
protected void
void
protected void
protected void
protected void
setFrameLocation
(Point loc, JmolPanel parent) protected void
protected String
setMenuKeys
(String key, String tokens) opportunity to adjust menus for a custom applicationprotected void
static void
setPluginOption
(String pluginName, String key, String value) void
protected void
protected void
protected void
setupDnD()
protected void
void
showStatus
(String message) void
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 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
-
consoleframe
-
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
- Returns:
- A list of Actions that is understood by the upper level application
-
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:
showStatus
in interfaceSplashInterface
-
report
-
say
-
doClose
protected boolean doClose(boolean saveSize) -
saveWindowSizes
protected void saveWindowSizes() -
createMenuItem
This is the hook through which all menu items are created. It registers the result with the menuitem hashtable so that it can be fetched with getMenuItem().- Parameters:
cmd
-- Returns:
- Menu item created
- See Also:
-
getMenuItem
Fetch the menu item that was created for the given command.- Parameters:
cmd
- Name of the action.- Returns:
- item created for the given command or null if one wasn't created.
-
getAction
Fetch the action that was created for the given command.- Parameters:
cmd
- Name of the action.- Returns:
- The action
-
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
Create a menu for the app. By default this pulls the definition of the menu from the associated resource file.- Parameters:
key
-- Returns:
- Menu created
-
setMenuKeys
opportunity to adjust menus for a custom application- Parameters:
key
-tokens
-- Returns:
- possibly changed token string
-
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
-
nioClosed
- Specified by:
nioClosed
in interfaceJsonNioClient
-
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:
processNioMessage
in interfaceJsonNioClient
- Throws:
Exception
-
serverCycle
public void serverCycle()- Specified by:
serverCycle
in interfaceJsonNioClient
-
isServer
public boolean isServer()
-