Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

giny.view
Interface GraphView

All Known Subinterfaces:
CyNetworkView
All Known Implementing Classes:
coltginy.ColtGraphViewModel, DGraphView, DingNetworkView, phoebe.PGraphView, PhoebeNetworkView

public interface GraphView

Author:
xmas

Field Summary
static int EDGE_LINE_TYPE
           
static int EDGE_PAINT
           
static int EDGE_SELECTION_PAINT
           
static int EDGE_SOURCE_END_PAINT
           
static int EDGE_SOURCE_END_SELECTED_PAINT
           
static int EDGE_SOURCE_END_TYPE
           
static int EDGE_TARGET_END_PAINT
           
static int EDGE_TARGET_END_SELECTED_PAINT
           
static int EDGE_TARGET_END_TYPE
           
static int EDGE_WIDTH
           
static int NODE_BORDER_PAINT
           
static int NODE_BORDER_WIDTH
           
static int NODE_HEIGHT
           
static int NODE_LABEL
           
static int NODE_PAINT
           
static int NODE_SELECTION_PAINT
           
static int NODE_SHAPE
           
static int NODE_WIDTH
           
static int NODE_X_POSITION
           
static int NODE_Y_POSITION
           
static int NODE_Z_POSITION
           
static int SOURCE_INDEX
           
static int TARGET_INDEX
           
 
Method Summary
 boolean addContextMethod(String class_name, String method_class_name, String method_name, Object[] args, ClassLoader loader)
          Context Menu Support
 EdgeView addEdgeView(int edge_index)
           
 EdgeView addEdgeView(String class_name, int edge_index)
          To facilitate adding Custome EdgeViews It is recomended that All Custom Edge Views follow the patterns outlined in PEdgeView and BasicPEdgeView.
 void addGraphViewChangeListener(GraphViewChangeListener listener)
          Adds a new GraphViewChangeListener to this GraphViews list of listeners.
 NodeView addNodeView(int node_index)
           
 NodeView addNodeView(int node_index, NodeView node_view_replacement)
          Add in a NodeView for a Node in the GraphPerspective.
 NodeView addNodeView(String class_name, int node_index)
          To facilitate adding Custome NodeViews It is recomended that All Custom Node Views follow the patterns outlined in PNodeView and BasicPNodeView.
 void disableEdgeSelection()
           
 void disableNodeSelection()
           
 int edgeCount()
           
 boolean edgeSelectionEnabled()
           
 void enableEdgeSelection()
           
 void enableNodeSelection()
           
 void fitContent()
          Fits all Viewable elements onto the Graph
 Object[] getAllEdgePropertyData(int edge_index)
           
 Object[] getAllNodePropertyData(int node_index)
           
 Paint getBackgroundPaint()
           
 Component getComponent()
           
 Object[] getContextMethods(String class_name, boolean plus_superclass)
          Context Menu Support
 Object[] getContextMethods(String class_name, Object[] methods)
          Context Menu Support
 boolean getEdgeBooleanProperty(int edge_index, int property)
           
 double getEdgeDoubleProperty(int edge_index, int property)
           
 float getEdgeFloatProperty(int edge_index, int property)
           
 int getEdgeIntProperty(int edge_index, int property)
           
 Object getEdgeObjectProperty(int edge_index, int property)
          Return the stored value for the edge for the given property
 EdgeView getEdgeView(Edge edge)
           
 EdgeView getEdgeView(int edge_index)
           
 int getEdgeViewCount()
           
 Iterator getEdgeViewsIterator()
          Return all of the EdgeViews in this GraphView
 List getEdgeViewsList()
          Return all of the EdgeViews in this GraphView
 List getEdgeViewsList(int from_node_index, int to_node_index, boolean include_undirected_edges)
           
 List getEdgeViewsList(Node oneNode, Node otherNode)
          Note that this will return a list of Edge objects, the other one will return indices
 GraphPerspective getGraphPerspective()
           
 String getIdentifier()
           
 boolean getNodeBooleanProperty(int node_index, int property)
           
 double getNodeDoubleProperty(int node_index, int property)
           
 float getNodeFloatProperty(int node_index, int property)
           
 int getNodeIntProperty(int node_index, int property)
           
 Object getNodeObjectProperty(int node_index, int property)
          Return the stored value for the node for the given property
 NodeView getNodeView(int index)
           
 NodeView getNodeView(Node node)
           
 int getNodeViewCount()
           
 Iterator getNodeViewsIterator()
          nodeViewsIterator only returns the NodeViews that are explicitly associated with this GraphView
 RootGraph getRootGraph()
           
 int[] getSelectedEdgeIndices()
           
 List getSelectedEdges()
           
 int[] getSelectedNodeIndices()
           
 List getSelectedNodes()
           
 double getZoom()
           
 boolean hideGraphObject(Object object)
          use this to hide a node or edge
 boolean hideGraphObjects(List objects)
           Warning!!!!!!!
 int nodeCount()
           
 boolean nodeSelectionEnabled()
           
 EdgeView removeEdgeView(Edge edge)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 EdgeView removeEdgeView(EdgeView edge_view)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 EdgeView removeEdgeView(int edge)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 void removeGraphViewChangeListener(GraphViewChangeListener listener)
          Removes a GraphViewChangeListener from this GraphViews list of listeners.
 NodeView removeNodeView(int node)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 NodeView removeNodeView(Node node)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 NodeView removeNodeView(NodeView node_view)
          This will entirely remove a NodeView/EdgeView from the GraphView.
 void setAllEdgePropertyData(int edge_index, Object[] data)
          Set All Data For an Edge
