use of org.cytoscape.view.vizmap.internal.mappings.PassthroughMappingFactory in project cytoscape-impl by cytoscape.
the class CyActivator method start.
@Override
public void start(BundleContext bc) {
final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
// Mapping Factories:
final DiscreteMappingFactory dmFactory = new DiscreteMappingFactory(serviceRegistrar);
{
final Properties props = new Properties();
props.setProperty("service.type", "factory");
props.setProperty("mapping.type", "discrete");
registerService(bc, dmFactory, VisualMappingFunctionFactory.class, props);
}
final ContinuousMappingFactory cmFactory = new ContinuousMappingFactory(serviceRegistrar);
{
final Properties props = new Properties();
props.setProperty("service.type", "factory");
props.setProperty("mapping.type", "continuous");
registerService(bc, cmFactory, VisualMappingFunctionFactory.class, props);
}
final PassthroughMappingFactory pmFactory = new PassthroughMappingFactory(serviceRegistrar);
{
final Properties props = new Properties();
props.setProperty("service.type", "factory");
props.setProperty("mapping.type", "passthrough");
registerService(bc, pmFactory, VisualMappingFunctionFactory.class, props);
registerServiceListener(bc, pmFactory::addValueTranslator, pmFactory::removeValueTranslator, ValueTranslator.class);
}
final VisualStyleFactoryImpl visualStyleFactory = new VisualStyleFactoryImpl(serviceRegistrar, pmFactory);
registerService(bc, visualStyleFactory, VisualStyleFactory.class);
final VisualMappingManagerImpl visualMappingManager = new VisualMappingManagerImpl(visualStyleFactory, serviceRegistrar);
registerAllServices(bc, visualMappingManager);
}
Aggregations