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:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,JsonNioClient
,SplashInterface
- Direct Known Subclasses:
Jmol
,NMR_JmolPanel
public class JmolPanel extends javax.swing.JPanel implements SplashInterface, JsonNioClient
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
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 protected static java.lang.String
aboutAction
private static boolean
addAtomChooser
private static boolean
addMacrosMenu
private static boolean
addPreferencesDialog
private static boolean
allowGaussian
protected static boolean
allowJavaConsole
private static boolean
allowPreferences
private static boolean
allowRecentFiles
protected java.lang.String
appletContext
AtomSetChooser
atomSetChooser
protected static java.lang.String
atomsetchooserAction
protected static BannerFrame
bannerFrame
(package private) static java.lang.String
chemFileProperty
protected JsonNioServer
clientService
protected static java.lang.String
closeAction
protected java.util.Map<java.lang.String,javax.swing.Action>
commands
protected static java.lang.String
consoleAction
protected javax.swing.JFrame
consoleframe
protected JmolPanel.CopyImageAction
copyImageAction
protected static java.lang.String
copyImageActionProperty
protected JmolPanel.CopyScriptAction
copyScriptAction
protected static java.lang.String
copyScriptActionProperty
protected static java.lang.String
creditsAction
DisplayPanel
display
protected static java.lang.String
EDITOR_WINDOW_NAME
protected static java.lang.String
editorAction
protected JmolPanel.ExecuteScriptAction
executeScriptAction
protected static java.lang.String
exitAction
protected JmolPanel.ExportAction
exportAction
protected static java.lang.String
exportActionProperty
protected static java.lang.String
FILE_OPEN_WINDOW_NAME
javax.swing.JFrame
frame
protected static java.lang.String
gaussianAction
protected GaussianDialog
gaussianDialog
GuiMap
guimap
static HistoryFile
historyFile
(package private) static java.lang.String[]
imageChoices
(package private) static java.lang.String[]
imageExtensions
protected java.lang.String
imageType
protected boolean
isPlugin
JmolApp
jmolApp
protected static KioskFrame
kioskFrame
protected MeasurementTable
measurementTable
private javax.swing.JMenuBar
menubar
protected java.util.Map<java.lang.String,javax.swing.JMenuItem>
menuItems
protected JmolAdapter
modelAdapter
protected StatusListener
myStatusListener
protected static java.lang.String
newAction
protected static java.lang.String
newwinAction
protected static int
numWindows
protected static java.lang.String
openAction
protected static java.lang.String
openmolAction
protected static java.lang.String
openpdbAction
protected static java.lang.String
openurlAction
static int
OUTSOCKET
protected JmolPanel.PasteClipboardAction
pasteClipboardAction
protected static java.lang.String
pasteClipboardActionProperty
java.beans.PropertyChangeSupport
pcs
static HistoryFile
pluginFile
(package private) javax.swing.JMenu
pluginMenu
(package private) java.util.Map<java.lang.String,JmolPlugin>
plugins
(package private) boolean
pluginsSet
protected JmolPanel.PovrayAction
povrayAction
protected static java.lang.String
povrayActionProperty
protected PreferencesDialog
preferencesDialog
protected JmolPanel.PrintAction
printAction
protected static java.lang.String
printActionProperty
protected int
qualityJPG
protected int
qualityPNG
protected RecentFilesDialog
recentFiles
protected static java.lang.String
recentFilesAction
protected static java.lang.String
resizeAction
protected static java.awt.Dimension
screenSize
protected static java.lang.String
SCRIPT_WINDOW_NAME
private JsonNioServer
serverService
SplashInterface
splash
protected int
startupHeight
protected int
startupWidth
protected StatusBar
status
protected SurfaceTool
surfaceTool
protected static java.lang.String
SURFACETOOL_WINDOW_NAME
protected JmolPanel.SurfaceToolAction
surfaceToolAction
protected static java.lang.String
surfaceToolActionProperty
protected javax.swing.JToolBar
toolbar
private JsonNioClient.TouchHandler
touchHandler
protected JmolPanel.ToWebAction
toWebAction
protected static java.lang.String
toWebActionProperty
private java.lang.String
TYPES
protected static java.lang.String
uguideAction
protected JmolPanel.ViewMeasurementTableAction
viewMeasurementTableAction
Viewer
vwr
protected java.util.Map<java.lang.String,java.lang.Object>
vwrOptions
protected static java.lang.String
WEB_MAKER_WINDOW_NAME
(package private) WebExport
webExport
protected static java.lang.String
whatsnewAction
protected java.lang.String
windowName
protected JmolPanel.WriteAction
writeAction
protected static java.lang.String
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addHelpMenuBar(javax.swing.JMenuBar menuBar)
static void
addJmolProperties(java.util.Properties props)
static void
addJmolProperty(java.lang.String key, java.lang.String value)
static void
addJmolWindowInfo(java.lang.String name, java.awt.Component window, java.awt.Point border)
Deprecated.static void
addJmolWindowInnerInfo(java.lang.String name, java.awt.Component window, java.awt.Dimension inner)
protected void
addMacrosMenu(javax.swing.JMenuBar menuBar)
protected void
addNormalMenuBar(javax.swing.JMenuBar menuBar)
protected void
addPluginMenu(javax.swing.JMenuBar mb)
protected void
createDisplayAndAddStatusListener()
protected GuiMap
createGuiMap()
(package private) java.lang.String
createImageStatus(java.lang.String fileName, java.lang.String type, java.lang.Object text_or_bytes, int quality)
Starting with Jmol 11.8.RC5, this is just informational if type == null and null is returned, then it means "Jmol, you handle it"javax.swing.JMenu
createMenu(java.lang.String key)
Create a menu for the app.protected javax.swing.JMenuBar
createMenubar()
Create the menubar for the app.javax.swing.JMenuItem
createMenuItem(java.lang.String cmd)
This is the hook through which all menu items are created.protected StatusBar
createStatusBar()
(package private) void
createSurfaceTool()
protected javax.swing.JToolBar
createToolBar()
Create the toolbar.protected javax.swing.AbstractButton
createToolbarButton(java.lang.String key)
Create a button to go inside of the toolbar.(package private) void
createWebExport()
(package private) void
dispose(javax.swing.JFrame f, boolean saveSize)
protected boolean
doClose(boolean saveSize)
(package private) void
doNew()
protected javax.swing.Action
getAction(java.lang.String cmd)
Fetch the action that was created for the given command.protected JmolPlugin
getAndRegisterPlugin(java.lang.String name, java.lang.String path)
AppConsole
getConsole()
protected void
getDialogs()
protected java.util.List<javax.swing.Action>
getFrameActions()
protected javax.swing.ImageIcon
getIconX(java.lang.String img)
static java.lang.Object
getInstanceWithParams(java.lang.String name, java.lang.Class<?>[] classes, java.lang.Object... params)
void
getJavaConsole()
protected static void
getJavaConsole(Jmol jmol)
Deprecated.static java.lang.String
getJmolProperty(java.lang.String key, java.lang.String defaultValue)
static JsonNioServer
getJsonNioServer()
protected void
getMeasurementTable()
protected javax.swing.JMenuItem
getMenuItem(java.lang.String cmd)
Fetch the menu item that was created for the given command.static java.lang.String
getPluginOption(java.lang.String pluginName, java.lang.String key, java.lang.String defaultValue)
java.lang.Object
getPreference(java.lang.String key)
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.protected java.lang.String
getWindowName()
boolean
isServer()
protected void
launchMainFrame()
protected javax.swing.JToolBar
newToolbar(java.lang.String[] keys)
void
nioClosed(JsonNioServer jns)
void
nioSync(java.util.Map<java.lang.String,java.lang.Object> json, JsonNioClient.TouchHandler handler)
process touch or gesture commands driven by hardware.(package private) void
notifyFileOpen(java.lang.String fullPathName, java.lang.String title)
(package private) void
openFile()
void
print()
added print command, so that it can be used by RasmolScriptHandlervoid
processNioMessage(byte[] packet)
protected void
report(java.lang.String str)
(package private) void
resizeDisplay(int width, int height)
(package private) int[]
resizeInnerPanel(java.lang.String data)
protected void
saveWindowSizes()
protected void
say(java.lang.String message)
(package private) void
sendNioSyncRequest(java.lang.Object data, int port, java.lang.String strInfo)
void
serverCycle()
protected void
setAtomChooser()
protected void
setCommandHooks()
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 application(package private) void
setMenuNBO(javax.swing.JMenu item)
protected void
setMenuState()
static void
setPluginOption(java.lang.String pluginName, java.lang.String key, java.lang.String value)
(package private) void
setPlugins()
void
setStatus(int pos, java.lang.String msg)
protected void
setupConsole()
protected void
setupDisplay()
protected void
setupDnD()
protected void
setupModelAdapterAndViewer()
(package private) void
showPlugin(java.lang.String name, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> jmolOptions)
void
showStatus(java.lang.String message)
(package private) void
startNBO(java.util.Map<java.lang.String,java.lang.Object> jmolOptions)
void
syncScript(java.lang.String script)
void
updateConsoleFont()
(package private) void
updateLabels()
-
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
-
historyFile
public static HistoryFile historyFile
-
pluginFile
public static HistoryFile pluginFile
-
addPreferencesDialog
private static final boolean addPreferencesDialog
-
addMacrosMenu
private static final boolean addMacrosMenu
-
allowRecentFiles
private static final boolean allowRecentFiles
-
addAtomChooser
private static final boolean addAtomChooser
-
allowPreferences
private static final boolean allowPreferences
-
allowGaussian
private static final boolean allowGaussian
-
vwr
public Viewer vwr
-
modelAdapter
protected JmolAdapter modelAdapter
-
jmolApp
public JmolApp jmolApp
-
status
protected StatusBar status
-
startupWidth
protected int startupWidth
-
startupHeight
protected int startupHeight
-
serverService
private JsonNioServer serverService
-
appletContext
protected java.lang.String appletContext
-
pcs
public java.beans.PropertyChangeSupport pcs
-
display
public DisplayPanel display
-
gaussianDialog
protected GaussianDialog gaussianDialog
-
recentFiles
protected RecentFilesDialog recentFiles
-
atomSetChooser
public AtomSetChooser atomSetChooser
-
frame
public javax.swing.JFrame frame
-
splash
public SplashInterface splash
-
consoleframe
protected javax.swing.JFrame consoleframe
-
clientService
protected JsonNioServer clientService
-
qualityJPG
protected int qualityJPG
-
qualityPNG
protected int qualityPNG
-
imageType
protected java.lang.String imageType
-
guimap
public GuiMap guimap
-
executeScriptAction
protected JmolPanel.ExecuteScriptAction executeScriptAction
-
preferencesDialog
protected PreferencesDialog preferencesDialog
-
myStatusListener
protected StatusListener myStatusListener
-
surfaceTool
protected SurfaceTool surfaceTool
-
measurementTable
protected MeasurementTable measurementTable
-
commands
protected java.util.Map<java.lang.String,javax.swing.Action> commands
-
menuItems
protected java.util.Map<java.lang.String,javax.swing.JMenuItem> menuItems
-
toolbar
protected javax.swing.JToolBar toolbar
-
exportAction
protected JmolPanel.ExportAction exportAction
-
povrayAction
protected JmolPanel.PovrayAction povrayAction
-
toWebAction
protected JmolPanel.ToWebAction toWebAction
-
writeAction
protected JmolPanel.WriteAction writeAction
-
printAction
protected JmolPanel.PrintAction printAction
-
copyImageAction
protected JmolPanel.CopyImageAction copyImageAction
-
copyScriptAction
protected JmolPanel.CopyScriptAction copyScriptAction
-
surfaceToolAction
protected JmolPanel.SurfaceToolAction surfaceToolAction
-
pasteClipboardAction
protected JmolPanel.PasteClipboardAction pasteClipboardAction
-
viewMeasurementTableAction
protected JmolPanel.ViewMeasurementTableAction viewMeasurementTableAction
-
vwrOptions
protected java.util.Map<java.lang.String,java.lang.Object> vwrOptions
-
windowName
protected java.lang.String windowName
-
isPlugin
protected boolean isPlugin
-
menubar
private javax.swing.JMenuBar menubar
-
numWindows
protected static int numWindows
-
kioskFrame
protected static KioskFrame kioskFrame
-
bannerFrame
protected static BannerFrame bannerFrame
-
allowJavaConsole
protected static boolean allowJavaConsole
-
EDITOR_WINDOW_NAME
protected static final java.lang.String EDITOR_WINDOW_NAME
- See Also:
- Constant Field Values
-
SCRIPT_WINDOW_NAME
protected static final java.lang.String SCRIPT_WINDOW_NAME
- See Also:
- Constant Field Values
-
FILE_OPEN_WINDOW_NAME
protected static final java.lang.String FILE_OPEN_WINDOW_NAME
- See Also:
- Constant Field Values
-
WEB_MAKER_WINDOW_NAME
protected static final java.lang.String WEB_MAKER_WINDOW_NAME
- See Also:
- Constant Field Values
-
SURFACETOOL_WINDOW_NAME
protected static final java.lang.String SURFACETOOL_WINDOW_NAME
- See Also:
- Constant Field Values
-
screenSize
protected static final java.awt.Dimension screenSize
-
newwinAction
protected static final java.lang.String newwinAction
- See Also:
- Constant Field Values
-
openAction
protected static final java.lang.String openAction
- See Also:
- Constant Field Values
-
openurlAction
protected static final java.lang.String openurlAction
- See Also:
- Constant Field Values
-
openpdbAction
protected static final java.lang.String openpdbAction
- See Also:
- Constant Field Values
-
openmolAction
protected static final java.lang.String openmolAction
- See Also:
- Constant Field Values
-
newAction
protected static final java.lang.String newAction
- See Also:
- Constant Field Values
-
exportActionProperty
protected static final java.lang.String exportActionProperty
- See Also:
- Constant Field Values
-
closeAction
protected static final java.lang.String closeAction
- See Also:
- Constant Field Values
-
exitAction
protected static final java.lang.String exitAction
- See Also:
- Constant Field Values
-
aboutAction
protected static final java.lang.String aboutAction
- See Also:
- Constant Field Values
-
whatsnewAction
protected static final java.lang.String whatsnewAction
- See Also:
- Constant Field Values
-
creditsAction
protected static final java.lang.String creditsAction
- See Also:
- Constant Field Values
-
uguideAction
protected static final java.lang.String uguideAction
- See Also:
- Constant Field Values
-
printActionProperty
protected static final java.lang.String printActionProperty
- See Also:
- Constant Field Values
-
recentFilesAction
protected static final java.lang.String recentFilesAction
- See Also:
- Constant Field Values
-
povrayActionProperty
protected static final java.lang.String povrayActionProperty
- See Also:
- Constant Field Values
-
writeActionProperty
protected static final java.lang.String writeActionProperty
- See Also:
- Constant Field Values
-
editorAction
protected static final java.lang.String editorAction
- See Also:
- Constant Field Values
-
consoleAction
protected static final java.lang.String consoleAction
- See Also:
- Constant Field Values
-
toWebActionProperty
protected static final java.lang.String toWebActionProperty
- See Also:
- Constant Field Values
-
atomsetchooserAction
protected static final java.lang.String atomsetchooserAction
- See Also:
- Constant Field Values
-
copyImageActionProperty
protected static final java.lang.String copyImageActionProperty
- See Also:
- Constant Field Values
-
copyScriptActionProperty
protected static final java.lang.String copyScriptActionProperty
- See Also:
- Constant Field Values
-
surfaceToolActionProperty
protected static final java.lang.String surfaceToolActionProperty
- See Also:
- Constant Field Values
-
pasteClipboardActionProperty
protected static final java.lang.String pasteClipboardActionProperty
- See Also:
- Constant Field Values
-
gaussianAction
protected static final java.lang.String gaussianAction
- See Also:
- Constant Field Values
-
resizeAction
protected static final java.lang.String resizeAction
- See Also:
- Constant Field Values
-
plugins
java.util.Map<java.lang.String,JmolPlugin> plugins
-
pluginMenu
javax.swing.JMenu pluginMenu
-
pluginsSet
boolean pluginsSet
-
imageChoices
static final java.lang.String[] imageChoices
-
imageExtensions
static final java.lang.String[] imageExtensions
-
webExport
WebExport webExport
-
touchHandler
private JsonNioClient.TouchHandler touchHandler
-
chemFileProperty
static final java.lang.String chemFileProperty
- See Also:
- Constant Field Values
-
OUTSOCKET
public static final int OUTSOCKET
- See Also:
- Constant Field Values
-
TYPES
private final java.lang.String TYPES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFrameActions
protected java.util.List<javax.swing.Action> getFrameActions()
- Returns:
- A list of Actions that is understood by the upper level application
-
getStringX
protected java.lang.String getStringX(java.lang.String cmd)
-
getIconX
protected javax.swing.ImageIcon getIconX(java.lang.String img)
-
getWindowName
protected java.lang.String getWindowName()
-
createGuiMap
protected GuiMap createGuiMap()
-
createStatusBar
protected StatusBar createStatusBar()
-
createToolBar
protected javax.swing.JToolBar createToolBar()
Create the toolbar. By default this reads the resource file for the definition of the toolbars.- Returns:
- The toolbar
-
newToolbar
protected javax.swing.JToolBar newToolbar(java.lang.String[] keys)
-
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
protected void setFrameLocation(java.awt.Point loc, JmolPanel parent)
-
setIntoFrame
protected void setIntoFrame()
-
setupConsole
protected void setupConsole()
-
setupDnD
protected void setupDnD()
-
setAtomChooser
protected void setAtomChooser()
-
launchMainFrame
protected void launchMainFrame()
-
getJavaConsole
@Deprecated protected static void getJavaConsole(Jmol jmol)
Deprecated.
-
getJavaConsole
public void getJavaConsole()
-
showStatus
public void showStatus(java.lang.String message)
- Specified by:
showStatus
in interfaceSplashInterface
-
report
protected void report(java.lang.String str)
-
say
protected void say(java.lang.String message)
-
doClose
protected boolean doClose(boolean saveSize)
-
dispose
void dispose(javax.swing.JFrame f, boolean saveSize)
-
saveWindowSizes
protected void saveWindowSizes()
-
createMenuItem
public javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
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(java.lang.String)
-
getMenuItem
protected javax.swing.JMenuItem getMenuItem(java.lang.String cmd)
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
protected javax.swing.Action getAction(java.lang.String cmd)
Fetch the action that was created for the given command.- Parameters:
cmd
- Name of the action.- Returns:
- The action
-
createToolbarButton
protected javax.swing.AbstractButton createToolbarButton(java.lang.String key)
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
protected javax.swing.JMenuBar createMenubar()
Create the menubar for the app. By default this pulls the definition of the menu from the associated resource file.- Returns:
- Menubar
-
addPluginMenu
protected void addPluginMenu(javax.swing.JMenuBar mb)
-
setPlugins
void setPlugins()
-
addMacrosMenu
protected void addMacrosMenu(javax.swing.JMenuBar menuBar)
-
addNormalMenuBar
protected void addNormalMenuBar(javax.swing.JMenuBar menuBar)
-
addHelpMenuBar
protected void addHelpMenuBar(javax.swing.JMenuBar menuBar)
-
createMenu
public javax.swing.JMenu createMenu(java.lang.String key)
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
protected java.lang.String setMenuKeys(java.lang.String key, java.lang.String tokens)
opportunity to adjust menus for a custom application- Parameters:
key
-tokens
-- Returns:
- possibly changed token string
-
setMenuState
protected void setMenuState()
-
doNew
void doNew()
-
setMenuNBO
void setMenuNBO(javax.swing.JMenu item)
- Parameters:
item
-
-
startNBO
void startNBO(java.util.Map<java.lang.String,java.lang.Object> jmolOptions)
- Parameters:
jmolOptions
- e.g. NOZAP;VIEWER unused
-
showPlugin
void showPlugin(java.lang.String name, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> jmolOptions)
-
getAndRegisterPlugin
protected JmolPlugin getAndRegisterPlugin(java.lang.String name, java.lang.String path)
-
getInstanceWithParams
public static java.lang.Object getInstanceWithParams(java.lang.String name, java.lang.Class<?>[] classes, java.lang.Object... params)
-
print
public void print()
added print command, so that it can be used by RasmolScriptHandler
-
createImageStatus
java.lang.String createImageStatus(java.lang.String fileName, java.lang.String type, java.lang.Object text_or_bytes, int quality)
Starting with Jmol 11.8.RC5, this is just informational if type == null and null is returned, then it means "Jmol, you handle it"- Parameters:
fileName
-type
-text_or_bytes
-quality
-- Returns:
- null (you do it) or a message starting with OK or an error message
-
createWebExport
void createWebExport()
-
createSurfaceTool
void createSurfaceTool()
-
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
-
openFile
void openFile()
-
notifyFileOpen
void notifyFileOpen(java.lang.String fullPathName, java.lang.String title)
-
resizeInnerPanel
int[] resizeInnerPanel(java.lang.String data)
-
resizeDisplay
void resizeDisplay(int width, int height)
-
updateLabels
void updateLabels()
-
nioClosed
public void nioClosed(JsonNioServer jns)
- Specified by:
nioClosed
in interfaceJsonNioClient
-
sendNioSyncRequest
void sendNioSyncRequest(java.lang.Object data, int port, java.lang.String strInfo)
-
getJsonNioServer
public static JsonNioServer getJsonNioServer()
-
syncScript
public void syncScript(java.lang.String script)
-
updateConsoleFont
public void updateConsoleFont()
-
getPreference
public java.lang.Object getPreference(java.lang.String key)
-
getConsole
public AppConsole getConsole()
-
getJmolProperty
public static java.lang.String getJmolProperty(java.lang.String key, java.lang.String defaultValue)
-
setPluginOption
public static void setPluginOption(java.lang.String pluginName, java.lang.String key, java.lang.String value)
-
getPluginOption
public static java.lang.String getPluginOption(java.lang.String pluginName, java.lang.String key, java.lang.String defaultValue)
-
addJmolProperties
public static void addJmolProperties(java.util.Properties props)
-
addJmolProperty
public static void addJmolProperty(java.lang.String key, java.lang.String value)
-
setStatus
public void setStatus(int pos, java.lang.String msg)
-
addJmolWindowInfo
@Deprecated public static void addJmolWindowInfo(java.lang.String name, java.awt.Component window, java.awt.Point border)
Deprecated.Deprecated -- use addJmolWindowInnerInfo(name,window,Dimension inner)- Parameters:
name
-window
-border
-
-
addJmolWindowInnerInfo
public static void addJmolWindowInnerInfo(java.lang.String name, java.awt.Component window, java.awt.Dimension inner)
-
processNioMessage
public void processNioMessage(byte[] packet) throws java.lang.Exception
- Specified by:
processNioMessage
in interfaceJsonNioClient
- Throws:
java.lang.Exception
-
serverCycle
public void serverCycle()
- Specified by:
serverCycle
in interfaceJsonNioClient
-
isServer
public boolean isServer()
-
nioSync
public void nioSync(java.util.Map<java.lang.String,java.lang.Object> json, JsonNioClient.TouchHandler handler) throws java.lang.Exception
process touch or gesture commands driven by hardware. From MolecularPlayground.- Parameters:
json
-handler
-- Throws:
java.lang.Exception
-
-