Author: pwang
Date: 2009-12-14 15:44:15 -0800 (Mon, 14 Dec 2009)
New Revision: 18758
Modified:
cytoscape/trunk/src/cytoscape/visual/ui/NestedNetworkMenuListener.java
Log:
Ask user to confirm before delete a nested network
Modified: cytoscape/trunk/src/cytoscape/visual/ui/NestedNetworkMenuListener.java
===================================================================
--- cytoscape/trunk/src/cytoscape/visual/ui/NestedNetworkMenuListener.java
2009-12-14 22:57:46 UTC (rev 18757)
+++ cytoscape/trunk/src/cytoscape/visual/ui/NestedNetworkMenuListener.java
2009-12-14 23:44:15 UTC (rev 18758)
@@ -48,6 +48,7 @@
import cytoscape.view.CyNetworkView;
import cytoscape.Cytoscape;
import cytoscape.dialogs.SetNestedNetworkDialog;
+import javax.swing.JOptionPane;
/**
* NestedNetworkMenuListener implements NodeContextMenuListener
@@ -111,6 +112,12 @@
if (this.nodeView.getNode().getNestedNetwork() == null){
return;
}
+ int user_says =
JOptionPane.showConfirmDialog(Cytoscape.getDesktop(),
+ "Are you sure you want to delete this
nested network?","Confirm Delete Nested Network", JOptionPane.YES_NO_OPTION);
+ if (user_says == JOptionPane.NO_OPTION){
+ return;
+ }
+
this.nodeView.getNode().setNestedNetwork(null);
}
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.