JAL-1385 JAL-535 refactor sequence colour settings to abstract alignment view model
[jalview.git] / src / jalview / appletgui / AlignViewport.java
index bf6cce3..9e4f071 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
+ * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
+ *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
@@ -22,7 +22,6 @@ import java.util.*;
 import java.awt.*;
 
 import jalview.analysis.*;
-import jalview.api.AlignCalcManagerI;
 import jalview.api.AlignViewportI;
 import jalview.bin.*;
 import jalview.datamodel.*;
@@ -30,8 +29,6 @@ import jalview.schemes.*;
 import jalview.structure.SelectionSource;
 import jalview.structure.VamsasSource;
 import jalview.viewmodel.AlignmentViewport;
-import jalview.workers.ConservationThread;
-import jalview.workers.ConsensusThread;
 
 public class AlignViewport extends AlignmentViewport implements
         AlignViewportI, SelectionSource, VamsasSource
@@ -94,8 +91,6 @@ public class AlignViewport extends AlignmentViewport implements
 
   public jalview.bin.JalviewLite applet;
 
-  Hashtable sequenceColours;
-
   boolean MAC = false;
 
   Stack historyList = new Stack();
@@ -595,35 +590,6 @@ public class AlignViewport extends AlignmentViewport implements
     showHiddenMarkers = show;
   }
 
-  public Color getSequenceColour(SequenceI seq)
-  {
-    if (sequenceColours == null || !sequenceColours.containsKey(seq))
-    {
-      return Color.white;
-    }
-    else
-    {
-      return (Color) sequenceColours.get(seq);
-    }
-  }
-
-  public void setSequenceColour(SequenceI seq, Color col)
-  {
-    if (sequenceColours == null)
-    {
-      sequenceColours = new Hashtable();
-    }
-
-    if (col == null)
-    {
-      sequenceColours.remove(seq);
-    }
-    else
-    {
-      sequenceColours.put(seq, col);
-    }
-  }
-
   boolean centreColumnLabels;
 
   public boolean getCentreColumnLabels()
@@ -631,21 +597,6 @@ public class AlignViewport extends AlignmentViewport implements
     return centreColumnLabels;
   }
 
-  public void updateSequenceIdColours()
-  {
-
-    for (SequenceGroup sg : alignment.getGroups())
-    {
-      if (sg.idColour != null)
-      {
-        for (SequenceI s : sg.getSequences(getHiddenRepSequences()))
-        {
-          this.setSequenceColour(s, sg.idColour);
-        }
-      }
-    }
-  }
-
   public boolean followHighlight = true;
 
   public boolean getFollowHighlight()