Commit 640e8dbe authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Trying to have a pop-out window - at least

parent 1d40634d
......@@ -23,14 +23,6 @@
package de.hhu.ba.yoshikoWrapper.cytoUtil;
import java.awt.Component;
import org.cytoscape.application.swing.CytoPanel;
import org.cytoscape.application.swing.CytoPanelComponent2;
import org.cytoscape.application.swing.CytoPanelName;
import de.hhu.ba.yoshikoWrapper.core.CyCore;
/**
* Helper functions that simplify the Cytoscape API that haven't found a home in any other class
*
......@@ -42,18 +34,24 @@ public class CyUtilities {
*/
public static void highlightCyBrowser() {
//We retrieve the result panel
CytoPanel resultPanel = CyCore.swing.getCytoPanel(CytoPanelName.EAST);
for (int i= 0; i< resultPanel.getCytoPanelComponentCount(); i++) {
Component component = resultPanel.getComponentAt(i);
if (component instanceof CytoPanelComponent2) {
CytoPanelComponent2 cmp = (CytoPanelComponent2) component;
if (cmp.getTitle().contains("YoshikoInfo")) {
resultPanel.setSelectedIndex(i);
return;
}
}
}
//CytoPanel resultPanel = CyCore.swing.getCytoPanel(CytoPanelName.EAST);
//VARIANT 1: FETCH BY TITLE OF TAB
// for (int i= 0; i< resultPanel.getCytoPanelComponentCount(); i++) {
// Component component = resultPanel.getComponentAt(i);
// if (component instanceof CytoPanelComponent2) {
// CytoPanelComponent2 cmp = (CytoPanelComponent2) component;
// if (cmp.getTitle().contains("YoshikoInfo")) {
// resultPanel.setSelectedIndex(i);
// return;
// }
// }
//
// }
//VARIANT 2: FETCH BY CLASS OF TAB COMPONENT
// int index = resultPanel.indexOfComponent("edu.ucsf.rbvi.cyBrowser.internal.view.ResultsPanelBrowser");
// if (index != -1) {
// resultPanel.setSelectedIndex(index);
......
......@@ -29,7 +29,8 @@ public final class HelpLinks {
public static final Map<String, Object> mainInfo = new HashMap<String,Object>();
static {
mainInfo.put("url", "file:///home/philipp/workspace/cs/cytoscape-tutorials/presentations/yoshiko.html");
mainInfo.put("title", "YoshikoInfo");
mainInfo.put("title", "Yoshiko Info");
//mainInfo.put("id", "AboutYoshiko");
//mainInfo.put("url", "https://spqrph.github.io/cytoscape-tutorials/presentations/yoshiko.html#/title");
}
......
......@@ -33,7 +33,6 @@ import javax.swing.JButton;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.cytoUtil.CommandExecutor;
import de.hhu.ba.yoshikoWrapper.cytoUtil.CyUtilities;
import de.hhu.ba.yoshikoWrapper.help.HelpLinks;
import de.hhu.ba.yoshikoWrapper.swing.GraphicsLoader;
......@@ -72,9 +71,9 @@ public class HelpButton extends JButton{
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
CommandExecutor.executeCommand("cybrowser", "show",HelpLinks.mainInfo , null);
CommandExecutor.executeCommand("cybrowser", "dialog",HelpLinks.mainInfo , null);
//Workaround to instantly select/highlight the CyBrowser tab
CyUtilities.highlightCyBrowser();
//CyUtilities.highlightCyBrowser();
}
}
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment