use of com.vaadin.addon.charts.model.AbstractConfigurationObject in project charts by vaadin.
the class ChartDesignWriter method writeCollection.
private static void writeCollection(AbstractConfigurationObject configuration, Element parent, Field field, Collection collection, DesignContext context) {
if (!collection.isEmpty()) {
if (containsConfigurationObjects(collection)) {
for (Object o : collection) {
String tagName = o.getClass().getSimpleName() + "s";
createElementForConfigurationObject((AbstractConfigurationObject) o, parent, tagName, context);
}
} else {
writeCollectionElement(configuration, parent, field, collection);
}
}
}
use of com.vaadin.addon.charts.model.AbstractConfigurationObject in project charts by vaadin.
the class ChartDesignWriter method readFieldValue.
private static Object readFieldValue(AbstractConfigurationObject configuration, Field field) {
Object value = null;
try {
field.setAccessible(true);
value = field.get(configuration);
} catch (IllegalAccessException e) {
logger.log(Level.WARNING, "Could not get value from field " + field.getName() + " in " + configuration.getClass().getName());
}
return value;
}
Aggregations