use of org.cytoscape.spacial.internal.rtree.RTreeFactory in project cytoscape-impl by cytoscape.
the class CyActivator method startSpacial.
private void startSpacial(final BundleContext bc, final CyServiceRegistrar serviceRegistrar) {
RTreeFactory rtreeFactory = new RTreeFactory();
registerService(bc, rtreeFactory, SpacialIndex2DFactory.class, new Properties());
}
use of org.cytoscape.spacial.internal.rtree.RTreeFactory in project cytoscape-impl by cytoscape.
the class DGraphViewApplyTest method setUp.
@Before
public void setUp() throws Exception {
// Build real DGraphView object.
MockitoAnnotations.initMocks(this);
testSupport.getNetworkTableManager();
network = buildNetworkModel();
rootNetworkManager = new CyRootNetworkManagerImpl();
spacialFactory = new RTreeFactory();
dingLexicon = new DVisualLexicon(cgManager);
handleFactory = new HandleFactoryImpl();
when(serviceRegistrar.getService(CyRootNetworkManager.class)).thenReturn(rootNetworkManager);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(SpacialIndex2DFactory.class)).thenReturn(spacialFactory);
when(serviceRegistrar.getService(DialogTaskManager.class)).thenReturn(dialogTaskManager);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(IconManager.class)).thenReturn(iconManager);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(visualMappingManager);
when(serviceRegistrar.getService(CyNetworkViewManager.class)).thenReturn(networkViewManager);
dgv = new DGraphView(network, dingLexicon, vtfListener, annotationFactoryManager, dingGraphLOD, handleFactory, serviceRegistrar);
assertNotNull(dgv);
assertEquals(3, dgv.getModel().getNodeCount());
assertEquals(3, dgv.getModel().getEdgeCount());
nodeView1 = dgv.getDNodeView(node1);
nodeView2 = dgv.getDNodeView(node2);
nodeView3 = dgv.getDNodeView(node3);
ev1 = dgv.getDEdgeView(edge12);
ev2 = dgv.getDEdgeView(edge13);
ev3 = dgv.getDEdgeView(edge23);
}
use of org.cytoscape.spacial.internal.rtree.RTreeFactory in project cytoscape-impl by cytoscape.
the class DNodeViewTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
rootNetworkManager = netSupport.getRootNetworkFactory();
spacialFactory = new RTreeFactory();
when(serviceRegistrar.getService(CyRootNetworkManager.class)).thenReturn(rootNetworkManager);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(SpacialIndex2DFactory.class)).thenReturn(spacialFactory);
when(serviceRegistrar.getService(DialogTaskManager.class)).thenReturn(dialogTaskManager);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(IconManager.class)).thenReturn(iconManager);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(visualMappingManager);
when(serviceRegistrar.getService(CyNetworkViewManager.class)).thenReturn(networkViewManager);
when(serviceRegistrar.getService(CyApplicationConfiguration.class)).thenReturn(applicationConfiguration);
dingLexicon = new DVisualLexicon(mock(CustomGraphicsManager.class));
buildNetwork();
networkView = new DGraphView(network, dingLexicon, vtfListener, annotationFactoryManager, dingGraphLOD, handleFactory, serviceRegistrar);
dnv1 = (DNodeView) networkView.getDNodeView(node1);
dnv2 = (DNodeView) networkView.getDNodeView(node2);
}
Aggregations