Skip to content
Snippets Groups Projects
Commit 640e8dbe authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Trying to have a pop-out window - at least

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