Big Bold Faced Warning
Talk to rowan before using.
 void setAllNodePropertyData(int node_index, Object[] data)
          Set All Data For a NOde Big Bold Faced Warning
Talk to rowan before using.
 void setBackgroundPaint(Paint paint)
           
 boolean setEdgeBooleanProperty(int edge_index, int property, boolean value)
           
 boolean setEdgeDoubleProperty(int edge_index, int property, double value)
           
 boolean setEdgeFloatProperty(int edge_index, int property, float value)
           
 boolean setEdgeIntProperty(int edge_index, int property, int value)
           
 boolean setEdgeObjectProperty(int edge_index, int property, Object value)
           
 void setIdentifier(String new_identifier)
           
 boolean setNodeBooleanProperty(int node_index, int property, boolean value)
           
 boolean setNodeDoubleProperty(int node_index, int property, double value)
           
 boolean setNodeFloatProperty(int node_index, int property, float value)
           
 boolean setNodeIntProperty(int node_index, int property, int value)
           
 boolean setNodeObjectProperty(int node_index, int property, Object value)
           
 void setZoom(double zoom)
           
 boolean showGraphObject(Object object)
          use this to show a node or edge
 boolean showGraphObjects(List objects)
           Warning!!!!!!!
 void updateView()
          Do a global redraw of the entire canvas
 

Field Detail

NODE_X_POSITION

static final int NODE_X_POSITION
See Also:
Constant Field Values

NODE_Y_POSITION

static final int NODE_Y_POSITION
See Also:
Constant Field Values

NODE_SHAPE

static final int NODE_SHAPE
See Also:
Constant Field Values

NODE_PAINT

static final int NODE_PAINT
See Also:
Constant Field Values

NODE_SELECTION_PAINT

static final int NODE_SELECTION_PAINT
See Also:
Constant Field Values

NODE_BORDER_PAINT

static final int NODE_BORDER_PAINT
See Also:
Constant Field Values

NODE_BORDER_WIDTH

static final int NODE_BORDER_WIDTH
See Also:
Constant Field Values

NODE_WIDTH

static final int NODE_WIDTH
See Also:
Constant Field Values

NODE_HEIGHT

static final int NODE_HEIGHT
See Also:
Constant Field Values

NODE_LABEL

static final int NODE_LABEL
See Also:
Constant Field Values

NODE_Z_POSITION

static final int NODE_Z_POSITION
See Also:
Constant Field Values

SOURCE_INDEX

static final int SOURCE_INDEX
See Also:
Constant Field Values

TARGET_INDEX

static final int TARGET_INDEX
See Also:
Constant Field Values

EDGE_WIDTH

static final int EDGE_WIDTH
See Also:
Constant Field Values

EDGE_LINE_TYPE

static final int EDGE_LINE_TYPE
See Also:
Constant Field Values

EDGE_PAINT

static final int EDGE_PAINT
See Also:
Constant Field Values

EDGE_SELECTION_PAINT

static final int EDGE_SELECTION_PAINT
See Also:
Constant Field Values

EDGE_SOURCE_END_TYPE

static final int EDGE_SOURCE_END_TYPE
See Also:
Constant Field Values

EDGE_SOURCE_END_PAINT

static final int EDGE_SOURCE_END_PAINT
See Also:
Constant Field Values

EDGE_SOURCE_END_SELECTED_PAINT

static final int EDGE_SOURCE_END_SELECTED_PAINT
See Also:
Constant Field Values

EDGE_TARGET_END_TYPE

static final int EDGE_TARGET_END_TYPE
See Also:
Constant Field Values

EDGE_TARGET_END_PAINT

static final int EDGE_TARGET_END_PAINT
See Also:
Constant Field Values

EDGE_TARGET_END_SELECTED_PAINT

static final int EDGE_TARGET_END_SELECTED_PAINT
See Also:
Constant Field Values
Method Detail

getGraphPerspective

GraphPerspective getGraphPerspective()

nodeSelectionEnabled

boolean nodeSelectionEnabled()

