+ Map featureGroups;
+
+ Map featureColours;
+
+ float transparency;
+
+ Map 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;
+ }
+
+ /**
+ * create an independent instance of the feature renderer settings
+ *
+ * @param fr
+ */
+ public FeatureRendererSettings(FeatureRenderer fr)
+ {
+ renderOrder = null;
+ featureGroups = new ConcurrentHashMap();
+ featureColours = new ConcurrentHashMap();
+ featureOrder = new ConcurrentHashMap();
+ if (fr.renderOrder != null)
+ {
+ this.renderOrder = new String[fr.renderOrder.length];
+ System.arraycopy(fr.renderOrder, 0, renderOrder, 0,
+ fr.renderOrder.length);
+ }
+ if (fr.featureGroups != null)
+ {
+ this.featureGroups = new ConcurrentHashMap(fr.featureGroups);
+ }
+ if (fr.featureColours != null)
+ {
+ this.featureColours = new ConcurrentHashMap(fr.featureColours);
+ }
+ Iterator en = fr.featureColours.keySet().iterator();
+ while (en.hasNext())
+ {
+ Object next = en.next();
+ Object val = featureColours.get(next);
+ if (val instanceof GraduatedColor)
+ {
+ featureColours
+ .put(next, new GraduatedColor((GraduatedColor) val));
+ }
+ }
+ this.transparency = fr.transparency;
+ if (fr.featureOrder != null)
+ {
+ this.featureOrder = new ConcurrentHashMap(fr.featureOrder);
+ }
+ }
+ }
+
+ public FeatureRendererSettings getSettings()
+ {
+ return new FeatureRendererSettings(this);
+ }
+
+ public void transferSettings(FeatureRendererSettings fr)