cytoscape.view
Class CytoscapeDesktop

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

public class CytoscapeDesktop
extends JFrame
implements PropertyChangeListener

The CytoscapeDesktop is the central Window for working with Cytoscape

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  String currentNetworkID
           
protected  String currentNetworkViewID
           
protected  CyHelpBroker cyHelpBroker
          The HelpBroker provides access to JavaHelp
protected  CyMenus cyMenus
          The CyMenus object provides access to the all of the menus and toolbars that will be needed.
protected  CytoPanelImp cytoPanelEast
           
protected  CytoPanelImp cytoPanelSouth
           
protected  CytoPanelImp cytoPanelWest
           
protected  VisualStyle defaultVisualStyle
           
static int EXTERNAL_VIEW
          Displays all network views in JFrames, so each Network has its own window.
protected  GraphViewController graphViewController
          The GraphViewController for all NetworkViews that we know about
static int INTERNAL_VIEW
          Displays all network views in JInternalFrames, using the mock desktop interface.
protected  long lastPluginRegistryUpdate
           
static String NETWORK_VIEW_CREATED
           
static String NETWORK_VIEW_DESTROYED
           
static String NETWORK_VIEW_FOCUS
           
static String NETWORK_VIEW_FOCUSED
           
protected  NetworkPanel networkPanel
          The network panel that sends out events when a network is selected from the Tree that it contains.
protected  NetworkViewManager networkViewManager
          The NetworkViewManager can support three types of interfaces.
protected  SwingPropertyChangeSupport pcs
          provides support for property change events
protected  JLabel statusBar
           
static int TABBED_VIEW
          Displays all network views in TabbedPanes ( like Mozilla )
static UndoManager undo
          Cytoscape UndoManager
protected  int VIEW_TYPE
          The type of view, should be considered final
static String VISUAL_STYLE
           
static String VIZMAP_ENABLED
           
protected  VisualMappingManager vizMapper
          Provides Operations for Mapping Data Attributes of CyNetworks to CyNetworkViews
protected  VizMapUI vizMapUI
          user interface to the VisualMappingManager vizMapper.
protected  HashMap vsAssociationMap
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
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 clearStatusBar()
          Clears the Status Bar Message.
protected  BiModalJSplitPane createMasterPane(NetworkPanel networkPanel, BiModalJSplitPane rightPane)
          Creates the Master Split Pane.
protected  BiModalJSplitPane createRightPane(BiModalJSplitPane topRightPane)
          Creates the Right Panel.
protected  BiModalJSplitPane createTopRightPane(NetworkViewManager networkViewManager)
          Creates the TopRight Pane.
 CyMenus getCyMenus()
           
 CytoPanel getCytoPanel(int compassDirection)
          Gets a cytoPanel given a Compass direction.
 GraphViewController getGraphViewController()
          TO keep things clearer there is one GraphView Controller per CytoscapeDesktop
 javax.help.HelpBroker getHelpBroker()
           
 javax.help.HelpSet getHelpSet()
           
 NetworkPanel getNetworkPanel()
           
 NetworkViewManager getNetworkViewManager()
          Gets the NetworkView Manager.
 SwingPropertyChangeSupport getSwingPropertyChangeSupport()
           
 int getViewType()
          Return the view type for this CytoscapeDesktop
 VisualMappingManager getVizMapManager()
          Deprecated. Use Cytoscape.getVisualMappingManager() instead. This will be removed at 03/2007 (possibly sooner).
 VizMapUI getVizMapUI()
          returns the top-level UI object for the visual mapper.
protected  void initialize()
           
static int parseViewType(String vt)
           
 void propertyChange(PropertyChangeEvent e)
           
 void setFocus(String network_id)
           
 void setNewNetwork(CyNetwork newNetwork)
           
 void setStatusBarMsg(String msg)
          Sets the Status Bar Message.
protected  BiModalJSplitPane setupCytoPanels(NetworkPanel networkPanel, NetworkViewManager networkViewManager)
          Create the CytoPanels UI.
protected  void setupVizMapper(JPanel panel)
          Create the VizMapper and the UI for it.
 VisualStyle setVisualStyle(VisualStyle style)
           
