use of org.csstudio.display.builder.representation.WidgetRepresentationFactory in project org.csstudio.display.builder by kasemir.
the class JFXRepresentation method initialize.
@Override
protected void initialize() {
final Map<String, WidgetRepresentationFactory<Parent, Node>> factories = new HashMap<>();
registerKnownRepresentations(factories);
final IExtensionRegistry registry = RegistryFactory.getRegistry();
if (registry != null) {
// which allows other plugins to contribute new widgets.
for (IConfigurationElement config : registry.getConfigurationElementsFor(WidgetRepresentation.EXTENSION_POINT)) {
final String type = config.getAttribute("type");
final String clazz = config.getAttribute("class");
logger.log(Level.CONFIG, "{0} contributes {1}", new Object[] { config.getContributor().getName(), clazz });
factories.put(type, createFactory(config));
}
}
for (Map.Entry<String, WidgetRepresentationFactory<Parent, Node>> entry : factories.entrySet()) register(entry.getKey(), entry.getValue());
if (!initialized_colormaps) {
for (PredefinedColorMaps.Predefined map : PredefinedColorMaps.PREDEFINED) NamedColorMappings.add(new NamedColorMapping(map.getName(), intensity -> ColorMappingFunction.getRGB(map.getColor(intensity))));
initialized_colormaps = true;
}
}
Aggregations