Annotation colour scheme added
authoramwaterhouse <Andrew Waterhouse>
Fri, 24 Mar 2006 15:27:21 +0000 (15:27 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 24 Mar 2006 15:27:21 +0000 (15:27 +0000)
src/jalview/appletgui/AlignFrame.java

index aceb508..189a36d 100755 (executable)
@@ -229,8 +229,7 @@ public class AlignFrame extends Frame implements ActionListener,
             fr.setColour(type, ucs.findColour("A"));\r
           }\r
 \r
-          sf = new SequenceFeature(type, desc, "", start, end);\r
-          sf.setFeatureGroup(featureGroup);\r
+          sf = new SequenceFeature(type, desc, "", start, end, featureGroup);\r
 \r
           seq.addSequenceFeature(sf);\r
         }\r
@@ -423,6 +422,8 @@ public void itemStateChanged(ItemEvent evt)
             PIDColour_actionPerformed();\r
     else if(evt.getSource()==BLOSUM62Colour)\r
             BLOSUM62Colour_actionPerformed();\r
+    else if(evt.getSource()==annotationColour)\r
+           new AnnotationColourChooser(viewport, alignPanel);\r
     else if(evt.getSource()==sortPairwiseMenuItem)\r
             sortPairwiseMenuItem_actionPerformed();\r
     else if(evt.getSource()==sortIDMenuItem)\r
@@ -1689,8 +1690,8 @@ public void itemStateChanged(ItemEvent evt)
     protected Menu colourMenu = new Menu("Colour");\r
     protected Menu calculateMenu = new Menu("Calculate");\r
     protected MenuItem selectAllSequenceMenuItem = new MenuItem("Select all");\r
-    protected MenuItem deselectAllSequenceMenuItem = new MenuItem();\r
-    protected MenuItem invertSequenceMenuItem = new MenuItem();\r
+    protected MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All");\r
+    protected MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection");\r
     protected MenuItem remove2LeftMenuItem = new MenuItem();\r
     protected MenuItem remove2RightMenuItem = new MenuItem();\r
     protected MenuItem removeGappedColumnMenuItem = new MenuItem();\r
@@ -1793,9 +1794,7 @@ public void itemStateChanged(ItemEvent evt)
 \r
         loadTree.addActionListener(this);\r
         selectAllSequenceMenuItem.addActionListener(this);\r
-        deselectAllSequenceMenuItem.setLabel("Deselect All");\r
         deselectAllSequenceMenuItem.addActionListener(this);\r
-        invertSequenceMenuItem.setLabel("Invert Selection");\r
         invertSequenceMenuItem.addActionListener(this);\r
         remove2LeftMenuItem.setLabel("Remove Left");\r
         remove2LeftMenuItem.addActionListener(this);\r
@@ -1944,6 +1943,8 @@ public void itemStateChanged(ItemEvent evt)
     sequenceFeatures.setLabel("Sequence Features");\r
     sequenceFeatures.addItemListener(this);\r
     sequenceFeatures.setState(false);\r
+    annotationColour.setLabel("by Annotation...");\r
+    annotationColour.addActionListener(this);\r
 \r
     alignFrameMenuBar.add(fileMenu);\r
         alignFrameMenuBar.add(editMenu);\r
@@ -2014,7 +2015,8 @@ public void itemStateChanged(ItemEvent evt)
         colourMenu.add(modifyConservation);\r
         colourMenu.add(abovePIDThreshold);\r
         colourMenu.add(modifyPID);\r
-        calculateMenu.add(sort);\r
+    colourMenu.add(annotationColour);\r
+    calculateMenu.add(sort);\r
         calculateMenu.add(calculate);\r
         calculateMenu.addSeparator();\r
         calculateMenu.add(pairwiseAlignmentMenuItem);\r
@@ -2103,6 +2105,7 @@ public void itemStateChanged(ItemEvent evt)
       viewPopup, colourPopup, calculatePopup, helpPopup;\r
   MenuItem featureSettings = new MenuItem();\r
   CheckboxMenuItem sequenceFeatures = new CheckboxMenuItem();\r
+  MenuItem annotationColour = new MenuItem();\r
 \r
   public void mousePressed(MouseEvent evt)\r
   {\r