Cytoscape 2.8.0 API

cytoscape.view
Interface CyNetworkView

All Superinterfaces:
GraphView
All Known Implementing Classes:
DingNetworkView

public interface CyNetworkView
extends GraphView

CyNetworkView is responsible for actually getting a graph to show up on the screen.

Cytoscape does not currently define specific classes for NodeViews and EdgeViews, the defaults from the GINY graph library (namely phoebe.PNodeView and phoebe.PEdgeView) are most commonly used. Making custom nodes is easy and fun. One must implement the giny.view.NodeView interface and inherit from edu.umd.cs.piccolo.PNode. The Piccolo project is what all of the painting is based on, and is very fast, flexible and powerful. Becoming acquainted with Piccolo is essential for build custom nodes.

Fortunately, if you just want basic shapes and colors, it's all built into the UI already, and you really need never even use this class. Just learn how to use the VizMapper to accomplish your data to view mappings. The manual is a good place to start.


Field Summary
 
Fields inherited from interface giny.view.GraphView
EDGE_LINE_TYPE, EDGE_PAINT, EDGE_SELECTION_PAINT, EDGE_SOURCE_END_PAINT, EDGE_SOURCE_END_SELECTED_PAINT, EDGE_SOURCE_END_TYPE, EDGE_TARGET_END_PAINT, EDGE_TARGET_END_SELECTED_PAINT, EDGE_TARGET_END_TYPE, EDGE_WIDTH, NODE_BORDER_PAINT, NODE_BORDER_WIDTH, NODE_HEIGHT, NODE_LABEL, NODE_PAINT, NODE_SELECTION_PAINT, NODE_SHAPE, NODE_WIDTH, NODE_X_POSITION, NODE_Y_POSITION, NODE_Z_POSITION, SOURCE_INDEX, TARGET_INDEX
 
Method Summary
 void addEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 void addNodeContextMenuListener(NodeContextMenuListener l)
          DOCUMENT ME!
 void applyLayout(CyLayoutAlgorithm layout)
          Applies the given layout to the entire CyNetworkView
 void applyLayout(CyLayoutAlgorithm layout, CyNode[] nodes, CyEdge[] edges)
          Applies the given layout to only the given Nodes and Edges.
 void applyLayout(CyLayoutAlgorithm layout, CyNodeView[] nodes, CyEdgeView[] edges)
          Applies the given layout to only the given NodeViews and EdgeViews.
 void applyLayout(CyLayoutAlgorithm layout, int[] nodes, int[] edges)
          Applies the given layout to only the given Nodes and Edges.
 void applyLockedLayout(CyLayoutAlgorithm layout, CyNode[] nodes, CyEdge[] edges)
          Applies the given layout to the entire CyNetworkView, but locks the given Nodes and Edges in place.
 void applyLockedLayout(CyLayoutAlgorithm layout, CyNodeView[] nodes, CyEdgeView[] edges)
          Applies the given layout to the entire CyNetworkView, but locks the given NodeViews and EdgeViews in place.
 void applyLockedLayout(CyLayoutAlgorithm layout, int[] nodes, int[] edges)
          Applies the given layout to the entire CyNetworkView, but locks the given Nodes and Edges in place.
 boolean applyVizMap(CyEdge edge)
          Applies the given edge to the given vizmapper
 boolean applyVizMap(CyEdge edge, VisualStyle style)
          Applies the given edge to the given vizmapper
 boolean applyVizMap(CyNode node)
          Applies the given node to the given vizmapper
 boolean applyVizMap(CyNode node, VisualStyle style)
          Applies the given node to the given vizmapper
 boolean applyVizMap(EdgeView edge_view)
          Applies the given edge to the given vizmapper
 boolean applyVizMap(EdgeView edge_view, VisualStyle style)
          Applies the given edge to the given vizmapper
 boolean applyVizMap(NodeView node_view)
          Applies the given node to the given vizmapper
 boolean applyVizMap(NodeView node_view, VisualStyle style)
          Applies the given node to the given vizmapper
 void applyVizmapper(VisualStyle style)
           
 Object getClientData(String data_name)
          Get Some client data
 Collection getClientDataNames()
          Get a list of all currently available ClientData objects
 CyNetwork getNetwork()
          Returns the network displayed by this object.
 String getTitle()
          Returns the Title of this View
 CyNetworkView getView()
          DOCUMENT ME!
 boolean getVisualMapperEnabled()
          DOCUMENT ME!
 VisualStyle getVisualStyle()
          DOCUMENT ME!
 VisualMappingManager getVizMapManager()
          DOCUMENT ME!
 void putClientData(String data_name, Object data)
          Networks can support client data.
 void redrawGraph(boolean layout, boolean vizmap)
          DOCUMENT ME!
 void removeEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 void removeNodeContextMenuListener(NodeContextMenuListener l)
          DOCUMENT ME!
 boolean setSelected(CyEdge[] edges)
          Deprecated. this method is not working, use CyNetwork.setSelectedEdgeState(Collection, boolean)
 boolean setSelected(CyNode[] nodes)
          Deprecated. this method is not working, use Cytoscape.CyNetwork#setSelectedNodeState(Collection, boolean)
 boolean setSelected(EdgeView[] edge_views)
          Deprecated. this method is not working, use CyNetwork.setSelectedEdgeState(Collection, boolean)
 boolean setSelected(NodeView[] node_views)
          Deprecated. this method is not working, use Cytoscape.CyNetwork#setSelectedNodeState(Collection, boolean)
 void setTitle(String title)
          Sets the Title of this View
 void setVisualMapperEnabled(boolean state)
          DOCUMENT ME!
 void setVisualStyle(String VSName)
          DOCUMENT ME!
 void toggleVisualMapperEnabled()
          DOCUMENT ME!
 
