The one way to do this in 2.x is to manually add a MouseListener to the network view's canvas:
CyNetworkView view=Cytoscape.getCurrentNetworkView();
((DGraphView) view).getCanvas().addMouseListener(this);
In the MouseListener, you would have code to get the CyNode they clicked on (if any) - something like this:
public void mouseClicked(MouseEvent e) {
CyNetworkView view=Cytoscape.getCurrentNetworkView();
NodeView nv =((DGraphView) view).getPickedNodeView(e.getPoint ());
if(nv != null) {
CyNode node =(CyNode) nv.getNode();
// do whatever you want with the node
}
}
If you want to do this on edges, just substitute EdgeView for NodeView. In 3.0 (in beta currently), you can associate a task with the double-click action directly, avoiding the need for low-level code like MouseListener...
Tim