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;
{
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);
}
/**
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)
{
}
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();
this.transparency = fr.transparency;
if (fr.featureOrder != null)
{
- this.featureOrder = new ConcurrentHashMap<String, Float>(
+ this.featureOrder = new ConcurrentHashMap<>(
fr.featureOrder);
}
}