Author: pwang
Date: 2009-12-03 14:57:13 -0800 (Thu, 03 Dec 2009)
New Revision: 18649
Modified:
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
Log:
When a new node is created for nested network, suggest node name based on the
selected network.
Modified:
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
===================================================================
---
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
2009-12-03 22:54:32 UTC (rev 18648)
+++
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
2009-12-03 22:57:13 UTC (rev 18649)
@@ -52,8 +52,8 @@
import ding.view.DGraphView;
import ding.view.InnerCanvas;
import javax.swing.JOptionPane;
+import cytoscape.CyNetwork;
-
/**
*
* The <b>PaletteNetworkEditEventHandler</b> extends the basic network edit
event handler with the
@@ -273,8 +273,16 @@
NodeView targetNode =
getCurrentDGraphView().getPickedNodeView(location);
if (targetNode == null) {
+
+ // Select the nested network
+ SetNestedNetworkDialog dlg = new
SetNestedNetworkDialog(Cytoscape.getDesktop(), true);
+ dlg.setLocationRelativeTo(Cytoscape.getDesktop());
+ dlg.setVisible(true);
+
+ CyNetwork selectedNetwork = dlg.getSelectedNetwork();
+
// Create a new Node
- String nodeID = "node" + counter;
+ String nodeID =
selectedNetwork.getIdentifier();//"node" + counter;
if (ShapePalette.specifyIdentifier){
nodeID = getNodeID(nodeID);
@@ -292,9 +300,8 @@
if (newNodeView == null){
return;
}
- SetNestedNetworkDialog dlg = new
SetNestedNetworkDialog(Cytoscape.getDesktop(), true, newNodeView);
- dlg.setLocationRelativeTo(Cytoscape.getDesktop());
- dlg.setVisible(true);
+ newNode.setNestedNetwork(selectedNetwork);
+
}
else {
SetNestedNetworkDialog dlg = new
SetNestedNetworkDialog(Cytoscape.getDesktop(), true, targetNode);
--
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.