show group annotation menu entries
[jalview.git] / src / jalview / jbgui / GAlignFrame.java
index fdda4ca..23062e3 100755 (executable)
@@ -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();
 
@@ -275,6 +280,13 @@ public class GAlignFrame extends JInternalFrame
   JMenuItem alignmentProperties = new JMenuItem();
   
   JMenu tooltipSettingsMenu = new JMenu();
+
+  private JMenuItem justifyLeftMenuItem=new JMenuItem();
+
+  private JMenuItem justifyRightMenuItem=new JMenuItem();
+  
+  protected JCheckBoxMenuItem showGroupConsensus=new JCheckBoxMenuItem();
+  protected JCheckBoxMenuItem showGroupConservation=new JCheckBoxMenuItem();
   
   public GAlignFrame()
   {
@@ -580,6 +592,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()
@@ -598,6 +626,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()
@@ -615,6 +652,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()
     {
@@ -920,6 +965,14 @@ 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()
     {
@@ -940,6 +993,28 @@ 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);
+      }
+      
+    });
+
     nucleotideColour.setText("Nucleotide");
     nucleotideColour.addActionListener(new java.awt.event.ActionListener()
     {
@@ -1513,6 +1588,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);
@@ -1523,8 +1602,12 @@ public class GAlignFrame extends JInternalFrame
     viewMenu.addSeparator();
     viewMenu.add(followHighlightMenuItem);
     viewMenu.add(annotationPanelMenuItem);
+    viewMenu.add(showGroupConservation);
+    viewMenu.add(showGroupConsensus);
     viewMenu.addSeparator();
     viewMenu.add(showSeqFeatures);
+    viewMenu.add(showSeqFeaturesHeight);
+   
     viewMenu.add(featureSettings);
     tooltipSettingsMenu.add(showDbRefsMenuitem);
     tooltipSettingsMenu.add(showNpFeatsMenuitem);
@@ -1571,6 +1654,7 @@ 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);
@@ -1605,6 +1689,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);
@@ -1614,6 +1699,43 @@ public class GAlignFrame extends JInternalFrame
     selectMenu.add(deleteGroups);
   }
 
+  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
@@ -1753,6 +1875,10 @@ public class GAlignFrame extends JInternalFrame
   {
   }
 
+  protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
+  {
+  }
+
   protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
   {
   }