edgeSelectionEnabled

boolean edgeSelectionEnabled()

enableNodeSelection

void enableNodeSelection()

disableNodeSelection

void disableNodeSelection()

enableEdgeSelection

void enableEdgeSelection()

disableEdgeSelection

void disableEdgeSelection()

getSelectedNodeIndices

int[] getSelectedNodeIndices()
Returns:
an int array of the graph perspective indices of the selected nodes

getSelectedNodes

List getSelectedNodes()
Returns:
a list of the selected NodeView

getSelectedEdgeIndices

int[] getSelectedEdgeIndices()
Returns:
an int array of the graph perspective indices of the selected edges

getSelectedEdges

List getSelectedEdges()
Returns:
a list of the selected EdgeView

addGraphViewChangeListener

void addGraphViewChangeListener(GraphViewChangeListener listener)
Adds a new GraphViewChangeListener to this GraphViews list of listeners.


removeGraphViewChangeListener

void removeGraphViewChangeListener(GraphViewChangeListener listener)
Removes a GraphViewChangeListener from this GraphViews list of listeners.


setBackgroundPaint

void setBackgroundPaint(Paint paint)
Parameters:
paint - the new Paint for the background

getBackgroundPaint

Paint getBackgroundPaint()
Returns:
the backgroundPaint

getComponent

Component getComponent()
Returns:
the java.awt.Component that can be added to most screen thingys

addNodeView

NodeView addNodeView(int node_index)
Parameters:
node_index - the index of a node to have a view created for it
Returns:
a new NodeView based on the node with the given index

addEdgeView

EdgeView addEdgeView(int edge_index)
Parameters:
edge_index - the index of an edge
Returns:
the newly created edgeview

addEdgeView

EdgeView addEdgeView(String class_name,
                     int edge_index)
To facilitate adding Custome EdgeViews It is recomended that All Custom Edge Views follow the patterns outlined in PEdgeView and BasicPEdgeView.

Parameters:
class_name - the name of the class that implements EdgeView and esnted PEdge
edge_index - the index of the edge

addNodeView

NodeView addNodeView(String class_name,
                     int node_index)
To facilitate adding Custome NodeViews It is recomended that All Custom Node Views follow the patterns outlined in PNodeView and BasicPNodeView.

Parameters:
class_name - the name of the class that implements NodeView and esnted PNode
node_index - the index of the node

addNodeView

NodeView addNodeView(int node_index,
                     NodeView node_view_replacement)
Add in a NodeView for a Node in the GraphPerspective. Note that this means that if there already was a NodeView for this node, the new NodeView will take its place.

Returns:
If it is replacing, it returns the old NodeView.

removeNodeView

NodeView removeNodeView(NodeView node_view)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

removeNodeView

NodeView removeNodeView(Node node)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

removeNodeView

NodeView removeNodeView(int node)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

removeEdgeView

EdgeView removeEdgeView(EdgeView edge_view)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

removeEdgeView

EdgeView removeEdgeView(Edge edge)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

removeEdgeView

EdgeView removeEdgeView(int edge)
This will entirely remove a NodeView/EdgeView from the GraphView. This is different than

See Also:
as that method simply stops showing the node/edge. This method will destroy the object. It will be returned though, so that a reference can be kept for undo purposes.

getIdentifier

String getIdentifier()
Returns:
The Unique Identifier of this GraphView

setIdentifier

void setIdentifier(String new_identifier)
Parameters:
new_identifier - The New Identifier for this GraphView

getZoom

double getZoom()
Returns:
The Current Zoom Level

setZoom

void setZoom(double zoom)
Parameters:
zoom - The New ZoomLevel

fitContent

void fitContent()
Fits all Viewable elements onto the Graph


updateView

void updateView()
Do a global redraw of the entire canvas


getRootGraph

RootGraph getRootGraph()
Returns:
the root graph of the GraphPerspective that we are actually a view on

getNodeViewsIterator

Iterator getNodeViewsIterator()
nodeViewsIterator only returns the NodeViews that are explicitly associated with this GraphView


getNodeViewCount

int getNodeViewCount()
Returns:
the number of node views present

getEdgeViewCount

int getEdgeViewCount()
Returns:
the number of EdgeViews present

getNodeView

NodeView getNodeView(Node node)
Parameters:
node - The Node whose view is requested
Returns:
The NodeView of the given Node

getNodeView

NodeView getNodeView(int index)
Parameters:
index - the index of the node whose view is requested
Returns:
The NodeView of the given Node

getEdgeViewsList

List getEdgeViewsList()
Return all of the EdgeViews in this GraphView


getEdgeViewsList

List getEdgeViewsList(Node oneNode,
                      Node otherNode)
Note that this will return a list of Edge objects, the other one will return indices

Returns:
The list of EdgeViews connecting these two nodes. Possibly null.

