From 942de34caf73a7d61104783c8d278c32eaf6b65d Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Jul 2008 12:31:53 +0000 Subject: [PATCH] Sequence label colour stored for each sequence group --- src/jalview/datamodel/SequenceGroup.java | 19 ++++++++++++++++++- src/jalview/gui/AlignFrame.java | 1 + src/jalview/gui/AlignViewport.java | 20 ++++++++++++++++++++ src/jalview/gui/TreeCanvas.java | 2 +- 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 24a2b2c..6ded8bd 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -46,7 +46,8 @@ public class SequenceGroup public ColourSchemeI cs; int startRes = 0; int endRes = 0; - Color outlineColour = Color.black; + public Color outlineColour = Color.black; + public Color idColour = null; public int thresholdTextColour = 0; public Color textColour = Color.black; public Color textColour2 = Color.white; @@ -625,4 +626,20 @@ public class SequenceGroup return seqs; } + + /** + * @return the idColour + */ + public Color getIdColour() + { + return idColour; + } + + /** + * @param idColour the idColour to set + */ + public void setIdColour(Color idColour) + { + this.idColour = idColour; + } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 39a7fac..15cbf01 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3911,6 +3911,7 @@ public void drop(DropTargetDropEvent evt) { alignPanel.adjustAnnotationHeight(); + viewport.updateSequenceIdColours(); buildSortByAnnotationScoresMenu(); alignPanel.paintAlignment(true); } diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 652d8d1..f798671 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1907,4 +1907,24 @@ public class AlignViewport { centreColumnLabels = centrecolumnlabels; } + public void updateSequenceIdColours() + { + Vector groups = alignment.getGroups(); + if (sequenceColours==null) + { + sequenceColours = new Hashtable(); + } + for (int ig=0,igSize=groups.size(); ig