protected  void updateFocus(String network_id)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, 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, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

lastPluginRegistryUpdate

protected long lastPluginRegistryUpdate

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 )


VIEW_TYPE

protected int VIEW_TYPE
The type of view, should be considered final


defaultVisualStyle

protected VisualStyle defaultVisualStyle

networkPanel

protected NetworkPanel networkPanel
The network panel that sends out events when a network is selected from the Tree that it contains.


cyMenus

protected CyMenus cyMenus
The CyMenus object provides access to the all of the menus and toolbars that will be needed.


networkViewManager

protected NetworkViewManager networkViewManager
The NetworkViewManager can support three types of interfaces. Tabbed/InternalFrame/ExternalFrame


cyHelpBroker

protected CyHelpBroker cyHelpBroker
The HelpBroker provides access to JavaHelp


pcs

protected SwingPropertyChangeSupport pcs
provides support for property change events


graphViewController

protected GraphViewController graphViewController
The GraphViewController for all NetworkViews that we know about


vizMapper

protected VisualMappingManager vizMapper
Provides Operations for Mapping Data Attributes of CyNetworks to CyNetworkViews


vizMapUI

protected VizMapUI vizMapUI
user interface to the VisualMappingManager vizMapper.


currentNetworkID

protected String currentNetworkID

currentNetworkViewID

protected String currentNetworkViewID

cytoPanelWest

protected CytoPanelImp cytoPanelWest

cytoPanelEast

protected CytoPanelImp cytoPanelEast

cytoPanelSouth

protected CytoPanelImp cytoPanelSouth

statusBar

protected JLabel statusBar

vsAssociationMap

protected HashMap vsAssociationMap
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

initialize

protected void initialize()

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 NetworkPanel getNetworkPanel()

getHelpBroker

public javax.help.HelpBroker getHelpBroker()

getHelpSet

public javax.help.HelpSet getHelpSet()

addEdit

public void addEdit(UndoableEdit edit)

getViewType

public int getViewType()
Return the view type for this CytoscapeDesktop


getCyMenus

public CyMenus getCyMenus()

setNewNetwork

public void setNewNetwork(CyNetwork newNetwork)

getVizMapManager

public VisualMappingManager getVizMapManager()
Deprecated. Use Cytoscape.getVisualMappingManager() instead. This will be removed at 03/2007 (possibly sooner).

Returns the visual mapping manager that controls the appearance of nodes and edges in this display.


getVizMapUI

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


setupVizMapper

protected void setupVizMapper(JPanel panel)
Create the VizMapper and the UI for it.


setVisualStyle

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

updateFocus

protected void updateFocus(String network_id)

setFocus

public void setFocus(String network_id)

getGraphViewController

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


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.

setupCytoPanels

protected BiModalJSplitPane setupCytoPanels(NetworkPanel networkPanel,
                                            NetworkViewManager networkViewManager)
Create the CytoPanels UI.

Parameters:
networkPanel - to load on left side of right bimodal.
networkViewManager - to load on left side (CytoPanel West).
Returns:
BiModalJSplitPane Object.

createTopRightPane

protected BiModalJSplitPane createTopRightPane(NetworkViewManager networkViewManager)
Creates the TopRight Pane.

Parameters:
networkViewManager - to load on left side of top right bimodal.
Returns:
BiModalJSplitPane Object.

createRightPane

protected BiModalJSplitPane createRightPane(BiModalJSplitPane topRightPane)
Creates the Right Panel.

Parameters:
topRightPane - TopRightPane Object.
Returns:
BiModalJSplitPane Object

createMasterPane

protected BiModalJSplitPane createMasterPane(NetworkPanel networkPanel,
                                             BiModalJSplitPane rightPane)
Creates the Master Split Pane.

Parameters:
networkPanel - to load on left side of CytoPanel (cytoPanelWest).
rightPane - BiModalJSplitPane Object.
Returns:
BiModalJSplitPane Object.

getNetworkViewManager

public NetworkViewManager getNetworkViewManager()
Gets the NetworkView Manager.

Returns:
NetworkViewManager Object.

parseViewType

public static int parseViewType(String vt)