From 1db1f53588cf74844c414838eda44015a5bfdf70 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 24 Mar 2006 15:27:21 +0000 Subject: [PATCH] Annotation colour scheme added --- src/jalview/appletgui/AlignFrame.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index aceb508..189a36d 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -229,8 +229,7 @@ public class AlignFrame extends Frame implements ActionListener, fr.setColour(type, ucs.findColour("A")); } - sf = new SequenceFeature(type, desc, "", start, end); - sf.setFeatureGroup(featureGroup); + sf = new SequenceFeature(type, desc, "", start, end, featureGroup); seq.addSequenceFeature(sf); } @@ -423,6 +422,8 @@ public void itemStateChanged(ItemEvent evt) PIDColour_actionPerformed(); else if(evt.getSource()==BLOSUM62Colour) BLOSUM62Colour_actionPerformed(); + else if(evt.getSource()==annotationColour) + new AnnotationColourChooser(viewport, alignPanel); else if(evt.getSource()==sortPairwiseMenuItem) sortPairwiseMenuItem_actionPerformed(); else if(evt.getSource()==sortIDMenuItem) @@ -1689,8 +1690,8 @@ public void itemStateChanged(ItemEvent evt) protected Menu colourMenu = new Menu("Colour"); protected Menu calculateMenu = new Menu("Calculate"); protected MenuItem selectAllSequenceMenuItem = new MenuItem("Select all"); - protected MenuItem deselectAllSequenceMenuItem = new MenuItem(); - protected MenuItem invertSequenceMenuItem = new MenuItem(); + protected MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All"); + protected MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection"); protected MenuItem remove2LeftMenuItem = new MenuItem(); protected MenuItem remove2RightMenuItem = new MenuItem(); protected MenuItem removeGappedColumnMenuItem = new MenuItem(); @@ -1793,9 +1794,7 @@ public void itemStateChanged(ItemEvent evt) loadTree.addActionListener(this); selectAllSequenceMenuItem.addActionListener(this); - deselectAllSequenceMenuItem.setLabel("Deselect All"); deselectAllSequenceMenuItem.addActionListener(this); - invertSequenceMenuItem.setLabel("Invert Selection"); invertSequenceMenuItem.addActionListener(this); remove2LeftMenuItem.setLabel("Remove Left"); remove2LeftMenuItem.addActionListener(this); @@ -1944,6 +1943,8 @@ public void itemStateChanged(ItemEvent evt) sequenceFeatures.setLabel("Sequence Features"); sequenceFeatures.addItemListener(this); sequenceFeatures.setState(false); + annotationColour.setLabel("by Annotation..."); + annotationColour.addActionListener(this); alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); @@ -2014,7 +2015,8 @@ public void itemStateChanged(ItemEvent evt) colourMenu.add(modifyConservation); colourMenu.add(abovePIDThreshold); colourMenu.add(modifyPID); - calculateMenu.add(sort); + colourMenu.add(annotationColour); + calculateMenu.add(sort); calculateMenu.add(calculate); calculateMenu.addSeparator(); calculateMenu.add(pairwiseAlignmentMenuItem); @@ -2103,6 +2105,7 @@ public void itemStateChanged(ItemEvent evt) viewPopup, colourPopup, calculatePopup, helpPopup; MenuItem featureSettings = new MenuItem(); CheckboxMenuItem sequenceFeatures = new CheckboxMenuItem(); + MenuItem annotationColour = new MenuItem(); public void mousePressed(MouseEvent evt) { -- 1.7.10.2