Class MenuCreator
- java.lang.Object
-
- org.biojava.nbio.structure.align.gui.MenuCreator
-
public class MenuCreator extends 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMenuCreator.DotPlotListenerCreates a frame to display a DotPlotPanel.
-
Field Summary
Fields Modifier and Type Field Description static StringALIGNMENT_PANELstatic StringDIST_MATRICESstatic StringDOT_PLOTstatic StringEQR_COLORstatic StringFASTA_FORMATstatic StringFATCAT_BLOCKstatic StringFATCAT_TEXTprotected static intkeyMaskstatic StringLOAD_ALIGNMENT_XMLstatic StringLOAD_DB_RESULTSstatic StringMULTIPLE_ALIGNstatic StringPAIRS_ONLYstatic StringPAIRWISE_ALIGNstatic StringPHYLOGENETIC_TREEstatic StringPRINTstatic StringSAVE_ALIGNMENT_XMLstatic StringSELECT_EQRstatic StringSIMILARITY_COLORstatic StringTEXT_ONLY
-
Constructor Summary
Constructors Constructor Description MenuCreator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageIconcreateImageIcon(String path)Returns an ImageIcon, or null if the path was invalid.static JMenuItemgetAboutMenuItem()static JMenuBargetAlignmentPanelMenu(JFrame frame, ActionListener actionListener, AFPChain afpChain, MultipleAlignment msa)Create the menu for the Alignment Panel representation of Structural Alignments.static JMenuBargetAlignmentTextMenu(JFrame frame, ActionListener actionListener, AFPChain afpChain, MultipleAlignment msa)Create the menu for the Text representations of Structural Alignments.static JMenuItemgetCloseMenuItem(JFrame frame)static JMenuItemgetDBResultMenuItem()static JMenuItemgetExitMenuItem()static JMenuItemgetExportPDBMenuItem(AbstractAlignmentJmol parent)static JMenuItemgetHelpMenuItem()protected static JMenuItemgetIcon(ActionListener actionListener, String text)static JMenuItemgetLoadMenuItem()protected static JMenuItemgetMultipleAlignmentMenuItem()static JMenuItemgetOpenPDBMenuItem()protected static JMenuItemgetPairwiseAlignmentMenuItem()static JMenuItemgetPrintMenuItem()static JMenuItemgetSaveAlignmentMenuItem(AFPChain afpChain, MultipleAlignment msa)static JMenuItemgetShowPDBMenuItem()static JMenuBarinitAlignmentGUIMenu(JFrame frame)static JMenuBarinitJmolMenu(JFrame frame, AbstractAlignmentJmol parent, AFPChain afpChain, MultipleAlignment msa)Provide a JMenuBar that can be added to a JFrame containing a JmolPanel.static voidshowAboutDialog()Show some info about this GUIprotected static voidshowMemoryMonitor()static voidshowSystemInfo()
-
-
-
Field Detail
-
PRINT
public static final String PRINT
- See Also:
- Constant Field Values
-
ALIGNMENT_PANEL
public static final String ALIGNMENT_PANEL
- See Also:
- Constant Field Values
-
TEXT_ONLY
public static final String TEXT_ONLY
- See Also:
- Constant Field Values
-
PAIRS_ONLY
public static final String PAIRS_ONLY
- See Also:
- Constant Field Values
-
SELECT_EQR
public static final String SELECT_EQR
- See Also:
- Constant Field Values
-
SIMILARITY_COLOR
public static final String SIMILARITY_COLOR
- See Also:
- Constant Field Values
-
EQR_COLOR
public static final String EQR_COLOR
- See Also:
- Constant Field Values
-
FATCAT_BLOCK
public static final String FATCAT_BLOCK
- See Also:
- Constant Field Values
-
LOAD_DB_RESULTS
public static final String LOAD_DB_RESULTS
- See Also:
- Constant Field Values
-
SAVE_ALIGNMENT_XML
public static final String SAVE_ALIGNMENT_XML
- See Also:
- Constant Field Values
-
LOAD_ALIGNMENT_XML
public static final String LOAD_ALIGNMENT_XML
- See Also:
- Constant Field Values
-
FATCAT_TEXT
public static final String FATCAT_TEXT
- See Also:
- Constant Field Values
-
FASTA_FORMAT
public static final String FASTA_FORMAT
- See Also:
- Constant Field Values
-
DIST_MATRICES
public static final String DIST_MATRICES
- See Also:
- Constant Field Values
-
DOT_PLOT
public static final String DOT_PLOT
- See Also:
- Constant Field Values
-
PAIRWISE_ALIGN
public static final String PAIRWISE_ALIGN
- See Also:
- Constant Field Values
-
MULTIPLE_ALIGN
public static final String MULTIPLE_ALIGN
- See Also:
- Constant Field Values
-
PHYLOGENETIC_TREE
public static final String PHYLOGENETIC_TREE
- See Also:
- Constant Field Values
-
keyMask
protected static final int keyMask
-
-
Constructor Detail
-
MenuCreator
public MenuCreator()
-
-
Method Detail
-
initJmolMenu
public static JMenuBar initJmolMenu(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 JMenuItem getDBResultMenuItem()
-
getShowPDBMenuItem
public static JMenuItem getShowPDBMenuItem()
-
getOpenPDBMenuItem
public static JMenuItem getOpenPDBMenuItem()
-
getLoadMenuItem
public static JMenuItem getLoadMenuItem()
-
getAlignmentPanelMenu
public static JMenuBar getAlignmentPanelMenu(JFrame frame, 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 JMenuBar getAlignmentTextMenu(JFrame frame, 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 JMenuItem getIcon(ActionListener actionListener, String text)
-
getPrintMenuItem
public static JMenuItem getPrintMenuItem()
-
getExportPDBMenuItem
public static JMenuItem getExportPDBMenuItem(AbstractAlignmentJmol parent)
-
getSaveAlignmentMenuItem
public static JMenuItem getSaveAlignmentMenuItem(AFPChain afpChain, MultipleAlignment msa)
-
getAboutMenuItem
public static JMenuItem getAboutMenuItem()
-
getExitMenuItem
public static JMenuItem getExitMenuItem()
-
getHelpMenuItem
public static JMenuItem getHelpMenuItem()
-
getCloseMenuItem
public static JMenuItem getCloseMenuItem(JFrame frame)
-
showAboutDialog
public static void showAboutDialog()
Show some info about this GUI
-
showSystemInfo
public static void showSystemInfo()
-
createImageIcon
public static ImageIcon createImageIcon(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 JMenuItem getPairwiseAlignmentMenuItem()
-
getMultipleAlignmentMenuItem
protected static JMenuItem getMultipleAlignmentMenuItem()
-
initAlignmentGUIMenu
public static JMenuBar initAlignmentGUIMenu(JFrame frame)
-
showMemoryMonitor
protected static void showMemoryMonitor()
-
-