X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=6a91cc4e24165d9dda3402d2feaeef300e2d0297;hb=b1cf67d148cd9cca4a12d245b6dad85a0a7376c7;hp=5f9f6e28065affef6819bfe4b49d977f9d5591bf;hpb=1576c6118a09c59098483daa16a94e9cca8de260;p=jalview.git diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 5f9f6e2..6a91cc4 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) - * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) + * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -68,6 +68,8 @@ public class GAlignFrame extends JInternalFrame protected JMenuItem sortIDMenuItem = new JMenuItem(); + protected JMenuItem sortLengthMenuItem = new JMenuItem(); + protected JMenuItem sortGroupMenuItem = new JMenuItem(); protected JMenu sortByAnnotScore = new JMenu(); @@ -120,6 +122,8 @@ public class GAlignFrame extends JInternalFrame public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem(); + public JCheckBoxMenuItem showUnconservedMenuItem = new JCheckBoxMenuItem(); + JMenuItem htmlMenuItem = new JMenuItem(); JMenuItem overviewMenuItem = new JMenuItem(); @@ -143,6 +147,7 @@ public class GAlignFrame extends JInternalFrame public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem(); public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem(); + public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem(); protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); @@ -186,7 +191,7 @@ public class GAlignFrame extends JInternalFrame protected JMenu sort = new JMenu(); - JMenu calculate = new JMenu(); + protected JMenu calculateTree = new JMenu(); JMenu jMenu2 = new JMenu(); @@ -264,6 +269,8 @@ public class GAlignFrame extends JInternalFrame protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem(); + protected JMenuItem gatherViews = new JMenuItem(); protected JMenuItem expandViews = new JMenuItem(); @@ -273,7 +280,19 @@ public class GAlignFrame extends JInternalFrame JMenuItem alignmentProperties = new JMenuItem(); JMenu tooltipSettingsMenu = new JMenu(); - + + private JMenuItem justifyLeftMenuItem=new JMenuItem(); + + private JMenuItem justifyRightMenuItem=new JMenuItem(); + + JMenu autoAnnMenu = new JMenu(); + protected JCheckBoxMenuItem showGroupConsensus=new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem showGroupConservation=new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem showConsensusHistogram=new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem showSequenceLogo=new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem applyAutoAnnotationSettings=new JCheckBoxMenuItem(); + + private JMenuItem grpsFromSelection = new JMenuItem(); public GAlignFrame() { try @@ -529,6 +548,15 @@ public class GAlignFrame extends JInternalFrame invertSequenceMenuItem_actionPerformed(e); } }); + grpsFromSelection.setText("Make Groups for selection"); + grpsFromSelection.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + makeGrpsFromSelection_actionPerformed(e); + } + }); + remove2LeftMenuItem.setText("Remove Left"); remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit() @@ -578,6 +606,22 @@ public class GAlignFrame extends JInternalFrame removeAllGapsMenuItem_actionPerformed(e); } }); + justifyLeftMenuItem.setText("Left Justify Alignment"); + justifyLeftMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + justifyLeftMenuItem_actionPerformed(e); + } + }); + justifyRightMenuItem.setText("Right Justify Alignment"); + justifyRightMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + justifyRightMenuItem_actionPerformed(e); + } + }); viewBoxesMenuItem.setText("Boxes"); viewBoxesMenuItem.setState(true); viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener() @@ -596,6 +640,15 @@ public class GAlignFrame extends JInternalFrame viewTextMenuItem_actionPerformed(e); } }); + showUnconservedMenuItem.setText("Show Unconserved"); + showUnconservedMenuItem.setState(false); + showUnconservedMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + showUnconservedMenuItem_actionPerformed(e); + } + }); sortPairwiseMenuItem.setText("by Pairwise Identity"); sortPairwiseMenuItem .addActionListener(new java.awt.event.ActionListener() @@ -613,6 +666,14 @@ public class GAlignFrame extends JInternalFrame sortIDMenuItem_actionPerformed(e); } }); + sortLengthMenuItem.setText("By Length"); + sortLengthMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortLengthMenuItem_actionPerformed(e); + } + }); sortGroupMenuItem.setText("by Group"); sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() { @@ -918,6 +979,15 @@ public class GAlignFrame extends JInternalFrame showSeqFeatures_actionPerformed(actionEvent); } }); +/* + * showSeqFeaturesHeight.setText("Vary Sequence Feature Height"); + showSeqFeaturesHeight.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent actionEvent) + { + showSeqFeaturesHeight_actionPerformed(actionEvent); + } + }); */ showDbRefsMenuitem.setText("Show Database Refs"); showDbRefsMenuitem.addActionListener(new ActionListener() { @@ -938,6 +1008,60 @@ public class GAlignFrame extends JInternalFrame } }); + showGroupConservation.setText("Group Conservation"); + showGroupConservation.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + showGroupConservation_actionPerformed(e); + } + + }); + + showGroupConsensus.setText("Group Consensus"); + showGroupConsensus.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + showGroupConsensus_actionPerformed(e); + } + + }); + showConsensusHistogram.setText("Show Consensus Histogram"); + showConsensusHistogram.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + showConsensusHistogram_actionPerformed(e); + } + + }); + showSequenceLogo.setText("Show Consensus Logo"); + showSequenceLogo.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + showSequenceLogo_actionPerformed(e); + } + + }); + applyAutoAnnotationSettings.setText("Apply to all groups"); + applyAutoAnnotationSettings.setState(false); + applyAutoAnnotationSettings.setVisible(true); + applyAutoAnnotationSettings.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + applyAutoAnnotationSettings_actionPerformed(e); + } + + }); + nucleotideColour.setText("Nucleotide"); nucleotideColour.addActionListener(new java.awt.event.ActionListener() { @@ -1106,7 +1230,19 @@ public class GAlignFrame extends JInternalFrame centreColumnLabels_actionPerformed(e); } }); + followHighlightMenuItem.setVisible(true); + followHighlightMenuItem.setState(true); + followHighlightMenuItem.setText("Automatic Scrolling"); + followHighlightMenuItem.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + followHighlight_actionPerformed(); + } + + }); + modifyPID.setText("Modify Identity Threshold..."); modifyPID.addActionListener(new java.awt.event.ActionListener() { @@ -1161,7 +1297,7 @@ public class GAlignFrame extends JInternalFrame }); sortByAnnotScore.setVisible(false); - calculate.setText("Calculate Tree"); + calculateTree.setText("Calculate Tree"); jMenu2.setText("Export Image"); padGapsMenuitem.setText("Pad Gaps"); @@ -1460,6 +1596,7 @@ public class GAlignFrame extends JInternalFrame } }); tooltipSettingsMenu.setText("Sequence ID Tooltip"); + autoAnnMenu.setText("Autocalculated Annotation"); alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); alignFrameMenuBar.add(selectMenu); @@ -1499,6 +1636,10 @@ public class GAlignFrame extends JInternalFrame editMenu.add(removeAllGapsMenuItem); editMenu.add(removeRedundancyMenuItem); editMenu.addSeparator(); + // dont add these yet in the CVS build - they cannot be undone! + editMenu.add(justifyLeftMenuItem); + editMenu.add(justifyRightMenuItem); + editMenu.addSeparator(); editMenu.add(padGapsMenuitem); viewMenu.add(newView); viewMenu.add(expandViews); @@ -1507,9 +1648,19 @@ public class GAlignFrame extends JInternalFrame viewMenu.add(jMenu3); viewMenu.add(hideMenu); viewMenu.addSeparator(); + viewMenu.add(followHighlightMenuItem); viewMenu.add(annotationPanelMenuItem); + autoAnnMenu.add(applyAutoAnnotationSettings); + autoAnnMenu.add(showConsensusHistogram); + autoAnnMenu.add(showSequenceLogo); + autoAnnMenu.addSeparator(); + autoAnnMenu.add(showGroupConservation); + autoAnnMenu.add(showGroupConsensus); + viewMenu.add(autoAnnMenu); viewMenu.addSeparator(); viewMenu.add(showSeqFeatures); + //viewMenu.add(showSeqFeaturesHeight); + viewMenu.add(featureSettings); tooltipSettingsMenu.add(showDbRefsMenuitem); tooltipSettingsMenu.add(showNpFeatsMenuitem); @@ -1541,7 +1692,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(modifyPID); colourMenu.add(annotationColour); calculateMenu.add(sort); - calculateMenu.add(calculate); + calculateMenu.add(calculateTree); calculateMenu.addSeparator(); calculateMenu.add(pairwiseAlignmentMenuItem); calculateMenu.add(PCAMenuItem); @@ -1556,13 +1707,14 @@ public class GAlignFrame extends JInternalFrame pasteMenu.add(pasteNew); pasteMenu.add(pasteThis); sort.add(sortIDMenuItem); + sort.add(sortLengthMenuItem); sort.add(sortGroupMenuItem); sort.add(sortPairwiseMenuItem); sort.add(sortByTreeMenu); - calculate.add(averageDistanceTreeMenuItem); - calculate.add(neighbourTreeMenuItem); - calculate.add(avDistanceTreeBlosumMenuItem); - calculate.add(njTreeBlosumMenuItem); + calculateTree.add(averageDistanceTreeMenuItem); + calculateTree.add(neighbourTreeMenuItem); + calculateTree.add(avDistanceTreeBlosumMenuItem); + calculateTree.add(njTreeBlosumMenuItem); jMenu2.add(htmlMenuItem); jMenu2.add(epsFile); jMenu2.add(createPNG); @@ -1590,6 +1742,7 @@ public class GAlignFrame extends JInternalFrame formatMenu.add(colourTextMenuItem); formatMenu.add(renderGapsMenuItem); formatMenu.add(centreColumnLabelsMenuItem); + formatMenu.add(showUnconservedMenuItem); selectMenu.add(findMenuItem); selectMenu.addSeparator(); selectMenu.add(selectAllSequenceMenuItem); @@ -1597,6 +1750,74 @@ public class GAlignFrame extends JInternalFrame selectMenu.add(invertSequenceMenuItem); selectMenu.add(invertColSel); selectMenu.add(deleteGroups); + selectMenu.add(grpsFromSelection); + } + + protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showConsensusHistogram_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showSequenceLogo_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void makeGrpsFromSelection_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showGroupConsensus_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showGroupConservation_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showUnconservedMenuItem_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void showSeqFeaturesHeight_actionPerformed( + ActionEvent actionEvent) + { + // TODO Auto-generated method stub + + } + + protected void justifyRightMenuItem_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void justifyLeftMenuItem_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void followHighlight_actionPerformed() + { + // TODO Auto-generated method stub + } protected void showNpFeats_actionPerformed(ActionEvent e) @@ -1732,6 +1953,10 @@ public class GAlignFrame extends JInternalFrame { } + protected void sortLengthMenuItem_actionPerformed(ActionEvent e) + { + } + protected void sortGroupMenuItem_actionPerformed(ActionEvent e) { }