Cytoscape 2.2 (c) 2004 ISB, MSKCC, UCSD

cytoscape.view
Class CytoscapeDesktop

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended bycytoscape.view.CytoscapeDesktop
All Implemented Interfaces:
Accessible, cytoscape.view.CyWindow, EventListener, ImageObserver, MenuContainer, PropertyChangeListener, RootPaneContainer, Serializable, WindowConstants

public class CytoscapeDesktop
extends JFrame
implements PropertyChangeListener, cytoscape.view.CyWindow

The CytoscapeDesktop is the central Window for working with Cytoscape

See Also:
Serialized Form

Field Summary
static int EXTERNAL_VIEW
          Displays all network views in JFrames, so each Network has its own window.
static int INTERNAL_VIEW
          Displays all network views in JInternalFrames, using the mock desktop interface.
static String NETWORK_VIEW_CREATED
           
static String NETWORK_VIEW_DESTROYED
           
static String NETWORK_VIEW_FOCUS
           
static String NETWORK_VIEW_FOCUSED
           
static int TABBED_VIEW
          Displays all network views in TabbedPanes ( like Mozilla )
static UndoManager undo
          Cytoscape UndoManager
static String VISUAL_STYLE
           
static String VIZMAP_ENABLED
           
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CytoscapeDesktop()
          The Default constructor uses a TabbedView
CytoscapeDesktop(int view_type)
          Create a CytoscapeDesktop that conforms the given view type.
 
Method Summary
 void addEdit(UndoableEdit edit)
           
 void applyLayout(GraphView lview)
          Deprecated.  
 void applySelLayout()
          Deprecated.  
 void applyVizmapSettings()
          Deprecated.  
 void clearStatusBar()
          Clears the Status Bar Message.
 CyMenus getCyMenus()
          Returns the object that holds references to the menu bars and several of the major submenus.
 CytoPanel getCytoPanel(int compassDirection)
          Gets a cytoPanel given a Compass direction.
 cytoscape.view.GraphViewController getGraphViewController()
          TO keep things clearer there is one GraphView Controller per CytoscapeDesktop
 javax.help.HelpBroker getHelpBroker()
           
 javax.help.HelpSet getHelpSet()
           
 JFrame getMainFrame()
          Deprecated.  
 CyNetwork getNetwork()
          Deprecated.  
 cytoscape.view.NetworkPanel getNetworkPanel()
           
 cytoscape.view.NetworkViewManager getNetworkViewManager()
          Gets the NetworkView Manager.
 SwingPropertyChangeSupport getSwingPropertyChangeSupport()
           
 GraphView getView()
          Deprecated.  
 VisualMappingManager getVizMapManager()
          Returns the visual mapping manager that controls the appearance of nodes and edges in this display.
 cytoscape.visual.ui.VizMapUI getVizMapUI()
          returns the top-level UI object for the visual mapper.
 String getWindowTitle()
          Deprecated.  
 void propertyChange(PropertyChangeEvent e)
           
 void redrawGraph()
          Deprecated.  
 void redrawGraph(boolean doLayout)
          Deprecated.  
 void redrawGraph(boolean doLayout, boolean applyAppearances)
          Deprecated.  
 void setFocus(String network_id)
           
 void setInteractivity(boolean newState)
          Deprecated.  
 void setNewNetwork(CyNetwork newNetwork)
           
 void setStatusBarMsg(String msg)
          Sets the Status Bar Message.
 void setVisualMapperEnabled(boolean newState)
          Deprecated.  
 VisualStyle setVisualStyle(VisualStyle style)
           
 void setWindowTitle(String newTitle)
          Deprecated.  
 void showWindow()
          Deprecated.  
 void showWindow(int width, int height)
          Deprecated.  
 void switchToEditMode()
          Deprecated.  
 void switchToReadOnlyMode()
          Deprecated.  
 void toggleVisualMapperEnabled()
          Deprecated.  
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

NETWORK_VIEW_FOCUSED

public static String NETWORK_VIEW_FOCUSED

NETWORK_VIEW_FOCUS

public static String NETWORK_VIEW_FOCUS

NETWORK_VIEW_CREATED

public static String NETWORK_VIEW_CREATED

NETWORK_VIEW_DESTROYED

public static String NETWORK_VIEW_DESTROYED

VISUAL_STYLE

public static String VISUAL_STYLE

VIZMAP_ENABLED

public static String VIZMAP_ENABLED

undo

public static UndoManager undo
Cytoscape UndoManager


TABBED_VIEW

public static int TABBED_VIEW
Displays all network views in TabbedPanes ( like Mozilla )


INTERNAL_VIEW

public static int INTERNAL_VIEW
Displays all network views in JInternalFrames, using the mock desktop interface. ( like MS Office )


EXTERNAL_VIEW

public static int EXTERNAL_VIEW
Displays all network views in JFrames, so each Network has its own window. ( like the GIMP )

Constructor Detail

CytoscapeDesktop

public CytoscapeDesktop()
The Default constructor uses a TabbedView


CytoscapeDesktop

public CytoscapeDesktop(int view_type)
Create a CytoscapeDesktop that conforms the given view type.

Parameters:
view_type - one of the ViewTypes
Method Detail

setStatusBarMsg

public void setStatusBarMsg(String msg)
Sets the Status Bar Message.

Parameters:
msg - Status Bar Message.

clearStatusBar

public void clearStatusBar()
Clears the Status Bar Message.


getNetworkPanel

public cytoscape.view.NetworkPanel getNetworkPanel()

getHelpBroker

public javax.help.HelpBroker getHelpBroker()

getHelpSet

public javax.help.HelpSet getHelpSet()

addEdit

public void addEdit(UndoableEdit edit)

