Skip to content

Commit

Permalink
fully functioning create network and cytopanel start
Browse files Browse the repository at this point in the history
  • Loading branch information
ermismd committed Aug 27, 2023
1 parent 976ea7c commit 1e06678
Show file tree
Hide file tree
Showing 5 changed files with 666 additions and 293 deletions.
25 changes: 22 additions & 3 deletions src/main/java/be/kuleuven/mgG/internal/model/MGGManager.java
Expand Up @@ -34,6 +34,8 @@
import be.kuleuven.mgG.internal.tasks.ImportFileTaskFactory;
import be.kuleuven.mgG.internal.tasks.SendDataToServerTaskFactory;
import be.kuleuven.mgG.internal.view.JSONDisplayPanel;
import be.kuleuven.mgG.internal.view.MGGCytoPanel;


import org.cytoscape.application.CyApplicationManager;
import org.cytoscape.application.events.SetCurrentNetworkListener;
Expand Down Expand Up @@ -79,9 +81,11 @@ public class MGGManager implements SessionAboutToBeSavedListener, SessionLoadedL

final AvailableCommands availableCommands;
final CommandExecutorTaskFactory ceTaskFactory;
//-----------------------------------------------------------
private MGGCytoPanel cytoPanel = null;



private CyNetwork newNetwork = null;
//----------------------------------------------------------
private JSONObject jsonObject;
private JSONObject serverResponse;

Expand Down Expand Up @@ -157,6 +161,21 @@ public JSONObject getServerResponse() {
return this.serverResponse;
}

//-----------------------------addition------------------------------for cytopanel------------------------------------------------------------------------------------------

public void setCytoPanel(MGGCytoPanel panel) {
this.cytoPanel = panel;
}

public CyNetwork getCurrentNetwork() {
CyNetwork network = cyRegistrar.getService(CyApplicationManager.class).getCurrentNetwork();
if (network != null) return network;
return newNetwork;
}



//------------------------------------------------SErvice Register and execute Tasks-----------------------------------------------------------------------------------------------

/**
* Executes a set of tasks.
Expand Down Expand Up @@ -227,7 +246,7 @@ public void unregisterService(Object service, Class<?> serviceClass) {




//------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Expand Down

0 comments on commit 1e06678

Please sign in to comment.