Class JmolPanel

    • Field Detail

      • 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
      • startupWidth

        protected int startupWidth
      • startupHeight

        protected int startupHeight
      • appletContext

        protected java.lang.String appletContext
      • pcs

        public java.beans.PropertyChangeSupport pcs
      • frame

        public javax.swing.JFrame frame
      • consoleframe

        protected javax.swing.JFrame consoleframe
      • qualityJPG

        protected int qualityJPG
      • qualityPNG

        protected int qualityPNG
      • imageType

        protected java.lang.String imageType
      • guimap

        public GuiMap guimap
      • 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
      • vwrOptions

        protected java.util.Map<java.lang.String,​java.lang.Object> vwrOptions
      • windowName

        protected java.lang.String windowName
      • isPlugin

        protected boolean isPlugin
      • 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
      • exportActionProperty

        protected static final java.lang.String exportActionProperty
        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
      • 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
      • plugins

        java.util.Map<java.lang.String,​JmolPlugin> plugins
      • pluginMenu

        javax.swing.JMenu pluginMenu
      • imageChoices

        static final java.lang.String[] imageChoices
      • imageExtensions

        static final java.lang.String[] imageExtensions
    • Constructor Detail

      • JmolPanel

        public JmolPanel​(JmolApp jmolApp,
                         Splash splash,
                         javax.swing.JFrame frame,
                         JmolPanel parent,
                         int startupWidth,
                         int startupHeight,
                         java.util.Map<java.lang.String,​java.lang.Object> vwrOptions,
                         java.awt.Point loc)
    • 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()
      • 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

        protected 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)
      • 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

        protected 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()
      • sendNioMessage

        void sendNioMessage​(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)
      • 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)