/** * Listens for NETWORK_VIEW_CREATED events and if it hears one, it adds * SetNestedNetwork context menu listeners to the view. * @param evnt The event we're hearing. */ public void propertyChange(PropertyChangeEvent evnt) { if (CytoscapeDesktop.NETWORK_VIEW_CREATED.equals(evnt.getPropertyName())) { NestedNetworkMenuListener l = new NestedNetworkMenuListener(); Cytoscape.getCurrentNetworkView().addNodeContextMenuListener(l); } } }
/** * Listens for NETWORK_VIEW_CREATED events and if it hears one, it adds * a HideNodeContextMenuListener context menu listener to the view. * @param evnt The event we're being notified of. */ public void propertyChange(final PropertyChangeEvent evnt) { if (CytoscapeDesktop.NETWORK_VIEW_CREATED.equals(evnt.getPropertyName())) { final HideNodeContextMenuListener l = new HideNodeContextMenuListener(); Cytoscape.getCurrentNetworkView().addNodeContextMenuListener(l); } } }
/** * Property change listener - to get network/network view destroy events. * * @param event PropertyChangeEvent */ public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(Cytoscape.NETWORK_LOADED)) { CyNetwork cyNetwork = (CyNetwork) ((Object[]) event.getNewValue())[0]; if (cyNetwork != null && isBioPaxNetwork(cyNetwork)) { // setup the context menu CyNetworkView view = Cytoscape.getNetworkView(cyNetwork.getIdentifier()); if (view != null) view.addNodeContextMenuListener(this); } } }
/** * Add expander. * * @param evt DOCUMENT ME! */ public void propertyChange(PropertyChangeEvent evt) { if (CytoscapeDesktop.NETWORK_VIEW_CREATED.equals(evt.getPropertyName())) { if (cMenu == null) cMenu = new WebServiceContextMenu(); Cytoscape.getCurrentNetworkView().addNodeContextMenuListener(cMenu); Cytoscape.getCurrentNetworkView().addEdgeContextMenuListener(cMenu); } } }
/** * Listens for NETWORK_VIEW_CREATED events and if it hears one, it adds * node and edge context menu listeners to the view. * @param evnt The event we're hearing. */ public void propertyChange(final PropertyChangeEvent evnt) { if (CytoscapeDesktop.NETWORK_VIEW_CREATED.equals(evnt.getPropertyName())) { final NodeBypassMenuListener nodeBypassMenuListener = new NodeBypassMenuListener(); Cytoscape.getCurrentNetworkView().addNodeContextMenuListener(nodeBypassMenuListener); final EdgeBypassMenuListener edgeBypassMenuListener = new EdgeBypassMenuListener(); Cytoscape.getCurrentNetworkView().addEdgeContextMenuListener(edgeBypassMenuListener); } } }
view.addNodeContextMenuListener(nodeCtxMenuListener);