/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public BirdsEyeViewHandler getBirdsEyeViewHandler() { if (bevh == null) bevh = new BirdsEyeViewHandler(networkViewManager.getDesktopPane()); return bevh; }
/** * Add the menu item in a specific position * * @param action * @param index */ public void addAction(CytoscapeAction action, int index) { addCytoscapeAction(action, index); }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public CyNetwork getNetwork() { return networkView.getNetwork(); }
/** * Add new menu item under "Plugins" */ public NetworkMergePlugin() { Cytoscape.getDesktop().getCyMenus().getOperationsMenu().add( action); }
public void actionPerformed(ActionEvent e) { final CyNetworkView currentNetworkView = Cytoscape.getCurrentNetworkView(); currentNetworkView.hideGraphObject(nodeView); currentNetworkView.updateView(); } }
public SliderTracker(final JSlider slider, final JCheckBox controllingCheckBox) { this.slider = slider; this.controllingCheckBox = controllingCheckBox; Cytoscape.getDesktop().getNetworkViewManager().getSwingPropertyChangeSupport() .addPropertyChangeListener(CytoscapeDesktop.NETWORK_VIEW_FOCUSED, this); }
public void export(final CyNetworkView view, final FileOutputStream stream) { final InternalFrameComponent ifc = Cytoscape.getDesktop() .getNetworkViewManager().getInternalFrameComponent(view); final ExportBitmapOptionsDialog dialog = new ExportBitmapOptionsDialog(ifc.getWidth(), ifc.getHeight()); ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent e) { BitmapExporter exporter = new BitmapExporter(extension, dialog.getZoom()); dialog.dispose(); ExportTask.run("Exporting to " + extension, exporter, view, stream); } }; dialog.addActionListener(listener); dialog.setVisible(true); } }
public void run() { Cytoscape.getDesktop().getNetworkPanel().updateTitle(cyNetwork); } });
private CyDesktopManager() { desktop = Cytoscape.getDesktop().getNetworkViewManager().getDesktopPane(); }
/** * DOCUMENT ME! * * @param e DOCUMENT ME! */ public void actionPerformed(ActionEvent e) { Cytoscape.getCurrentNetworkView().setZoom(factor); } }
/** * This method should be called by the creator of this object after the * constructor has finished. It fills the previously created menu and tool * bars with items and action listeners that respond when those items are * activated. This needs to come after the constructor is done, because some * of the listeners try to access this object in their constructors. * * Any calls to this method after the first will do nothing. */ public void initializeMenus() { if (!menusInitialized) { menusInitialized = true; fillMenuBar(); fillToolBar(); } }
private boolean hasView(Object value) { NetworkTreeNode node = (NetworkTreeNode) value; setToolTipText(Cytoscape.getNetwork(node.getNetworkID()).getTitle()); return Cytoscape.viewExists(node.getNetworkID()); } }
/** * Don't know why you need both of these, but this is how they did it in * the example */ public void mousePressed(MouseEvent e) { maybeShowPopup(e); }
/** * @return the reference to the One CytoscapeDesktop */ public static CytoscapeDesktop getDesktop() { if (defaultDesktop == null) { defaultDesktop = new CytoscapeDesktop(); } return defaultDesktop; }
/** * Fire Events when a Managed Network View gets the Focus. */ public void internalFrameOpened(InternalFrameEvent e) { internalFrameActivated(e); }
/** * TO keep things clearer there is one GraphView Controller per * CytoscapeDesktop */ public GraphViewController getGraphViewController() { if (graphViewController == null) graphViewController = new GraphViewController(); return graphViewController; }
public void stateChanged(ChangeEvent e) { updateVSMenu(); }
/** * Constructor. * * @param bpPanel BioPaxDetails Panel Object. */ public NetworkListener(BioPaxDetailsPanel bpPanel) { this.bpPanel = bpPanel; // to catch network creation / destruction events Cytoscape.getSwingPropertyChangeSupport().addPropertyChangeListener(this); // to catch network selection / focus events Cytoscape.getDesktop().getNetworkViewManager().getSwingPropertyChangeSupport() .addPropertyChangeListener(this); }
/** * Add the menu item. * * @param action */ public void addAction(CytoscapeAction action) { addCytoscapeAction(action); }
public void mouseReleased(MouseEvent e) { maybeShowPopup(e); }