Search in sources :

Example 1 with CytoPanelComponent

use of org.cytoscape.application.swing.CytoPanelComponent in project EnrichmentMapApp by BaderLab.

the class ControlPanelMediator method showControlPanel.

public void showControlPanel() {
    CytoPanelComponent panel = null;
    try {
        panel = serviceRegistrar.getService(CytoPanelComponent.class, "(id=" + ControlPanel.ID + ")");
    } catch (Exception ex) {
    }
    if (panel == null) {
        panel = controlPanelProvider.get();
        Properties props = new Properties();
        props.setProperty("id", ControlPanel.ID);
        serviceRegistrar.registerService(panel, CytoPanelComponent.class, props);
        if (firstTime && emManager.getAllEnrichmentMaps().isEmpty()) {
            firstTime = false;
            controlPanelProvider.get().getCreateEmButton().doClick();
        } else {
            setCurrentNetworkView(applicationManager.getCurrentNetworkView());
        }
    }
    // Select the panel
    CytoPanel cytoPanel = swingApplication.getCytoPanel(panel.getCytoPanelName());
    int index = cytoPanel.indexOfComponent(ControlPanel.ID);
    if (index >= 0)
        cytoPanel.setSelectedIndex(index);
}
Also used : CytoPanel(org.cytoscape.application.swing.CytoPanel) Properties(java.util.Properties) CytoPanelComponent(org.cytoscape.application.swing.CytoPanelComponent)

Aggregations

Properties (java.util.Properties)1 CytoPanel (org.cytoscape.application.swing.CytoPanel)1 CytoPanelComponent (org.cytoscape.application.swing.CytoPanelComponent)1