{
initColourMenu();
initHMMERMenu();
-
+
JMenuItem saveAs = new JMenuItem(
MessageManager.getString("action.save_as"));
ActionListener al = new ActionListener()
saveAs_actionPerformed(e);
}
};
-
+
// FIXME getDefaultToolkit throws an exception in Headless mode
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask()
| KeyEvent.SHIFT_MASK, false);
addMenuActionAndAccelerator(keyStroke, saveAs, al);
-
+
closeMenuItem.setText(MessageManager.getString("action.close"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
}
};
addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
-
+
JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
JMenu annotationsMenu = new JMenu(
MessageManager.getString("action.calculate"));
webService.setText(MessageManager.getString("action.web_service"));
hmmerMenu.setText(MessageManager.getString("action.hmmer"));
+ String status = Cache.getProperty("HMMER_FUNCTIONING");
+ if ("false".equals(status) || status == null)
+ {
+ hmmerMenu.setEnabled(false);
+ }
+ else
+ {
+ hmmerMenu.setEnabled(true);
+ }
+
JMenuItem selectAllSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.select_all"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
-
+
JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.deselect_all"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
}
};
addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
-
+
JMenuItem invertSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.invert_sequence_selection"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
-
+
JMenuItem grpsFromSelection = new JMenuItem(
MessageManager.getString("action.make_groups_selection"));
grpsFromSelection.addActionListener(new ActionListener()
}
};
addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
-
+
JMenuItem remove2RightMenuItem = new JMenuItem(
MessageManager.getString("action.remove_right"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
-
+
JMenuItem removeGappedColumnMenuItem = new JMenuItem(
MessageManager.getString("action.remove_empty_columns"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
-
+
JMenuItem removeAllGapsMenuItem = new JMenuItem(
MessageManager.getString("action.remove_all_gaps"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
-
+
JMenuItem justifyLeftMenuItem = new JMenuItem(
MessageManager.getString("action.left_justify_alignment"));
justifyLeftMenuItem.addActionListener(new ActionListener()
sortGroupMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem removeRedundancyMenuItem = new JMenuItem(
MessageManager.getString("action.remove_redundancy"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
-
+
JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
MessageManager.getString("action.pairwise_alignment"));
pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
pairwiseAlignmentMenuItem_actionPerformed(e);
}
});
-
+
this.getContentPane().setLayout(new BorderLayout());
alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
statusBar.setBackground(Color.white);
statusBar.setText(MessageManager.getString("label.status_bar"));
outputTextboxMenu.setText(MessageManager
.getString("label.out_to_textbox"));
-
+
annotationPanelMenuItem.setActionCommand("");
annotationPanelMenuItem.setText(MessageManager
.getString("label.show_annotations"));
MessageManager.getString("label.sort_annotations_by_sequence"));
final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
MessageManager.getString("label.sort_annotations_by_label"));
-
+
sortAnnBySequence
.setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
sortAnnBySequence.addActionListener(new ActionListener()
colourTextMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem htmlMenuItem = new JMenuItem(
MessageManager.getString("label.html"));
htmlMenuItem.addActionListener(new ActionListener()
htmlMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem createBioJS = new JMenuItem(
MessageManager.getString("label.biojs_html_export"));
createBioJS.addActionListener(new java.awt.event.ActionListener()
bioJSMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem overviewMenuItem = new JMenuItem(
MessageManager.getString("label.overview_window"));
overviewMenuItem.addActionListener(new ActionListener()
overviewMenuItem_actionPerformed(e);
}
});
-
+
undoMenuItem.setEnabled(false);
undoMenuItem.setText(MessageManager.getString("action.undo"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
-
+
redoMenuItem.setEnabled(false);
redoMenuItem.setText(MessageManager.getString("action.redo"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
-
+
wrapMenuItem.setText(MessageManager.getString("label.wrap"));
wrapMenuItem.addActionListener(new ActionListener()
{
wrapMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem printMenuItem = new JMenuItem(
MessageManager.getString("action.print"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
-
+
renderGapsMenuItem
.setText(MessageManager.getString("action.show_gaps"));
renderGapsMenuItem.setState(true);
renderGapsMenuItem_actionPerformed(e);
}
});
-
+
JMenuItem findMenuItem = new JMenuItem(
MessageManager.getString("action.find"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
-
+
showSeqFeatures.setText(MessageManager
.getString("label.show_sequence_features"));
showSeqFeatures.addActionListener(new ActionListener()
.getString("label.show_database_refs"));
showDbRefsMenuitem.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showDbRefs_actionPerformed(e);
}
-
+
});
showNpFeatsMenuitem.setText(MessageManager
.getString("label.show_non_positional_features"));
showNpFeatsMenuitem.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showNpFeats_actionPerformed(e);
}
-
+
});
showGroupConservation.setText(MessageManager
.getString("label.group_conservation"));
showGroupConservation.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showGroupConservation_actionPerformed(e);
}
-
+
});
-
+
showGroupConsensus.setText(MessageManager
.getString("label.group_consensus"));
showGroupConsensus.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showGroupConsensus_actionPerformed(e);
}
-
+
});
showConsensusHistogram.setText(MessageManager
.getString("label.show_consensus_histogram"));
showConsensusHistogram.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showConsensusHistogram_actionPerformed(e);
}
-
+
});
showSequenceLogo.setText(MessageManager
.getString("label.show_consensus_logo"));
showSequenceLogo.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
showSequenceLogo_actionPerformed(e);
}
-
+
});
normaliseSequenceLogo.setText(MessageManager
.getString("label.norm_consensus_logo"));
normaliseSequenceLogo.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
normaliseSequenceLogo_actionPerformed(e);
}
-
+
});
applyAutoAnnotationSettings.setText(MessageManager
.getString("label.apply_all_groups"));
applyAutoAnnotationSettings_actionPerformed(e);
}
});
-
+
ButtonGroup buttonGroup = new ButtonGroup();
final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
MessageManager.getString("label.show_first"));
sortAnnotations_actionPerformed();
}
});
-
+
JMenuItem deleteGroups = new JMenuItem(
MessageManager.getString("action.undefine_groups"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
-
+
JMenuItem annotationColumn = new JMenuItem(
MessageManager.getString("action.select_by_annotation"));
annotationColumn.addActionListener(new ActionListener()
annotationColumn_actionPerformed(e);
}
});
-
+
JMenuItem createGroup = new JMenuItem(
MessageManager.getString("action.create_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, createGroup, al);
-
+
JMenuItem unGroup = new JMenuItem(
MessageManager.getString("action.remove_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, unGroup, al);
-
+
copy.setText(MessageManager.getString("action.copy"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
-
+
al = new ActionListener()
{
@Override
}
};
addMenuActionAndAccelerator(keyStroke, copy, al);
-
+
cut.setText(MessageManager.getString("action.cut"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
}
};
addMenuActionAndAccelerator(keyStroke, cut, al);
-
+
JMenuItem delete = new JMenuItem(
MessageManager.getString("action.delete"));
delete.addActionListener(new ActionListener()
delete_actionPerformed(e);
}
});
-
+
pasteMenu.setText(MessageManager.getString("action.paste"));
JMenuItem pasteNew = new JMenuItem(
MessageManager.getString("label.to_new_alignment"));
}
};
addMenuActionAndAccelerator(keyStroke, pasteNew, al);
-
+
JMenuItem pasteThis = new JMenuItem(
MessageManager.getString("label.to_this_alignment"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, pasteThis, al);
-
+
JMenuItem createPNG = new JMenuItem("PNG");
createPNG.addActionListener(new ActionListener()
{
});
createPNG.setActionCommand(MessageManager
.getString("label.save_png_image"));
-
+
JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
font.addActionListener(new ActionListener()
{
createEPS(null);
}
});
-
+
JMenuItem createSVG = new JMenuItem("SVG");
createSVG.addActionListener(new ActionListener()
{
createSVG(null);
}
});
-
+
JMenuItem loadTreeMenuItem = new JMenuItem(
MessageManager.getString("label.load_associated_tree"));
loadTreeMenuItem.setActionCommand(MessageManager
loadTreeMenuItem_actionPerformed(e);
}
});
-
+
scaleAbove.setVisible(false);
scaleAbove.setText(MessageManager.getString("action.scale_above"));
scaleAbove.addActionListener(new ActionListener()
.getString("label.automatic_scrolling"));
followHighlightMenuItem.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
followHighlight_actionPerformed();
}
-
+
});
-
+
sortByTreeMenu
.setText(MessageManager.getString("action.by_tree_order"));
sort.setText(MessageManager.getString("action.sort"));
{
buildTreeSortMenu();
}
-
+
@Override
public void menuDeselected(MenuEvent e)
{
}
-
+
@Override
public void menuCanceled(MenuEvent e)
{
sort.add(sortByAnnotScore);
sort.addMenuListener(new javax.swing.event.MenuListener()
{
-
+
@Override
public void menuCanceled(MenuEvent e)
{
}
-
+
@Override
public void menuDeselected(MenuEvent e)
{
}
-
+
@Override
public void menuSelected(MenuEvent e)
{
}
});
sortByAnnotScore.setVisible(false);
-
+
calculateTree.setText(MessageManager
.getString("action.calculate_tree_pca"));
-
+
padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
padGapsMenuitem.setState(jalview.bin.Cache
.getDefault("PAD_GAPS", false));
showReverse_actionPerformed(true);
}
});
-
+
JMenuItem extractScores = new JMenuItem(
MessageManager.getString("label.extract_scores"));
extractScores.addActionListener(new ActionListener()
});
extractScores.setVisible(true);
// JBPNote: TODO: make gui for regex based score extraction
-
+
// for show products actions see AlignFrame.canShowProducts
showProducts.setText(MessageManager.getString("label.get_cross_refs"));
-
+
runGroovy.setText(MessageManager.getString("label.run_groovy"));
runGroovy.setToolTipText(MessageManager
.getString("label.run_groovy_tip"));
runGroovy_actionPerformed();
}
});
-
+
JMenuItem openFeatureSettings = new JMenuItem(
MessageManager.getString("action.feature_settings"));
openFeatureSettings.addActionListener(new ActionListener()
fetchSequence_actionPerformed(e);
}
});
-
+
JMenuItem associatedData = new JMenuItem(
MessageManager.getString("label.load_features_annotations"));
associatedData.addActionListener(new ActionListener()
sortByTreeOption_actionPerformed(e);
}
});
-
+
listenToViewSelections.setText(MessageManager
.getString("label.listen_for_selections"));
listenToViewSelections
listenToViewSelections_actionPerformed(e);
}
});
-
+
JMenu addSequenceMenu = new JMenu(
MessageManager.getString("label.add_sequences"));
JMenuItem addFromFile = new JMenuItem(
hiddenMarkers_actionPerformed(e);
}
});
-
+
JMenuItem invertColSel = new JMenuItem(
MessageManager.getString("action.invert_column_selection"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, invertColSel, al);
-
+
showComplementMenuItem.setVisible(false);
showComplementMenuItem.addActionListener(new ActionListener()
{
showComplement_actionPerformed(showComplementMenuItem.getState());
}
});
-
+
tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
{
@Override
tabbedPane_mousePressed(e);
}
}
-
+
@Override
public void mouseReleased(MouseEvent e)
{
tabbedPane_focusGained(e);
}
});
-
+
JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
}
};
addMenuActionAndAccelerator(keyStroke, save, al);
-
+
reload.setEnabled(false);
reload.setText(MessageManager.getString("action.reload"));
reload.addActionListener(new ActionListener()
reload_actionPerformed(e);
}
});
-
+
JMenuItem newView = new JMenuItem(
MessageManager.getString("action.new_view"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit
}
};
addMenuActionAndAccelerator(keyStroke, newView, al);
-
+
tabbedPane.setToolTipText("<html><i>"
+ MessageManager.getString("label.rename_tab_eXpand_reGroup")
+ "</i></html>");
-
+
formatMenu.setText(MessageManager.getString("action.format"));
JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
-
+
idRightAlign.setText(MessageManager
.getString("label.right_align_sequence_id"));
idRightAlign.addActionListener(new ActionListener()
idRightAlign_actionPerformed(e);
}
});
-
+
gatherViews.setEnabled(false);
gatherViews.setText(MessageManager.getString("action.gather_views"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
}
};
addMenuActionAndAccelerator(keyStroke, gatherViews, al);
-
+
expandViews.setEnabled(false);
expandViews.setText(MessageManager.getString("action.expand_views"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
}
};
addMenuActionAndAccelerator(keyStroke, expandViews, al);
-
+
JMenuItem pageSetup = new JMenuItem(
MessageManager.getString("action.page_setup"));
pageSetup.addActionListener(new ActionListener()
hmmBuild.setText(MessageManager.getString("label.hmmbuild"));
hmmBuild.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
e1.printStackTrace();
}
}
-
+
});
hmmAlign.setText(MessageManager.getString("label.hmmalign"));
hmmAlign.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
e1.printStackTrace();
}
}
-
+
});
selectHighlighted.addActionListener(al);
JMenu tooltipSettingsMenu = new JMenu(
MessageManager.getString("label.sequence_id_tooltip"));
JMenu autoAnnMenu = new JMenu(
MessageManager.getString("label.autocalculated_annotation"));
-
+
JMenu exportImageMenu = new JMenu(
MessageManager.getString("label.export_image"));
JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
alignFrameMenuBar.add(calculateMenu);
alignFrameMenuBar.add(webService);
alignFrameMenuBar.add(hmmerMenu);
-
+
fileMenu.add(fetchSequence);
fileMenu.add(addSequenceMenu);
fileMenu.add(reload);
fileMenu.add(associatedData);
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
-
+
pasteMenu.add(pasteNew);
pasteMenu.add(pasteThis);
editMenu.add(undoMenuItem);
// editMenu.add(justifyRightMenuItem);
// editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
-
+
showMenu.add(showAllColumns);
showMenu.add(showAllSeqs);
showMenu.add(showAllhidden);
viewMenu.add(alignmentProperties);
viewMenu.addSeparator();
viewMenu.add(overviewMenuItem);
-
+
annotationsMenu.add(annotationPanelMenuItem);
annotationsMenu.addSeparator();
annotationsMenu.add(showAllAlAnnotations);
autoAnnMenu.add(showGroupConservation);
autoAnnMenu.add(showGroupConsensus);
annotationsMenu.add(autoAnnMenu);
-
-
+
+
sort.add(sortIDMenuItem);
sort.add(sortLengthMenuItem);
sort.add(sortGroupMenuItem);
calculateMenu.add(extractScores);
calculateMenu.addSeparator();
calculateMenu.add(runGroovy);
-
+
webServiceNoServices = new JMenuItem(
MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
statusPanel.add(statusBar, null);
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
-
+
formatMenu.add(font);
formatMenu.addSeparator();
formatMenu.add(wrapMenuItem);