Methods inherited from interface giny.view.GraphView
addContextMethod, addEdgeView, addEdgeView, addGraphViewChangeListener, addNodeView, addNodeView, addNodeView, disableEdgeSelection, disableNodeSelection, edgeCount, edgeSelectionEnabled, enableEdgeSelection, enableNodeSelection, fitContent, getAllEdgePropertyData, getAllNodePropertyData, getBackgroundPaint, getComponent, getContextMethods, getContextMethods, getEdgeBooleanProperty, getEdgeDoubleProperty, getEdgeFloatProperty, getEdgeIntProperty, getEdgeObjectProperty, getEdgeView, getEdgeView, getEdgeViewCount, getEdgeViewsIterator, getEdgeViewsList, getEdgeViewsList, getEdgeViewsList, getGraphPerspective, getIdentifier, getNodeBooleanProperty, getNodeDoubleProperty, getNodeFloatProperty, getNodeIntProperty, getNodeObjectProperty, getNodeView, getNodeView, getNodeViewCount, getNodeViewsIterator, getRootGraph, getSelectedEdgeIndices, getSelectedEdges, getSelectedNodeIndices, getSelectedNodes, getZoom, hideGraphObject, hideGraphObjects, nodeCount, nodeSelectionEnabled, removeEdgeView, removeEdgeView, removeEdgeView, removeGraphViewChangeListener, removeNodeView, removeNodeView, removeNodeView, setAllEdgePropertyData, setAllNodePropertyData, setBackgroundPaint, setEdgeBooleanProperty, setEdgeDoubleProperty, setEdgeFloatProperty, setEdgeIntProperty, setEdgeObjectProperty, setIdentifier, setNodeBooleanProperty, setNodeDoubleProperty, setNodeFloatProperty, setNodeIntProperty, setNodeObjectProperty, setZoom, showGraphObject, showGraphObjects, updateView
 

Method Detail

getNetwork

CyNetwork getNetwork()
Returns the network displayed by this object.


setTitle

void setTitle(String title)
Sets the Title of this View


getTitle

String getTitle()
Returns the Title of this View


redrawGraph

void redrawGraph(boolean layout,
                 boolean vizmap)
DOCUMENT ME!

Parameters:
layout - DOCUMENT ME!
vizmap - DOCUMENT ME!

getView

CyNetworkView getView()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getVizMapManager

VisualMappingManager getVizMapManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toggleVisualMapperEnabled

void toggleVisualMapperEnabled()
DOCUMENT ME!


setVisualMapperEnabled

void setVisualMapperEnabled(boolean state)
DOCUMENT ME!

Parameters:
state - DOCUMENT ME!

getVisualMapperEnabled

boolean getVisualMapperEnabled()
DOCUMENT ME!