getNetwork

public CyNetwork getNetwork()
Deprecated.  

This will return the network currently under focus. however use this: Cytoscape.getCurrentNetwork()

Specified by:
getNetwork in interface cytoscape.view.CyWindow

getView

public GraphView getView()
Deprecated.  

Returns the UI component that renders the displayed graph. Cytoscape.getCurrentNetworkView()

Specified by:
getView in interface cytoscape.view.CyWindow

getMainFrame

public JFrame getMainFrame()
Deprecated.  

This will actually return an instance of this class.. Cytoscape.getDesktop()

Specified by:
getMainFrame in interface cytoscape.view.CyWindow

getCyMenus

public CyMenus getCyMenus()
Description copied from interface: cytoscape.view.CyWindow
Returns the object that holds references to the menu bars and several of the major submenus.

Specified by:
getCyMenus in interface cytoscape.view.CyWindow

setNewNetwork

public void setNewNetwork(CyNetwork newNetwork)
Specified by:
setNewNetwork in interface cytoscape.view.CyWindow
Parameters:
newNetwork - the new network to display

getWindowTitle

public String getWindowTitle()
Deprecated.  

This doesn't apply anymore as the title will never change.

Specified by:
getWindowTitle in interface cytoscape.view.CyWindow

setWindowTitle

public void setWindowTitle(String newTitle)
Deprecated.  

CyNetworkView.setTitle( String )

Specified by:
setWindowTitle in interface cytoscape.view.CyWindow

setInteractivity

public void setInteractivity(boolean newState)
Deprecated.  

no longer used

Specified by:
setInteractivity in interface cytoscape.view.CyWindow

redrawGraph

public void redrawGraph()
Deprecated.  

CyNetworkView.redrawGraph( boolean, boolean ) Redraws the graph - equivalent to redrawGraph(false, true). That is, no new layout will be performed, but the visual appearances will be reapplied.

Specified by:
redrawGraph in interface cytoscape.view.CyWindow

redrawGraph

public void redrawGraph(boolean doLayout)
Deprecated.  

CyNetworkView.redrawGraph( boolean, boolean ) Redraws the graph - equivalent to redrawGraph(doLayout, true). That is, the visual appearances will be reapplied, and layout will be done iff the argument is true.

Specified by:
redrawGraph in interface cytoscape.view.CyWindow

redrawGraph

public void redrawGraph(boolean doLayout,
                        boolean applyAppearances)
Deprecated.  

CyNetworkView.redrawGraph( boolean, boolean ) Redraws the graph. A new layout will be performed if the first argument is true, and the visual appearances will be recalculated and reapplied by the visual mapper if the second argument is true and the visual mapper is not disabled.

Specified by:
redrawGraph in interface cytoscape.view.CyWindow

showWindow

public void showWindow(int width,
                       int height)
Deprecated.  

not used

Specified by:
showWindow in interface cytoscape.view.CyWindow

showWindow

public void showWindow()
Deprecated.  

not used

Specified by:
showWindow in interface cytoscape.view.CyWindow

applyLayout

public void applyLayout(GraphView lview)
Deprecated.  

not used

Specified by:
applyLayout in interface cytoscape.view.CyWindow

applySelLayout

public void applySelLayout()
Deprecated.  

not used

Specified by:
applySelLayout in interface cytoscape.view.CyWindow

applyVizmapSettings

public void applyVizmapSettings()
Deprecated.  

not used


setVisualMapperEnabled

public void setVisualMapperEnabled(boolean newState)
Deprecated.  

not used

Specified by:
setVisualMapperEnabled in interface cytoscape.view.CyWindow

toggleVisualMapperEnabled

public void toggleVisualMapperEnabled()
Deprecated.  

not used

Specified by:
toggleVisualMapperEnabled in interface cytoscape.view.CyWindow

switchToReadOnlyMode

public void switchToReadOnlyMode()
Deprecated.  

not used

Specified by:
switchToReadOnlyMode in interface cytoscape.view.CyWindow

switchToEditMode

public void switchToEditMode()
Deprecated.  

not used

Specified by:
switchToEditMode in interface cytoscape.view.CyWindow

getVizMapManager

public VisualMappingManager getVizMapManager()
Returns the visual mapping manager that controls the appearance of nodes and edges in this display.

Specified by:
getVizMapManager in interface cytoscape.view.CyWindow

getVizMapUI

public cytoscape.visual.ui.VizMapUI getVizMapUI()
returns the top-level UI object for the visual mapper.

Specified by:
getVizMapUI in interface cytoscape.view.CyWindow

setVisualStyle

public VisualStyle setVisualStyle(VisualStyle style)
Parameters:
style - the NEW VisualStyle
Returns:
the OLD VisualStyle

setFocus

public void setFocus(String network_id)

getGraphViewController

public cytoscape.view.GraphViewController getGraphViewController()
TO keep things clearer there is one GraphView Controller per CytoscapeDesktop

Specified by:
getGraphViewController in interface cytoscape.view.CyWindow
Returns:
a cytoscape.view.GraphViewController

getSwingPropertyChangeSupport

public SwingPropertyChangeSupport getSwingPropertyChangeSupport()

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener

getCytoPanel

public CytoPanel getCytoPanel(int compassDirection)
Gets a cytoPanel given a Compass direction.

Parameters:
compassDirection - Compass Direction (SwingConstants.{SOUTH,EAST,WEST}).
Returns:
CytoPanel The CytoPanel that lives in the region specified by compass direction.

getNetworkViewManager

public cytoscape.view.NetworkViewManager getNetworkViewManager()
Gets the NetworkView Manager.

Returns:
NetworkViewManager Object.

www.cytoscape.org