From 98aff5db207ed8b6d7cd13b17986b22334a638b3 Mon Sep 17 00:00:00 2001 From: Philipp Spohr <spohr.philipp@web.de> Date: Wed, 9 Aug 2017 17:51:53 +0200 Subject: [PATCH] Working on some basic object passing tests --- .../hhu/ba/yoshikoWrapper/gui/MainPanel.java | 29 ++++++++++++++++--- .../ba/yoshikoWrapper/swig/package-info.java | 5 ---- 2 files changed, 25 insertions(+), 9 deletions(-) delete mode 100644 src/main/java/de/hhu/ba/yoshikoWrapper/swig/package-info.java diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java index 7638707..6e59ff5 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java @@ -15,6 +15,7 @@ import org.cytoscape.application.swing.CytoPanelName; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; import de.hhu.ba.yoshikoWrapper.swig.LibraryInterface; +import de.hhu.ba.yoshikoWrapper.swig.SWIGTYPE_p_ysk__ClusterEditingInstance; /**This class describes the Swing Panel that the user interacts with in cytoscape * @author Philipp Spohr, Aug 6, 2017 @@ -28,7 +29,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { private static final long serialVersionUID = 6214827920591046457L; //SYMBOLIC LINKS - private YoshikoLoader yoshikoInterface = YoshikoLoader.getInstance(); + private YoshikoLoader yoshikoLoader = YoshikoLoader.getInstance(); private MainPanel self = this; //for lambda function references //SWING COMPONENTS @@ -44,7 +45,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { //SWING COMPONENT INITIALIZATION libStatusPanel = new LibStatusPanel(); - libStatusPanel.setStyle(yoshikoInterface.isLibraryLoaded()); + libStatusPanel.setStyle(yoshikoLoader.isLibraryLoaded()); this.add(libStatusPanel); searchLibButton = new JButton("SHOW YOSHIKO LIB"); @@ -55,15 +56,35 @@ public class MainPanel extends JPanel implements CytoPanelComponent { final YLibChooser c = new YLibChooser(); int returnVal = c.showOpenDialog(self); if (returnVal == JFileChooser.APPROVE_OPTION) { - yoshikoInterface.loadLibrary(c.getSelectedFile().getAbsolutePath()); + yoshikoLoader.loadLibrary(c.getSelectedFile().getAbsolutePath()); } - libStatusPanel.setStyle(yoshikoInterface.isLibraryLoaded()); + libStatusPanel.setStyle(yoshikoLoader.isLibraryLoaded()); yoshikoVersionLabel.setText(LibraryInterface.getVersionString()); } }); this.add(searchLibButton); + // + // + //TODO: REMOVE IN FINAL RELEASE + JButton debugGraphActionButton = new JButton("DO MYSTERIOUS DEBUG STUFF"); + debugGraphActionButton.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + if (yoshikoLoader.isLibraryLoaded()){ + SWIGTYPE_p_ysk__ClusterEditingInstance testInstance = LibraryInterface.new_ClusterEditingInstance(); + LibraryInterface.ClusterEditingInstance_initEdge(testInstance, edge, 0.5, false, false); + } + } + + }); + this.add(debugGraphActionButton); + // + // + // + yoshikoVersionLabel = new JLabel("YOSHIKO VERSION"); this.add(yoshikoVersionLabel); diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/swig/package-info.java b/src/main/java/de/hhu/ba/yoshikoWrapper/swig/package-info.java deleted file mode 100644 index 43df405..0000000 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/swig/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @author Philipp Spohr, Aug 6, 2017 - * - */ -package de.hhu.ba.yoshikoWrapper.swig; \ No newline at end of file -- GitLab