getEdgeViewsList

List getEdgeViewsList(int from_node_index,
                      int to_node_index,
                      boolean include_undirected_edges)
Returns:
a List of indicies

getEdgeView

EdgeView getEdgeView(int edge_index)
Returns:
the EdgeView that corresponds to the given index

getEdgeViewsIterator

Iterator getEdgeViewsIterator()
Return all of the EdgeViews in this GraphView


getEdgeView

EdgeView getEdgeView(Edge edge)
Returns:
the EdgeView that corresponds to the given Edge

edgeCount

int edgeCount()
Returns:
the number of edges

nodeCount

int nodeCount()
Returns:
The number of Nodes, same number as the perspective

hideGraphObject

boolean hideGraphObject(Object object)
use this to hide a node or edge


showGraphObject

boolean showGraphObject(Object object)
use this to show a node or edge


hideGraphObjects

boolean hideGraphObjects(List objects)
Warning!!!!!!!
Only to be used for homogenous groups!!!!


showGraphObjects

boolean showGraphObjects(List objects)
Warning!!!!!!!
Only to be used for homogenous groups!!!!


getContextMethods

Object[] getContextMethods(String class_name,
                           boolean plus_superclass)
Context Menu Support


getContextMethods

Object[] getContextMethods(String class_name,
                           Object[] methods)
Context Menu Support


addContextMethod

boolean addContextMethod(String class_name,
                         String method_class_name,
                         String method_name,
                         Object[] args,
                         ClassLoader loader)
Context Menu Support


setAllNodePropertyData

void setAllNodePropertyData(int node_index,
                            Object[] data)
Set All Data For a NOde Big Bold Faced Warning
Talk to rowan before using.


getAllNodePropertyData

Object[] getAllNodePropertyData(int node_index)

setAllEdgePropertyData

void setAllEdgePropertyData(int edge_index,
                            Object[] data)
Set All Data For an Edge
Big Bold Faced Warning
Talk to rowan before using.


getAllEdgePropertyData

Object[] getAllEdgePropertyData(int edge_index)

getNodeObjectProperty

Object getNodeObjectProperty(int node_index,
                             int property)
Return the stored value for the node for the given property

Parameters:
node_index - The Node Index to be queried
property - the property to be accessed

setNodeObjectProperty

boolean setNodeObjectProperty(int node_index,
                              int property,
                              Object value)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed
value - the new value for this property

getEdgeObjectProperty

Object getEdgeObjectProperty(int edge_index,
                             int property)
Return the stored value for the edge for the given property

Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed

setEdgeObjectProperty

boolean setEdgeObjectProperty(int edge_index,
                              int property,
                              Object value)
Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed
value - the new value for this property

getNodeDoubleProperty

double getNodeDoubleProperty(int node_index,
                             int property)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed

setNodeDoubleProperty

boolean setNodeDoubleProperty(int node_index,
                              int property,
                              double value)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed
value - the new value for this property

getEdgeDoubleProperty

double getEdgeDoubleProperty(int edge_index,
                             int property)

setEdgeDoubleProperty

boolean setEdgeDoubleProperty(int edge_index,
                              int property,
                              double value)
Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed
value - the new value for this property

getNodeFloatProperty

float getNodeFloatProperty(int node_index,
                           int property)

setNodeFloatProperty

boolean setNodeFloatProperty(int node_index,
                             int property,
                             float value)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed
value - the new value for this property

getEdgeFloatProperty

float getEdgeFloatProperty(int edge_index,
                           int property)

setEdgeFloatProperty

boolean setEdgeFloatProperty(int edge_index,
                             int property,
                             float value)
Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed
value - the new value for this property

getNodeBooleanProperty

boolean getNodeBooleanProperty(int node_index,
                               int property)

setNodeBooleanProperty

boolean setNodeBooleanProperty(int node_index,
                               int property,
                               boolean value)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed
value - the new value for this property

getEdgeBooleanProperty

boolean getEdgeBooleanProperty(int edge_index,
                               int property)

setEdgeBooleanProperty

boolean setEdgeBooleanProperty(int edge_index,
                               int property,
                               boolean value)
Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed
value - the new value for this property

getNodeIntProperty

int getNodeIntProperty(int node_index,
                       int property)

setNodeIntProperty

boolean setNodeIntProperty(int node_index,
                           int property,
                           int value)
Parameters:
node_index - The Node Index to be queried
property - the property to be accessed
value - the new value for this property

getEdgeIntProperty

int getEdgeIntProperty(int edge_index,
                       int property)

setEdgeIntProperty

boolean setEdgeIntProperty(int edge_index,
                           int property,
                           int value)
Parameters:
edge_index - The Edge Index to be queried
property - the property to be accessed
value - the new value for this property

www.cytoscape.org