JAL-3184 class Javadoc added
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Sat, 12 Jan 2019 10:31:55 +0000 (10:31 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Sat, 12 Jan 2019 10:31:55 +0000 (10:31 +0000)
src/jalview/viewmodel/seqfeatures/FeatureRendererSettings.java

index f594453..02b7f35 100644 (file)
@@ -30,6 +30,17 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+/**
+ * A data bean that holds
+ * <ul>
+ * <li>feature types and their render order</li>
+ * <li>feature groups and their visibility</li>
+ * <li>colour for each feature type</li>
+ * <li>filters (if any) for each feature type</li>
+ * <li>feature colour transparency</li>
+ * </ul>
+ * Note that feature type visibility settings are not held here.
+ */
 public class FeatureRendererSettings implements Cloneable
 {
   String[] renderOrder;
@@ -60,12 +71,12 @@ public class FeatureRendererSettings implements Cloneable
   {
     super();
     this.renderOrder = Arrays.copyOf(renderOrder, renderOrder.length);
-    this.featureGroups = new ConcurrentHashMap<String, Boolean>(
+    this.featureGroups = new ConcurrentHashMap<>(
             featureGroups);
-    this.featureColours = new ConcurrentHashMap<String, FeatureColourI>(
+    this.featureColours = new ConcurrentHashMap<>(
             featureColours);
     this.transparency = transparency;
-    this.featureOrder = new ConcurrentHashMap<String, Float>(featureOrder);
+    this.featureOrder = new ConcurrentHashMap<>(featureOrder);
   }
 
   /**
@@ -77,10 +88,10 @@ public class FeatureRendererSettings implements Cloneable
           jalview.viewmodel.seqfeatures.FeatureRendererModel fr)
   {
     renderOrder = null;
-    featureGroups = new ConcurrentHashMap<String, Boolean>();
-    featureColours = new ConcurrentHashMap<String, FeatureColourI>();
+    featureGroups = new ConcurrentHashMap<>();
+    featureColours = new ConcurrentHashMap<>();
     featureFilters = new HashMap<>();
-    featureOrder = new ConcurrentHashMap<String, Float>();
+    featureOrder = new ConcurrentHashMap<>();
 
     if (fr.renderOrder != null)
     {
@@ -90,12 +101,12 @@ public class FeatureRendererSettings implements Cloneable
     }
     if (fr.featureGroups != null)
     {
-      this.featureGroups = new ConcurrentHashMap<String, Boolean>(
+      this.featureGroups = new ConcurrentHashMap<>(
               fr.featureGroups);
     }
     if (fr.featureColours != null)
     {
-      this.featureColours = new ConcurrentHashMap<String, FeatureColourI>(
+      this.featureColours = new ConcurrentHashMap<>(
               fr.featureColours);
     }
     Iterator<String> en = fr.featureColours.keySet().iterator();
@@ -118,7 +129,7 @@ public class FeatureRendererSettings implements Cloneable
     this.transparency = fr.transparency;
     if (fr.featureOrder != null)
     {
-      this.featureOrder = new ConcurrentHashMap<String, Float>(
+      this.featureOrder = new ConcurrentHashMap<>(
               fr.featureOrder);
     }
   }