本文整理汇总了Java中org.cytoscape.application.swing.CytoPanel.setSelectedIndex方法的典型用法代码示例。如果您正苦于以下问题:Java CytoPanel.setSelectedIndex方法的具体用法?Java CytoPanel.setSelectedIndex怎么用?Java CytoPanel.setSelectedIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cytoscape.application.swing.CytoPanel
的用法示例。
在下文中一共展示了CytoPanel.setSelectedIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showPanel
import org.cytoscape.application.swing.CytoPanel; //导入方法依赖的package包/类
public void showPanel() {
synchronized (panelMutex) {
if (cytoPanelComponent == null) {
getPanel();
setNetworkView(applicationManager.getCurrentNetworkView());
}
if (!panelVisible) {
registrar.registerService(cytoPanelComponent, CytoPanelComponent.class, new Properties());
panelVisible = true;
}
CytoPanel panel = application.getCytoPanel(cytoPanelComponent.getCytoPanelName());
int index = panel.indexOfComponent(cytoPanelComponent.getIdentifier());
if (panel.getState() == CytoPanelState.HIDE) {
panel.setState(CytoPanelState.DOCK);
}
if (index != -1) {
panel.setSelectedIndex(index);
}
}
}
示例2: run
import org.cytoscape.application.swing.CytoPanel; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor arg0) throws Exception {
// TODO Auto-generated method stub
synchronized (this) {
MyControlPanel mainPanel = null;
// First we must make sure that the app is not already open
if (!isOpen()) {
mainPanel = new MyControlPanel(swingApplication, registrar, appManager);
registrar.registerService(mainPanel, CytoPanelComponent.class, new Properties());
} else {
mainPanel = getMainPanel();
}
if (mainPanel != null) {
CytoPanel cytoPanel = swingApplication.getCytoPanel(CytoPanelName.WEST);;
int index = cytoPanel.indexOfComponent(mainPanel);
cytoPanel.setSelectedIndex(index);
}
}
}
示例3: bringToFront
import org.cytoscape.application.swing.CytoPanel; //导入方法依赖的package包/类
private void bringToFront(CytoPanelComponent panel) {
CytoPanelName compassPoint = panel.getCytoPanelName();
Component component = panel.getComponent();
CytoPanel cytoPanel = swingApplication.getCytoPanel(compassPoint);
cytoPanel.setState(CytoPanelState.DOCK);
int index = cytoPanel.indexOfComponent(component);
cytoPanel.setSelectedIndex(index);
}
示例4: createTaskIterator
import org.cytoscape.application.swing.CytoPanel; //导入方法依赖的package包/类
@Override
public TaskIterator createTaskIterator(View<CyEdge> view, CyNetworkView networkView) {
CytoPanel eastPanel = swingApplication.getCytoPanel(CytoPanelName.EAST);
eastPanel.setState(CytoPanelState.DOCK);
int index = eastPanel.indexOfComponent(evidencePanelComponent.getComponent());
eastPanel.setSelectedIndex(index);
return new TaskIterator(new NoOpTask());
}