Returns:
DOCUMENT ME!

putClientData

void putClientData(String data_name,
                   Object data)
Networks can support client data.

Parameters:
data_name - the name of this client data

getClientDataNames

Collection getClientDataNames()
Get a list of all currently available ClientData objects


getClientData

Object getClientData(String data_name)
Get Some client data

Parameters:
data_name - the data to get

setSelected

boolean setSelected(CyNode[] nodes)
Deprecated. this method is not working, use Cytoscape.CyNetwork#setSelectedNodeState(Collection, boolean)

Sets the Given nodes Selected


setSelected

boolean setSelected(NodeView[] node_views)
Deprecated. this method is not working, use Cytoscape.CyNetwork#setSelectedNodeState(Collection, boolean)

Sets the Given nodes Selected


applyVizMap

boolean applyVizMap(CyEdge edge)
Applies the given edge to the given vizmapper


applyVizMap

boolean applyVizMap(EdgeView edge_view)
Applies the given edge to the given vizmapper


applyVizMap

boolean applyVizMap(CyNode node)
Applies the given node to the given vizmapper


applyVizMap

boolean applyVizMap(NodeView node_view)
Applies the given node to the given vizmapper


applyVizMap

boolean applyVizMap(CyEdge edge,
                    VisualStyle style)
Applies the given edge to the given vizmapper


applyVizMap

boolean applyVizMap(EdgeView edge_view,
                    VisualStyle style)
Applies the given edge to the given vizmapper


applyVizMap

boolean applyVizMap(CyNode node,
                    VisualStyle style)
Applies the given node to the given vizmapper


applyVizMap

boolean applyVizMap(NodeView node_view,
                    VisualStyle style)
Applies the given node to the given vizmapper


setSelected

boolean setSelected(CyEdge[] edges)
Deprecated. this method is not working, use CyNetwork.setSelectedEdgeState(Collection, boolean)

Sets the Given edges Selected


setSelected

boolean setSelected(EdgeView[] edge_views)
Deprecated. this method is not working, use CyNetwork.setSelectedEdgeState(Collection, boolean)

Sets the Given edges Selected


applyVizmapper

void applyVizmapper(VisualStyle style)
Parameters:
applyAppearances - if true, the vizmapper will recalculate the node and edge appearances

applyLayout

void applyLayout(CyLayoutAlgorithm layout)
Applies the given layout to the entire CyNetworkView


applyLockedLayout

void applyLockedLayout(CyLayoutAlgorithm layout,
                       CyNode[] nodes,
                       CyEdge[] edges)
Applies the given layout to the entire CyNetworkView, but locks the given Nodes and Edges in place. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


applyLayout

void applyLayout(CyLayoutAlgorithm layout,
                 CyNode[] nodes,
                 CyEdge[] edges)
Applies the given layout to only the given Nodes and Edges. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


applyLockedLayout

void applyLockedLayout(CyLayoutAlgorithm layout,
                       CyNodeView[] nodes,
                       CyEdgeView[] edges)
Applies the given layout to the entire CyNetworkView, but locks the given NodeViews and EdgeViews in place. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


applyLayout

void applyLayout(CyLayoutAlgorithm layout,
                 CyNodeView[] nodes,
                 CyEdgeView[] edges)
Applies the given layout to only the given NodeViews and EdgeViews. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


applyLockedLayout

void applyLockedLayout(CyLayoutAlgorithm layout,
                       int[] nodes,
                       int[] edges)
Applies the given layout to the entire CyNetworkView, but locks the given Nodes and Edges in place. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


applyLayout

void applyLayout(CyLayoutAlgorithm layout,
                 int[] nodes,
                 int[] edges)
Applies the given layout to only the given Nodes and Edges. NOTE: currently, none of the layout algorithms support edge-locked layouts, so the edges argument is ignored.


setVisualStyle

void setVisualStyle(String VSName)
DOCUMENT ME!

Parameters:
VSName - DOCUMENT ME!

getVisualStyle

VisualStyle getVisualStyle()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addNodeContextMenuListener

void addNodeContextMenuListener(NodeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeNodeContextMenuListener

void removeNodeContextMenuListener(NodeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

addEdgeContextMenuListener

void addEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeEdgeContextMenuListener

void removeEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.