");
+ if (!Platform.isJS())
+ {
+ calculateMenu.addSeparator();
+ calculateMenu.add(runGroovy);
+ }
+
+ webServiceNoServices = new JMenuItem(
+ MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
- pasteMenu.add(pasteNew);
- pasteMenu.add(pasteThis);
- sort.add(sortIDMenuItem);
- sort.add(sortLengthMenuItem);
- sort.add(sortGroupMenuItem);
- sort.add(sortPairwiseMenuItem);
- sort.add(sortByTreeMenu);
- calculateTree.add(averageDistanceTreeMenuItem);
- calculateTree.add(neighbourTreeMenuItem);
- calculateTree.add(avDistanceTreeBlosumMenuItem);
- calculateTree.add(njTreeBlosumMenuItem);
- jMenu2.add(htmlMenuItem);
- jMenu2.add(epsFile);
- jMenu2.add(createPNG);
+ if (!Platform.isJS())
+ {
+ exportImageMenu.add(htmlMenuItem);
+ }
+ exportImageMenu.add(epsFile);
+ exportImageMenu.add(createPNG);
+ if (!Platform.isJS())
+ {
+ exportImageMenu.add(createBioJS);
+ exportImageMenu.add(createSVG);
+ }
addSequenceMenu.add(addFromFile);
addSequenceMenu.add(addFromText);
addSequenceMenu.add(addFromURL);
this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
statusPanel.add(statusBar, null);
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
- jMenu3.add(showAllColumns);
- jMenu3.add(showAllSeqs);
- jMenu3.add(showAllhidden);
- hideMenu.add(hideSelColumns);
- hideMenu.add(hideSelSequences);
- hideMenu.add(hideAllSelection);
- hideMenu.add(hideAllButSelection);
formatMenu.add(font);
formatMenu.addSeparator();
@@ -1973,14 +1899,199 @@ public class GAlignFrame extends JInternalFrame
selectMenu.add(invertColSel);
selectMenu.add(createGroup);
selectMenu.add(unGroup);
- selectMenu.add(deleteGroups);
selectMenu.add(grpsFromSelection);
+ selectMenu.add(deleteGroups);
+ selectMenu.add(annotationColumn);
+ selectMenu.add(selectHighlighted);
// TODO - determine if the listenToViewSelections button is needed : see bug
// JAL-574
// selectMenu.addSeparator();
// selectMenu.add(listenToViewSelections);
}
+ protected void loadVcf_actionPerformed()
+ {
+ }
+
+ /**
+ * Constructs the entries on the Colour menu (but does not add them to the
+ * menu).
+ */
+ protected void initColourMenu()
+ {
+ applyToAllGroups = new JCheckBoxMenuItem(
+ MessageManager.getString("label.apply_colour_to_all_groups"));
+ applyToAllGroups.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
+ }
+ });
+
+ textColour = new JMenuItem(
+ MessageManager.getString("label.text_colour"));
+ textColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ textColour_actionPerformed();
+ }
+ });
+
+ conservationMenuItem = new JCheckBoxMenuItem(
+ MessageManager.getString("action.by_conservation"));
+ conservationMenuItem.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ conservationMenuItem_actionPerformed(
+ conservationMenuItem.isSelected());
+ }
+ });
+
+ abovePIDThreshold = new JCheckBoxMenuItem(
+ MessageManager.getString("label.above_identity_threshold"));
+ abovePIDThreshold.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
+ }
+ });
+ modifyPID = new JMenuItem(
+ MessageManager.getString("label.modify_identity_threshold"));
+ modifyPID.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ modifyPID_actionPerformed();
+ }
+ });
+ modifyConservation = new JMenuItem(MessageManager
+ .getString("label.modify_conservation_threshold"));
+ modifyConservation.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ modifyConservation_actionPerformed();
+ }
+ });
+
+ annotationColour = new JRadioButtonMenuItem(
+ MessageManager.getString("action.by_annotation"));
+ annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
+ annotationColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ annotationColour_actionPerformed();
+ }
+ });
+ }
+
+ protected void selectHighlightedColumns_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * Generate the reverse sequence (or reverse complement if the flag is true)
+ * and add it to the alignment
+ *
+ * @param complement
+ */
+ protected void showReverse_actionPerformed(boolean complement)
+ {
+ }
+
+ /**
+ * Try to run script in a Groovy console, having first ensured that this
+ * alignframe is set as currentAlignFrame in Desktop
+ */
+ protected void runGroovy_actionPerformed()
+ {
+
+ }
+
+ /**
+ * Adds the given action listener and key accelerator to the given menu item.
+ * Also saves in a lookup table to support lookup of action by key stroke.
+ *
+ * @param keyStroke
+ * @param menuItem
+ * @param actionListener
+ */
+ protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
+ JMenuItem menuItem, ActionListener actionListener)
+ {
+ menuItem.setAccelerator(keyStroke);
+ accelerators.put(keyStroke, menuItem);
+ menuItem.addActionListener(actionListener);
+ }
+
+ /**
+ * Action on clicking sort annotations by type.
+ *
+ * @param sortOrder
+ */
+ protected void sortAnnotations_actionPerformed()
+ {
+ }
+
+ /**
+ * Action on clicking Show all annotations.
+ *
+ * @param forSequences
+ * update sequence-related annotations
+ * @param forAlignment
+ * update non-sequence-related annotations
+ */
+ protected void showAllAnnotations_actionPerformed(boolean forSequences,
+ boolean forAlignment)
+ {
+ setAnnotationsVisibility(true, forSequences, forAlignment);
+ }
+
+ /**
+ * Action on clicking Hide all annotations.
+ *
+ * @param forSequences
+ * update sequence-related annotations
+ * @param forAlignment
+ * update non-sequence-related annotations
+ */
+ protected void hideAllAnnotations_actionPerformed(boolean forSequences,
+ boolean forAlignment)
+ {
+ setAnnotationsVisibility(false, forSequences, forAlignment);
+ }
+
+ /**
+ * Set the visibility of annotations to true or false. Can act on
+ * sequence-related annotations, or alignment-related, or both.
+ *
+ * @param visible
+ * @param forSequences
+ * update sequence-related annotations
+ * @param forAlignment
+ * update non-sequence-related annotations
+ */
+ protected void setAnnotationsVisibility(boolean visible,
+ boolean forSequences, boolean forAlignment)
+ {
+
+ }
+
protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
@@ -2053,13 +2164,6 @@ public class GAlignFrame extends JInternalFrame
}
- protected void showSeqFeaturesHeight_actionPerformed(
- ActionEvent actionEvent)
- {
- // TODO Auto-generated method stub
-
- }
-
protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
@@ -2094,10 +2198,6 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void showProducts_actionPerformed(ActionEvent e)
- {
- }
-
protected void buildSortByAnnotationScoresMenu()
{
}
@@ -2106,7 +2206,7 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void outputText_actionPerformed(ActionEvent e)
+ protected void outputText_actionPerformed(String formatName)
{
}
@@ -2139,6 +2239,11 @@ public class GAlignFrame extends JInternalFrame
{
}
+ protected void bioJSMenuItem_actionPerformed(ActionEvent e)
+ {
+
+ }
+
protected void closeMenuItem_actionPerformed(boolean b)
{
}
@@ -2227,83 +2332,11 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void PCAMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
{
}
- protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void clustalColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void zappoColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void taylorColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void hydrophobicityColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void helixColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void strandColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void turnColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void buriedColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void userDefinedColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void PIDColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void purinePyrimidineColour_actionPerformed(ActionEvent e)
- {
- }
-
- /*
- * protected void covariationColour_actionPerformed(ActionEvent e) { }
- */
-
- protected void noColourmenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void conservationMenuItem_actionPerformed(ActionEvent e)
+ protected void conservationMenuItem_actionPerformed(boolean selected)
{
}
@@ -2319,7 +2352,7 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void abovePIDThreshold_actionPerformed(ActionEvent e)
+ protected void abovePIDThreshold_actionPerformed(boolean selected)
{
}
@@ -2327,31 +2360,27 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void nucleotideColour_actionPerformed(ActionEvent e)
- {
- }
-
protected void deleteGroups_actionPerformed(ActionEvent e)
{
}
-
+
protected void createGroup_actionPerformed(ActionEvent e)
{
}
-
+
protected void unGroup_actionPerformed(ActionEvent e)
{
}
- protected void copy_actionPerformed(ActionEvent e)
+ protected void copy_actionPerformed()
{
}
- protected void cut_actionPerformed(ActionEvent e)
+ protected void cut_actionPerformed()
{
}
- protected void delete_actionPerformed(ActionEvent e)
+ protected void delete_actionPerformed()
{
}
@@ -2363,7 +2392,7 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void applyToAllGroups_actionPerformed(ActionEvent e)
+ protected void applyToAllGroups_actionPerformed(boolean selected)
{
}
@@ -2388,33 +2417,25 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
+ public void createSVG(java.io.File f)
{
}
- /**
- * Template method to handle the 'load T-Coffee scores' menu event.
- *
- * Subclasses override this method to provide a custom action.
- *
- * @param event
- * The raised event
- */
- protected void loadScores_actionPerformed(ActionEvent event)
+ protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
{
}
/**
- * Template method to handle the 'Color T-Coffee scores' menu event.
+ * Template method to handle the 'load T-Coffee scores' menu event.
*
* Subclasses override this method to provide a custom action.
*
* @param event
* The raised event
*/
- protected void tcoffeeColorScheme_actionPerformed(ActionEvent event)
+ protected void loadScores_actionPerformed(ActionEvent event)
{
}
@@ -2435,15 +2456,15 @@ public class GAlignFrame extends JInternalFrame
{
}
- protected void modifyPID_actionPerformed(ActionEvent e)
+ protected void modifyPID_actionPerformed()
{
}
- protected void modifyConservation_actionPerformed(ActionEvent e)
+ protected void modifyConservation_actionPerformed()
{
}
- protected void saveAs_actionPerformed(ActionEvent e)
+ protected void saveAs_actionPerformed()
{
}
@@ -2461,7 +2482,7 @@ public class GAlignFrame extends JInternalFrame
}
- public void showTranslation_actionPerformed(ActionEvent e)
+ public void showTranslation_actionPerformed(GeneticCodeI codeTable)
{
}
@@ -2471,7 +2492,7 @@ public class GAlignFrame extends JInternalFrame
}
- public void fetchSequence_actionPerformed(ActionEvent e)
+ public void fetchSequence_actionPerformed()
{
}
@@ -2481,14 +2502,12 @@ public class GAlignFrame extends JInternalFrame
}
- public void annotationColour_actionPerformed(ActionEvent e)
+ public void annotationColour_actionPerformed()
{
-
}
- public void rnahelicesColour_actionPerformed(ActionEvent e)
+ public void annotationColumn_actionPerformed(ActionEvent e)
{
-
}
public void associatedData_actionPerformed(ActionEvent e)
@@ -2581,7 +2600,7 @@ public class GAlignFrame extends JInternalFrame
}
- public void textColour_actionPerformed(ActionEvent e)
+ public void textColour_actionPerformed()
{
}
@@ -2601,7 +2620,7 @@ public class GAlignFrame extends JInternalFrame
}
- public void buildTreeMenu()
+ public void buildTreeSortMenu()
{
}
@@ -2615,4 +2634,77 @@ public class GAlignFrame extends JInternalFrame
{
}
+
+ protected void expand_newalign(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected boolean isShowAutoCalculatedAbove()
+ {
+ return showAutoCalculatedAbove;
+ }
+
+ protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
+ {
+ this.showAutoCalculatedAbove = showAutoCalculatedAbove;
+ }
+
+ protected SequenceAnnotationOrder getAnnotationSortOrder()
+ {
+ return annotationSortOrder;
+ }
+
+ protected void setAnnotationSortOrder(
+ SequenceAnnotationOrder annotationSortOrder)
+ {
+ this.annotationSortOrder = annotationSortOrder;
+ }
+
+ public Map getAccelerators()
+ {
+ return this.accelerators;
+ }
+
+ /**
+ * Returns the selected index of the tabbed pane, or -1 if none selected
+ * (including the case where the tabbed pane has not been made visible).
+ *
+ * @return
+ */
+ public int getTabIndex()
+ {
+ return tabbedPane.getSelectedIndex();
+ }
+
+ public JPanel getStatusPanel()
+ {
+ return statusPanel;
+ }
+
+ /**
+ * Sets a reference to the containing split frame. Also makes the 'toggle
+ * split view' menu item visible and checked.
+ *
+ * @param sf
+ */
+ public void setSplitFrame(SplitContainerI sf)
+ {
+ this.splitFrame = sf;
+ if (sf != null)
+ {
+ this.showComplementMenuItem.setVisible(true);
+ this.showComplementMenuItem.setState(true);
+ }
+ }
+
+ public SplitContainerI getSplitViewContainer()
+ {
+ return this.splitFrame;
+ }
+
+ protected void showComplement_actionPerformed(boolean complement)
+ {
+ }
}