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 763870777c57d436f7d6d20c040a39b27ca51a69..6e59ff509d1ea43f952f3fafd5ca6c6fe8bc9fdb 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 43df405012db963c5ebc4726a3a973a83e4b29d9..0000000000000000000000000000000000000000 --- 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