From: jprocter Date: Wed, 31 Oct 2007 15:08:48 +0000 (+0000) Subject: introduce new type to pass around featureRendererSettings X-Git-Tag: Release_2_4~214 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e9ac96df353c7f57330e1a5e9d4f651e98e49130;p=jalview.git introduce new type to pass around featureRendererSettings --- diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index a1de62e..b643efb 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -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;