From 1d40634d1338532adb1b14f02fc9478fb1354d52 Mon Sep 17 00:00:00 2001 From: Philipp Spohr <spohr.philipp@web.de> Date: Thu, 1 Mar 2018 12:31:50 +0100 Subject: [PATCH] Changed title of CyBrowser, still no success --- .../de/hhu/ba/yoshikoWrapper/cytoUtil/CyUtilities.java | 8 ++++---- .../java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/CyUtilities.java b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/CyUtilities.java index c01e49b..6c96b09 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/CyUtilities.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/cytoUtil/CyUtilities.java @@ -26,7 +26,7 @@ package de.hhu.ba.yoshikoWrapper.cytoUtil; import java.awt.Component; import org.cytoscape.application.swing.CytoPanel; -import org.cytoscape.application.swing.CytoPanelComponent; +import org.cytoscape.application.swing.CytoPanelComponent2; import org.cytoscape.application.swing.CytoPanelName; import de.hhu.ba.yoshikoWrapper.core.CyCore; @@ -45,9 +45,9 @@ public class CyUtilities { CytoPanel resultPanel = CyCore.swing.getCytoPanel(CytoPanelName.EAST); for (int i= 0; i< resultPanel.getCytoPanelComponentCount(); i++) { Component component = resultPanel.getComponentAt(i); - if (component instanceof CytoPanelComponent) { - CytoPanelComponent cmp = (CytoPanelComponent) component; - if (cmp.getTitle().equals("CyBrowser")) { + if (component instanceof CytoPanelComponent2) { + CytoPanelComponent2 cmp = (CytoPanelComponent2) component; + if (cmp.getTitle().contains("YoshikoInfo")) { resultPanel.setSelectedIndex(i); return; } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java b/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java index 90537e4..50e8701 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/help/HelpLinks.java @@ -29,6 +29,7 @@ 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("url", "https://spqrph.github.io/cytoscape-tutorials/presentations/yoshiko.html#/title"); } -- GitLab