public static JMenuBar getAlignmentPanelMenu(JFrame frame,
			ActionListener actionListener, AFPChain afpChain,
			MultipleAlignment msa){

		JMenuBar menu = new JMenuBar();

		JMenu file= new JMenu("File");
		file.getAccessibleContext().setAccessibleDescription("File Menu");
		menu.add(file);

		ImageIcon saveicon = createImageIcon("/icons/filesave.png");

		JMenuItem saveF = null;

		if (saveicon != null)
			saveF = new JMenuItem("Save text display", saveicon);
		else
			saveF = new JMenuItem("Save text display");

		saveF.setMnemonic(KeyEvent.VK_S);
		MySaveFileListener listener = new MySaveFileListener(afpChain, msa);
		listener.setTextOutput(true);
		saveF.addActionListener(listener);
		file.add(saveF);

		file.addSeparator();

		JMenuItem print = getPrintMenuItem();
		print.addActionListener(actionListener);
		file.add(print);

		file.addSeparator();

		JMenuItem closeI = MenuCreator.getCloseMenuItem(frame);
		file.add(closeI);
		JMenuItem exitI = MenuCreator.getExitMenuItem();
		file.add(exitI);

		JMenu edit = new JMenu("Edit");
		edit.setMnemonic(KeyEvent.VK_E);
		menu.add(edit);

		JMenuItem eqrI = MenuCreator.getIcon(actionListener,SELECT_EQR);
		edit.add(eqrI);

		JMenuItem eqrcI = MenuCreator.getIcon(actionListener,EQR_COLOR);
		edit.add(eqrcI);

		JMenuItem simI = MenuCreator.getIcon(actionListener, SIMILARITY_COLOR);
		edit.add(simI);

		JMenuItem fatcatI = MenuCreator.getIcon(actionListener, FATCAT_BLOCK );
		edit.add(fatcatI);

		JMenu view= new JMenu("View");
		view.getAccessibleContext().setAccessibleDescription("View Menu");
		view.setMnemonic(KeyEvent.VK_V);
		menu.add(view);

		JMenuItem textI = MenuCreator.getIcon(actionListener,TEXT_ONLY);
		view.add(textI);

		JMenuItem fastaI = MenuCreator.getIcon(actionListener,FASTA_FORMAT);
		view.add(fastaI);

		JMenuItem pairsI = MenuCreator.getIcon(actionListener,PAIRS_ONLY);
		view.add(pairsI);

		JMenuItem textF = MenuCreator.getIcon(actionListener,FATCAT_TEXT);
		view.add(textF);

		JMenu about = new JMenu("Help");
		about.setMnemonic(KeyEvent.VK_A);

		JMenuItem helpM = MenuCreator.getHelpMenuItem();
		about.add(helpM);

		JMenuItem aboutM = MenuCreator.getAboutMenuItem();
		about.add(aboutM);


		menu.add(Box.createGlue());
		menu.add(about);

		return menu;
	}
public static JMenuBar getAlignmentPanelMenu ( JFrame frame , ActionListener actionListener , AFPChain afpChain , MultipleAlignment msa ) { JMenuBar menu = new JMenuBar ( ) ; JMenu file = new JMenu ( "File" ) ; file . getAccessibleContext ( ) . setAccessibleDescription ( "File Menu" ) ; menu . add ( file ) ; ImageIcon saveicon = createImageIcon ( "/icons/filesave.png" ) ; JMenuItem saveF = null ; if ( saveicon != null ) saveF = new JMenuItem ( "Save text display" , saveicon ) ; else saveF = new JMenuItem ( "Save text display" ) ; saveF . setMnemonic ( KeyEvent . VK_S ) ; MySaveFileListener listener = new MySaveFileListener ( afpChain , msa ) ; listener . setTextOutput ( true ) ; saveF . addActionListener ( listener ) ; file . add ( saveF ) ; file . addSeparator ( ) ; JMenuItem print = getPrintMenuItem ( ) ; print . addActionListener ( actionListener ) ; file . add ( print ) ; file . addSeparator ( ) ; JMenuItem closeI = MenuCreator . getCloseMenuItem ( frame ) ; file . add ( closeI ) ; JMenuItem exitI = MenuCreator . getExitMenuItem ( ) ; file . add ( exitI ) ; JMenu edit = new JMenu ( "Edit" ) ; edit . setMnemonic ( KeyEvent . VK_E ) ; menu . add ( edit ) ; JMenuItem eqrI = MenuCreator . getIcon ( actionListener , SELECT_EQR ) ; edit . add ( eqrI ) ; JMenuItem eqrcI = MenuCreator . getIcon ( actionListener , EQR_COLOR ) ; edit . add ( eqrcI ) ; JMenuItem simI = MenuCreator . getIcon ( actionListener , SIMILARITY_COLOR ) ; edit . add ( simI ) ; JMenuItem fatcatI = MenuCreator . getIcon ( actionListener , FATCAT_BLOCK ) ; edit . add ( fatcatI ) ; JMenu view = new JMenu ( "View" ) ; view . getAccessibleContext ( ) . setAccessibleDescription ( "View Menu" ) ; view . setMnemonic ( KeyEvent . VK_V ) ; menu . add ( view ) ; JMenuItem textI = MenuCreator . getIcon ( actionListener , TEXT_ONLY ) ; view . add ( textI ) ; JMenuItem fastaI = MenuCreator . getIcon ( actionListener , FASTA_FORMAT ) ; view . add ( fastaI ) ; JMenuItem pairsI = MenuCreator . getIcon ( actionListener , PAIRS_ONLY ) ; view . add ( pairsI ) ; JMenuItem textF = MenuCreator . getIcon ( actionListener , FATCAT_TEXT ) ; view . add ( textF ) ; JMenu about = new JMenu ( "Help" ) ; about . setMnemonic ( KeyEvent . VK_A ) ; JMenuItem helpM = MenuCreator . getHelpMenuItem ( ) ; about . add ( helpM ) ; JMenuItem aboutM = MenuCreator . getAboutMenuItem ( ) ; about . add ( aboutM ) ; menu . add ( Box . createGlue ( ) ) ; menu . add ( about ) ; return menu ; }
Create the menu for the Alignment Panel representation of
Structural Alignments. The alignment can be in AFPChain format
or in the MultipleAlignment format.

@param frame
@param actionListener
@param afpChain
@param MultipleAlignment
@return a JMenuBar