introduce new type to pass around featureRendererSettings
authorjprocter <Jim Procter>
Wed, 31 Oct 2007 15:08:48 +0000 (15:08 +0000)
committerjprocter <Jim Procter>
Wed, 31 Oct 2007 15:08:48 +0000 (15:08 +0000)
src/jalview/gui/FeatureRenderer.java

index a1de62e..b643efb 100755 (executable)
@@ -72,7 +72,44 @@ public class FeatureRenderer
     this.av = ap.av;
   }
 
-
+  public class FeatureRendererSettings implements Cloneable {
+    String[] renderOrder;
+    Hashtable featureGroups;
+    Hashtable featureColours;
+    float transparency;
+    Hashtable featureOrder;
+    public FeatureRendererSettings(String[] renderOrder,
+            Hashtable featureGroups, Hashtable featureColours,
+            float transparency, Hashtable featureOrder)
+    {
+      super();
+      this.renderOrder = renderOrder;
+      this.featureGroups = featureGroups;
+      this.featureColours = featureColours;
+      this.transparency = transparency;
+      this.featureOrder = featureOrder;
+    }
+    public FeatureRendererSettings(FeatureRenderer fr)
+    {
+      this.renderOrder = fr.renderOrder;
+      this.featureGroups = fr.featureGroups;
+      this.featureColours = fr.featureColours;
+      this.transparency = fr.transparency;
+      this.featureOrder = fr.featureOrder;
+    }
+  }
+  public FeatureRendererSettings getSettings()
+  {
+    return new FeatureRendererSettings(this);
+  }
+  public void transferSettings(FeatureRendererSettings fr)
+  {
+    this.renderOrder = fr.renderOrder;
+    this.featureGroups = fr.featureGroups;
+    this.featureColours = fr.featureColours;
+    this.transparency = fr.transparency;
+    this.featureOrder = fr.featureOrder;
+  }
   public void transferSettings(FeatureRenderer fr)
   {
     this.renderOrder = fr.renderOrder;