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

Working on some basic object passing tests

parent a8d55579
Branches
Tags
No related merge requests found
...@@ -15,6 +15,7 @@ import org.cytoscape.application.swing.CytoPanelName; ...@@ -15,6 +15,7 @@ import org.cytoscape.application.swing.CytoPanelName;
import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader;
import de.hhu.ba.yoshikoWrapper.swig.LibraryInterface; 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 /**This class describes the Swing Panel that the user interacts with in cytoscape
* @author Philipp Spohr, Aug 6, 2017 * @author Philipp Spohr, Aug 6, 2017
...@@ -28,7 +29,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -28,7 +29,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
private static final long serialVersionUID = 6214827920591046457L; private static final long serialVersionUID = 6214827920591046457L;
//SYMBOLIC LINKS //SYMBOLIC LINKS
private YoshikoLoader yoshikoInterface = YoshikoLoader.getInstance(); private YoshikoLoader yoshikoLoader = YoshikoLoader.getInstance();
private MainPanel self = this; //for lambda function references private MainPanel self = this; //for lambda function references
//SWING COMPONENTS //SWING COMPONENTS
...@@ -44,7 +45,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -44,7 +45,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
//SWING COMPONENT INITIALIZATION //SWING COMPONENT INITIALIZATION
libStatusPanel = new LibStatusPanel(); libStatusPanel = new LibStatusPanel();
libStatusPanel.setStyle(yoshikoInterface.isLibraryLoaded()); libStatusPanel.setStyle(yoshikoLoader.isLibraryLoaded());
this.add(libStatusPanel); this.add(libStatusPanel);
searchLibButton = new JButton("SHOW YOSHIKO LIB"); searchLibButton = new JButton("SHOW YOSHIKO LIB");
...@@ -55,15 +56,35 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -55,15 +56,35 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
final YLibChooser c = new YLibChooser(); final YLibChooser c = new YLibChooser();
int returnVal = c.showOpenDialog(self); int returnVal = c.showOpenDialog(self);
if (returnVal == JFileChooser.APPROVE_OPTION) { 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()); yoshikoVersionLabel.setText(LibraryInterface.getVersionString());
} }
}); });
this.add(searchLibButton); 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"); yoshikoVersionLabel = new JLabel("YOSHIKO VERSION");
this.add(yoshikoVersionLabel); this.add(yoshikoVersionLabel);
......
/**
* @author Philipp Spohr, Aug 6, 2017
*
*/
package de.hhu.ba.yoshikoWrapper.swig;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment