- } catch (Exception e)
- {
- Cache.log.warn("Couldn't parse out graduated feature color.",
- e);
- }
- FeatureColourI gcol = new FeatureColour(mincol, maxcol,
- newcol.getMin(), newcol.getMax());
- if (newcol.hasAutoScale())
- {
- gcol.setAutoScaled(newcol.getAutoScale());
- }
- if (newcol.hasColourByLabel())
- {
- gcol.setColourByLabel(newcol.getColourByLabel());
- }
- if (newcol.hasThreshold())
- {
- gcol.setThreshold(newcol.getThreshold());
- }
- if (newcol.getThreshType().length() > 0)
- {
- String ttyp = newcol.getThreshType();
- if (ttyp.equalsIgnoreCase("ABOVE"))
- {
- gcol.setAboveThreshold(true);
- }
- if (ttyp.equalsIgnoreCase("BELOW"))
- {
- gcol.setBelowThreshold(true);
- }
- }
- fr.setColour(name = newcol.getName(), gcol);
- }
- else
- {
- Color color = new Color(
- Integer.parseInt(jucs.getColour(i).getRGB(), 16));
- fr.setColour(name = jucs.getColour(i).getName(),
- new FeatureColour(color));
- }
- fr.setOrder(name, (i == 0) ? 0 : i / jucs.getColourCount());
- }
- if (table != null)
+ /*
+ * load feature filters; loaded filters will replace any that are
+ * currently defined, other defined filters are left unchanged
+ */
+ for (int i = 0; i < jucs.getFilterCount(); i++)
+ {
+ jalview.schemabinding.version2.Filter filterModel = jucs
+ .getFilter(i);
+ String featureType = filterModel.getFeatureType();
+ FeatureMatcherSetI filter = Jalview2XML.unmarshalFilter(featureType,
+ filterModel.getMatcherSet());
+ if (!filter.isEmpty())