From 14fa1d250478c246b53b69674f734266bdaf27a7 Mon Sep 17 00:00:00 2001 From: srikanthBezawada Date: Tue, 12 Jan 2016 23:25:20 +0530 Subject: [PATCH] Synchronizing network names, creation --- .../cytoscape/mclique/internal/NetworkEventsListener.java | 7 +++++++ .../org/cytoscape/mclique/internal/logic/CliqueThread.java | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/MClique/src/main/java/org/cytoscape/mclique/internal/NetworkEventsListener.java b/MClique/src/main/java/org/cytoscape/mclique/internal/NetworkEventsListener.java index 1e8168a..2c7e31b 100644 --- a/MClique/src/main/java/org/cytoscape/mclique/internal/NetworkEventsListener.java +++ b/MClique/src/main/java/org/cytoscape/mclique/internal/NetworkEventsListener.java @@ -1,5 +1,7 @@ package org.cytoscape.mclique.internal; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.swing.DefaultComboBoxModel; import org.cytoscape.model.CyNetwork; import org.cytoscape.model.events.NetworkAddedEvent; @@ -9,6 +11,11 @@ public class NetworkEventsListener implements NetworkAddedListener, NetworkDestroyedListener{ public void handleEvent(NetworkAddedEvent e){ + try { + Thread.sleep(3000); + } catch (InterruptedException ex) { + Logger.getLogger(NetworkEventsListener.class.getName()).log(Level.SEVERE, null, ex); + } CyNetwork net = e.getNetwork(); String title = net.getRow(net).get(CyNetwork.NAME, String.class); CliqueUI menu = CliqueCore.getTiDieStartMenu(); diff --git a/MClique/src/main/java/org/cytoscape/mclique/internal/logic/CliqueThread.java b/MClique/src/main/java/org/cytoscape/mclique/internal/logic/CliqueThread.java index 914a01a..e988876 100644 --- a/MClique/src/main/java/org/cytoscape/mclique/internal/logic/CliqueThread.java +++ b/MClique/src/main/java/org/cytoscape/mclique/internal/logic/CliqueThread.java @@ -105,12 +105,12 @@ public void createNetwork(CyNetwork network, List subnodeList, List