Merge branch 'features/JAL-2393customMatrices' into develop
[jalview.git] / src / jalview / io / packed / JalviewDataset.java
index 817ba9c..9f84c16 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.io.packed;
 
+import jalview.analysis.TreeModel;
+import jalview.api.FeatureColourI;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
 import jalview.io.NewickFile;
@@ -57,7 +59,7 @@ public class JalviewDataset
   /**
    * @return the featureColours
    */
-  public Map<String, Object> getFeatureColours()
+  public Map<String, FeatureColourI> getFeatureColours()
   {
     return featureColours;
   }
@@ -66,7 +68,7 @@ public class JalviewDataset
    * @param featureColours
    *          the featureColours to set
    */
-  public void setFeatureColours(Map<String, Object> featureColours)
+  public void setFeatureColours(Map<String, FeatureColourI> featureColours)
   {
     this.featureColours = featureColours;
   }
@@ -150,8 +152,7 @@ public class JalviewDataset
       {
         // the following works because all trees are already had node/SequenceI
         // associations created.
-        jalview.analysis.NJTree njt = new jalview.analysis.NJTree(
-                al.getSequencesArray(), nf);
+        TreeModel njt = new TreeModel(al.getSequencesArray(), null, nf);
         // this just updates the displayed leaf name on the tree according to
         // the SequenceIs.
         njt.renameAssociatedNodes();
@@ -187,7 +188,7 @@ public class JalviewDataset
   /**
    * current set of feature colours
    */
-  Map<String, Object> featureColours;
+  Map<String, FeatureColourI> featureColours;
 
   /**
    * original identity of each sequence in results
@@ -201,7 +202,7 @@ public class JalviewDataset
     seqDetails = new Hashtable();
     al = new ArrayList<AlignmentSet>();
     parentDataset = null;
-    featureColours = new HashMap<String, Object>();
+    featureColours = new HashMap<String, FeatureColourI>();
   }
 
   /**
@@ -209,8 +210,8 @@ public class JalviewDataset
    * 
    * @param parentAlignment
    */
-  public JalviewDataset(AlignmentI aldataset, Map<String, Object> fc,
-          Hashtable seqDets)
+  public JalviewDataset(AlignmentI aldataset,
+          Map<String, FeatureColourI> fc, Hashtable seqDets)
   {
     // TODO not used - remove?
     this(aldataset, fc, seqDets, null);
@@ -231,8 +232,9 @@ public class JalviewDataset
    *          (may be null) alignment to associate new annotation and trees
    *          with.
    */
-  public JalviewDataset(AlignmentI aldataset, Map<String, Object> fc,
-          Hashtable seqDets, AlignmentI parentAlignment)
+  public JalviewDataset(AlignmentI aldataset,
+          Map<String, FeatureColourI> fc, Hashtable seqDets,
+          AlignmentI parentAlignment)
   {
     this();
     parentDataset = aldataset;