Author: scooter
Date: 2011-08-15 10:59:04 -0700 (Mon, 15 Aug 2011)
New Revision: 26559
Modified:
csplugins/trunk/ucsf/scooter/namedSelection/src/namedSelection/NamedSelection.java
Log:
Remove duplicate listener
Modified:
csplugins/trunk/ucsf/scooter/namedSelection/src/namedSelection/NamedSelection.java
===================================================================
---
csplugins/trunk/ucsf/scooter/namedSelection/src/namedSelection/NamedSelection.java
2011-08-15 17:55:18 UTC (rev 26558)
+++
csplugins/trunk/ucsf/scooter/namedSelection/src/namedSelection/NamedSelection.java
2011-08-15 17:59:04 UTC (rev 26559)
@@ -101,7 +101,7 @@
try {
// Listen for network and session load events
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(Cytoscape.NETWORK_LOADED,
this);
-
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(Cytoscape.SESSION_LOADED,
this);
+ //
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(Cytoscape.SESSION_LOADED,
this);
Cytoscape.getDesktop().getSwingPropertyChangeSupport()
.addPropertyChangeListener(
CytoscapeDesktop.NETWORK_VIEW_CREATED, this );
@@ -154,8 +154,11 @@
CyNetworkView netView =
Cytoscape.getNetworkView(network.getIdentifier());
if (!netView.equals(Cytoscape.getNullNetworkView())) {
netView.addGraphViewChangeListener(groupPanel.getTree());
+ netView.removeNodeContextMenuListener(this);
netView.addNodeContextMenuListener(this);
+ System.out.println("NETWORK_LOADED:
"+network.getTitle());
}
+/*
} else if (e.getPropertyName() == Cytoscape.SESSION_LOADED &&
e.getNewValue() != null) {
List<String> netList = (List<String>) e.getNewValue();
@@ -164,11 +167,16 @@
CyNetworkView netView =
Cytoscape.getNetworkView(net.getIdentifier());
if
(!netView.equals(Cytoscape.getNullNetworkView())) {
netView.addGraphViewChangeListener(groupPanel.getTree());
+
netView.removeNodeContextMenuListener(this);
netView.addNodeContextMenuListener(this);
+ System.out.println("SESSION_LOADED:
"+network);
}
}
+*/
} else if (e.getPropertyName() ==
CytoscapeDesktop.NETWORK_VIEW_CREATED) {
+ System.out.println("NETWORK_VIEW_CREATED:
"+((CyNetworkView)e.getNewValue()).getNetwork().getTitle());
// Add menu to the context dialog
+
((CyNetworkView)e.getNewValue()).removeNodeContextMenuListener(this);
((CyNetworkView)e.getNewValue()).addNodeContextMenuListener(this);
}
--
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.