Class JmolPanel

    • Constructor Summary

      Constructors 
      Constructor Description
      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 Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addHelpMenuBar​(javax.swing.JMenuBar menuBar)  
      private void addMacrosMenuBar​(javax.swing.JMenuBar menuBar)  
      private void addNormalMenuBar​(javax.swing.JMenuBar menuBar)  
      (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"
      (package private) javax.swing.JMenu createMenu​(java.lang.String key)
      Create a menu for the app.
      private javax.swing.JMenuBar createMenubar()
      Create the menubar for the app.
      private javax.swing.JMenuItem createMenuItem​(java.lang.String cmd)
      This is the hook through which all menu items are created.
      (package private) void createSurfaceTool()  
      protected java.awt.Component createTool​(java.lang.String key)
      Hook through which every toolbar item is created.
      private 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.
      java.util.List<javax.swing.Action> getActions()  
      private void getDialogs()  
      private static void getJavaConsole​(Jmol jmol)  
      static Jmol getJmol​(JmolApp jmolApp, javax.swing.JFrame frame)  
      static JsonNioServer getJsonNioServer()  
      protected javax.swing.JMenuItem getMenuItem​(java.lang.String cmd)
      Fetch the menu item that was created for the given command.
      NBOService getNBOService()  
      java.lang.Object getPreference​(java.lang.String key)  
      static java.io.File getUserDirectory()
      Returns a new File referenced by the property 'user.dir', or null if the property is not defined.
      void nioClosed​(JsonNioServer jns)  
      void nioRunContent​(JsonNioServer jns)  
      (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 RasmolScriptHandler
      private void report​(java.lang.String str)  
      (package private) void resizeDisplay​(int width, int height)  
      (package private) int[] resizeInnerPanel​(java.lang.String data)  
      (package private) void saveWindowSizes()  
      private void say​(java.lang.String message)  
      (package private) void sendNioMessage​(int port, java.lang.String strInfo)  
      void setBannerLabel​(java.lang.String label)  
      (package private) void setMenuNBO​(javax.swing.JMenu item)  
      (package private) void setMenuState()  
      void showStatus​(java.lang.String message)  
      protected static void startJmol​(JmolApp jmolApp)  
      (package private) void startNBO​(java.lang.String type)  
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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

      • getDialogs

        private void getDialogs()
      • startJmol

        protected static void startJmol​(JmolApp jmolApp)
      • getJavaConsole

        private static void getJavaConsole​(Jmol jmol)
      • getJmol

        public static Jmol getJmol​(JmolApp jmolApp,
                                   javax.swing.JFrame frame)
      • report

        private void report​(java.lang.String str)
      • say

        private void say​(java.lang.String message)
      • getActions

        public java.util.List<javax.swing.Action> getActions()
        Returns:
        A list of Actions that is understood by the upper level application
      • doClose

        protected boolean doClose​(boolean saveSize)
      • dispose

        void dispose​(javax.swing.JFrame f,
                     boolean saveSize)
      • saveWindowSizes

        void saveWindowSizes()
      • createMenuItem

        private 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
      • createToolbar

        private javax.swing.JToolBar createToolbar()
        Create the toolbar. By default this reads the resource file for the definition of the toolbars.
        Returns:
        The toolbar
      • createTool

        protected java.awt.Component createTool​(java.lang.String key)
        Hook through which every toolbar item is created.
        Parameters:
        key -
        Returns:
        Toolbar item
      • 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

        private 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
      • addMacrosMenuBar

        private void addMacrosMenuBar​(javax.swing.JMenuBar menuBar)
      • addNormalMenuBar

        private void addNormalMenuBar​(javax.swing.JMenuBar menuBar)
      • addHelpMenuBar

        private void addHelpMenuBar​(javax.swing.JMenuBar menuBar)
      • createMenu

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

        void setMenuState()
      • doNew

        void doNew()
      • setMenuNBO

        void setMenuNBO​(javax.swing.JMenu item)
        Parameters:
        item -
      • startNBO

        void startNBO​(java.lang.String type)
      • 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)
      • getNBOService

        public NBOService getNBOService()
      • updateConsoleFont

        public void updateConsoleFont()
      • getPreference

        public java.lang.Object getPreference​(java.lang.String key)