Class MenuCreator


  • public class MenuCreator
    extends java.lang.Object
    Create the menus for structure alignment GUI windows (JFrames).

    Examples: Text Frames, Alignment Panels, Jmol Panels.

    Since:
    1.7
    Author:
    Andreas Prlic, Aleix Lafita, Spencer Bliven
    • Constructor Detail

      • MenuCreator

        public MenuCreator()
    • Method Detail

      • initJmolMenu

        public static javax.swing.JMenuBar initJmolMenu​(javax.swing.JFrame frame,
                                                        AbstractAlignmentJmol parent,
                                                        AFPChain afpChain,
                                                        MultipleAlignment msa)
        Provide a JMenuBar that can be added to a JFrame containing a JmolPanel. The alignment has to be either an AFPChain or a MultipleAlignment: set the other parameter to null.

        Menus included:

        • File: open, save, export, import, exit.
        • Align: new pairwise alignment, new multiple alignment.
        • View: aligment panel, aligned pairs, text format, FatCat format, distance matrices, dot plot.
        • Help
        Returns:
        a JMenuBar
      • getDBResultMenuItem

        public static javax.swing.JMenuItem getDBResultMenuItem()
      • getShowPDBMenuItem

        public static javax.swing.JMenuItem getShowPDBMenuItem()
      • getOpenPDBMenuItem

        public static javax.swing.JMenuItem getOpenPDBMenuItem()
      • getLoadMenuItem

        public static javax.swing.JMenuItem getLoadMenuItem()
      • getAlignmentPanelMenu

        public static javax.swing.JMenuBar getAlignmentPanelMenu​(javax.swing.JFrame frame,
                                                                 java.awt.event.ActionListener actionListener,
                                                                 AFPChain afpChain,
                                                                 MultipleAlignment msa)
        Create the menu for the Alignment Panel representation of Structural Alignments. The alignment can be in AFPChain format or in the MultipleAlignment format.
        Parameters:
        frame -
        actionListener -
        afpChain -
        MultipleAlignment -
        Returns:
        a JMenuBar
      • getAlignmentTextMenu

        public static javax.swing.JMenuBar getAlignmentTextMenu​(javax.swing.JFrame frame,
                                                                java.awt.event.ActionListener actionListener,
                                                                AFPChain afpChain,
                                                                MultipleAlignment msa)
        Create the menu for the Text representations of Structural Alignments.
        Parameters:
        frame -
        actionListener -
        afpChain -
        msa -
        Returns:
        a JMenuBar
      • getIcon

        protected static javax.swing.JMenuItem getIcon​(java.awt.event.ActionListener actionListener,
                                                       java.lang.String text)
      • getPrintMenuItem

        public static javax.swing.JMenuItem getPrintMenuItem()
      • getExportPDBMenuItem

        public static javax.swing.JMenuItem getExportPDBMenuItem​(AbstractAlignmentJmol parent)
      • getSaveAlignmentMenuItem

        public static javax.swing.JMenuItem getSaveAlignmentMenuItem​(AFPChain afpChain,
                                                                     MultipleAlignment msa)
      • getAboutMenuItem

        public static javax.swing.JMenuItem getAboutMenuItem()
      • getExitMenuItem

        public static javax.swing.JMenuItem getExitMenuItem()
      • getHelpMenuItem

        public static javax.swing.JMenuItem getHelpMenuItem()
      • getCloseMenuItem

        public static javax.swing.JMenuItem getCloseMenuItem​(javax.swing.JFrame frame)
      • showAboutDialog

        public static void showAboutDialog()
        Show some info about this GUI
      • showSystemInfo

        public static void showSystemInfo()
      • createImageIcon

        public static javax.swing.ImageIcon createImageIcon​(java.lang.String path)
        Returns an ImageIcon, or null if the path was invalid.
        Parameters:
        path - the path to the icon
        Returns:
        ImageIcon object
      • getPairwiseAlignmentMenuItem

        protected static javax.swing.JMenuItem getPairwiseAlignmentMenuItem()
      • getMultipleAlignmentMenuItem

        protected static javax.swing.JMenuItem getMultipleAlignmentMenuItem()
      • initAlignmentGUIMenu

        public static javax.swing.JMenuBar initAlignmentGUIMenu​(javax.swing.JFrame frame)
      • showMemoryMonitor

        protected static void showMemoryMonitor()