Search in sources :

Example 1 with RTreeFactory

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());
}
Also used : RTreeFactory(org.cytoscape.spacial.internal.rtree.RTreeFactory) Properties(java.util.Properties)

Example 2 with RTreeFactory

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);
}
Also used : CyRootNetworkManagerImpl(org.cytoscape.model.internal.CyRootNetworkManagerImpl) DVisualLexicon(org.cytoscape.ding.DVisualLexicon) RTreeFactory(org.cytoscape.spacial.internal.rtree.RTreeFactory) Before(org.junit.Before)

Example 3 with RTreeFactory

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);
}
Also used : DVisualLexicon(org.cytoscape.ding.DVisualLexicon) RTreeFactory(org.cytoscape.spacial.internal.rtree.RTreeFactory) Before(org.junit.Before)

Aggregations

RTreeFactory (org.cytoscape.spacial.internal.rtree.RTreeFactory)3 DVisualLexicon (org.cytoscape.ding.DVisualLexicon)2 Before (org.junit.Before)2 Properties (java.util.Properties)1 CyRootNetworkManagerImpl (org.cytoscape.model.internal.CyRootNetworkManagerImpl)1