brushes.add(new Fill((Color) getSetting(GRAPHICAL_BACKGROUND_COLOR)));
FillProvider provider = fillMap.get((String) getSetting(GRAPHICAL_FOREGROUND_FILL));
Object evaluator = getSetting(GRAPHICAL_EVALUATOR);
if (evaluator == NO_EVALUATOR) {
Brush b = provider.getFill((Color) getSetting(GRAPHICAL_FOREGROUND_COLOR));
Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
if (b instanceof StateSensitive) ((StateSensitive) b).setInterval(minimum, maximum);
brushes.add(b);
} else {
// Build evaluator brushes
Object evMapSetting = getSetting(GRAPHICAL_EVALUATOR_MAP);
if (evMapSetting instanceof Map) {
Map evMap = (Map) evMapSetting;
for (Object entry : evMap.entrySet()) {
if (entry instanceof Map.Entry) {
Object key = ((Map.Entry) entry).getKey();
Object value = ((Map.Entry) entry).getValue();
if (value instanceof Color && key instanceof String) {
Fill b = provider.getFill((Color) value);
Double minimum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MIN));
Double maximum = Double.parseDouble((String) getSetting(GRAPHICAL_FOREGROUND_MAX));
b.setInterval(minimum, maximum);
brushes.add(new ConditionalBrush(b, (String) key));
}
}
}
}