Search in sources :

Example 16 with CyNetworkView

use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.

the class SetCurrentNetworkViewEventTest method testGoodGetNetworkView.

@Test
public void testGoodGetNetworkView() {
    CyApplicationManager source = mock(CyApplicationManager.class);
    CyNetworkView n = mock(CyNetworkView.class);
    SetCurrentNetworkViewEvent e = new SetCurrentNetworkViewEvent(source, n);
    assertNotNull(e.getNetworkView());
    assertEquals(n, e.getNetworkView());
}
Also used : CyApplicationManager(org.cytoscape.application.CyApplicationManager) SetCurrentNetworkViewEvent(org.cytoscape.application.events.SetCurrentNetworkViewEvent) CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Example 17 with CyNetworkView

use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.

the class VizmapEventsTest method testVisualStyleSetEvent.

@Test
public void testVisualStyleSetEvent() {
    final CyNetworkView view = mock(CyNetworkView.class);
    final VisualStyleSetEvent event = new VisualStyleSetEvent(manager, style, view);
    assertEquals(style, event.getVisualStyle());
    assertEquals(view, event.getNetworkView());
}
Also used : VisualStyleSetEvent(org.cytoscape.view.vizmap.events.VisualStyleSetEvent) CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Example 18 with CyNetworkView

use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.

the class AbstractNetworkViewEventTest method testGetNetworkView.

@Test
public final void testGetNetworkView() {
    final CyNetworkViewManager networkViewManager = mock(CyNetworkViewManager.class);
    final CyNetworkView networkView = mock(CyNetworkView.class);
    final AbstractNetworkViewEvent event = new AbstractNetworkViewEvent(networkViewManager, Object.class, networkView);
    assertEquals("Network returned by getNetworkView() is *not* the one passed into the constructor!", networkView, event.getNetworkView());
}
Also used : CyNetworkViewManager(org.cytoscape.view.model.CyNetworkViewManager) CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Example 19 with CyNetworkView

use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.

the class FitContentEventTest method testEvents.

@Test
public void testEvents() {
    CyNetworkView networkView = mock(CyNetworkView.class);
    FitContentEvent ev3 = new FitContentEvent(networkView);
    assertEquals(networkView, ev3.getSource());
}
Also used : CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Example 20 with CyNetworkView

use of org.cytoscape.view.model.CyNetworkView in project cytoscape-api by cytoscape.

the class FitSelectedEventTest method testEvents.

@Test
public void testEvents() {
    CyNetworkView networkView = mock(CyNetworkView.class);
    FitSelectedEvent ev3 = new FitSelectedEvent(networkView);
    assertEquals(networkView, ev3.getSource());
}
Also used : CyNetworkView(org.cytoscape.view.model.CyNetworkView) Test(org.junit.Test)

Aggregations

CyNetworkView (org.cytoscape.view.model.CyNetworkView)41 Test (org.junit.Test)16 CyNetwork (org.cytoscape.model.CyNetwork)13 EnrichmentMap (org.baderlab.csplugins.enrichmentmap.model.EnrichmentMap)10 VisualStyle (org.cytoscape.view.vizmap.VisualStyle)8 CyNode (org.cytoscape.model.CyNode)7 HashMap (java.util.HashMap)5 JPanel (javax.swing.JPanel)5 CyEdge (org.cytoscape.model.CyEdge)5 TaskIterator (org.cytoscape.work.TaskIterator)5 Timer (javax.swing.Timer)4 EMDataSet (org.baderlab.csplugins.enrichmentmap.model.EMDataSet)4 EMSignatureDataSet (org.baderlab.csplugins.enrichmentmap.model.EMSignatureDataSet)4 CyTable (org.cytoscape.model.CyTable)4 CyCustomGraphics2 (org.cytoscape.view.presentation.customgraphics.CyCustomGraphics2)4 Inject (com.google.inject.Inject)3 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 HashSet (java.util.HashSet)3 List (java.util.List)3