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);
}
Aggregations