Cytoscape 2.8.0 API

ding.view
Class DGraphView

java.lang.Object
  extended by ding.view.DGraphView
All Implemented Interfaces:
GraphView, Printable
Direct Known Subclasses:
DingNetworkView

public class DGraphView
extends Object
implements GraphView, Printable

DING implementation of the GINY view. Explain relationship to cytoscape. Throughout this code I am assuming that nodes or edges are never removed from the underlying RootGraph. This assumption was made in the old GraphView implementation. Removal from the RootGraph is the only thing that can affect m_drawPersp and m_structPersp that is beyond our control.

Author:
Nerius Landys

Nested Class Summary
static class DGraphView.Canvas
          Enum to identify ding canvases - used in getCanvas(Canvas canvasId)
static class DGraphView.ShapeType
           
 
Field Summary
protected static int DEF_SNAPSHOT_SIZE
           
 
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
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
DGraphView(GraphPerspective perspective)
          Creates a new DGraphView object.
 
Method Summary
 void addContentChangeListener(ContentChangeListener l)
          DOCUMENT ME!
 boolean addContextMethod(String className, String methodClassName, String methodName, Object[] args, ClassLoader loader)
          DOCUMENT ME!
 void addEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 EdgeView addEdgeView(int edgeInx)
          Adds EdgeView to the GraphView.
 EdgeView addEdgeView(String className, int edgeInx)
          Will thrown an UnsupportedOperationException.
 void addGraphViewChangeListener(GraphViewChangeListener l)
          Add GraphViewChangeListener to linked list of GraphViewChangeListeners.
 void addNodeContextMenuListener(NodeContextMenuListener l)
          DOCUMENT ME!
 NodeView addNodeView(int nodeInx)
          Adds a NodeView object to the GraphView.
 NodeView addNodeView(int nodeInx, NodeView replacement)
          Will thrown an UnsupportedOperationException.
 NodeView addNodeView(String className, int nodeInx)
          Will thrown an UnsupportedOperationException.
 void addViewportChangeListener(ViewportChangeListener l)
          DOCUMENT ME!
 Image createImage(int width, int height, double shrink)
          Method to return a reference to an Image object, which represents the current network view.
 void disableEdgeSelection()
          Disables the ability to select edges.
 void disableNodeSelection()
          Disables the ability to select nodes.
 void drawSnapshot(Image img, GraphLOD lod, Paint bgPaint, double xCenter, double yCenter, double scaleFactor)
          DOCUMENT ME!
 int edgeCount()
          DOCUMENT ME!
 boolean edgeSelectionEnabled()
          Whether edge selection is enabled.
 void enableEdgeSelection()
          Enables the ability to select edges.
 void enableNodeSelection()
          Enabling the ability to select nodes.
 void fitContent()
          Resize the network view to the size of the canvas and redraw it.
 void fitSelected()
          DOCUMENT ME!
 Object[] getAllEdgePropertyData(int edgeInx)
          DOCUMENT ME!
 Object[] getAllNodePropertyData(int nodeInx)
          DOCUMENT ME!
 Paint getAnchorSelectedPaint()
          DOCUMENT ME!
 float getAnchorSize()
          DOCUMENT ME!
 Paint getAnchorUnselectedPaint()
          DOCUMENT ME!
static Map<Integer,Shape> getArrowShapes()
          DOCUMENT ME!
 Paint getBackgroundPaint()
          Returns the background color on the canvas.
 InnerCanvas getCanvas()
          Method to return a reference to the network canvas.
 DingCanvas getCanvas(DGraphView.Canvas canvasId)
          Method to return a reference to a DingCanvas object, given a canvas id.
 Point2D getCenter()
          DOCUMENT ME!
 Component getComponent()
          Returns the InnerCanvas object.
 Object[] getContextMethods(String className, boolean plusSuperclass)
          DOCUMENT ME!
 Object[] getContextMethods(String className, Object[] methods)
          DOCUMENT ME!
 boolean getEdgeBooleanProperty(int edgeInx, int property)
          DOCUMENT ME!
 double getEdgeDoubleProperty(int edgeInx, int property)
          DOCUMENT ME!
 float getEdgeFloatProperty(int edgeInx, int property)
          DOCUMENT ME!
 int getEdgeIntProperty(int edgeInx, int property)
          DOCUMENT ME!
 Object getEdgeObjectProperty(int edgeInx, int property)
          DOCUMENT ME!
 EdgeView getEdgeView(Edge edge)
          DOCUMENT ME!
 EdgeView getEdgeView(int edgeInx)
          DOCUMENT ME!
 int getEdgeViewCount()
          DOCUMENT ME!
 Iterator getEdgeViewsIterator()
          DOCUMENT ME!
 List getEdgeViewsList()
          DOCUMENT ME!
 List getEdgeViewsList(int oneNodeInx, int otherNodeInx, boolean includeUndirected)
          DOCUMENT ME!
 List getEdgeViewsList(Node oneNode, Node otherNode)
          DOCUMENT ME!
 boolean getExtents(double[] extentsBuff)
          Extents of the view.
 GraphLOD getGraphLOD()
          DOCUMENT ME!
 GraphPerspective getGraphPerspective()
          Returns the graph model that this view was created for.
 String getIdentifier()
          DOCUMENT ME!
 Object getLock()
           
 boolean getNodeBooleanProperty(int nodeInx, int property)
          DOCUMENT ME!
 double getNodeDoubleProperty(int nodeInx, int property)
          DOCUMENT ME!
 float getNodeFloatProperty(int nodeInx, int property)
          DOCUMENT ME!
 int getNodeIntProperty(int nodeInx, int property)
          DOCUMENT ME!
 Object getNodeObjectProperty(int nodeInx, int property)
          DOCUMENT ME!
static Map<Integer,Shape> getNodeShapes()
          This is inefficient, but there is no way to sync.
 void getNodesIntersectingRectangle(double xMinimum, double yMinimum, double xMaximum, double yMaximum, boolean treatNodeShapesAsRectangle, IntStack returnVal)
          Efficiently computes the set of nodes intersecting an axis-aligned query rectangle; the query rectangle is specified in the node coordinate system, not the component coordinate system.
 NodeView getNodeView(int nodeInx)
          DOCUMENT ME!
 NodeView getNodeView(Node node)
          DOCUMENT ME!
 int getNodeViewCount()
          DOCUMENT ME!
 Iterator getNodeViewsIterator()
          DOCUMENT ME!
 EdgeView getPickedEdgeView(Point2D pt)
          DOCUMENT ME!
 NodeView getPickedNodeView(Point2D pt)
          utility that returns the nodeView that is located at input point
 RootGraph getRootGraph()
          DOCUMENT ME!
 int[] getSelectedEdgeIndices()
          Returns an array of selected edge indices.
 List getSelectedEdges()
          Returns a list of selected edge objects.
 int[] getSelectedNodeIndices()
          Returns an array of selected node indices.
 List getSelectedNodes()
          Returns a list of selected node objects.
 double getZoom()
          DOCUMENT ME!
 boolean hideGraphObject(Object obj)
          DOCUMENT ME!
 boolean hideGraphObjects(List objects)
          DOCUMENT ME!
 int nodeCount()
          DOCUMENT ME!
 boolean nodeSelectionEnabled()
          Whether node selection is enabled.
 int print(Graphics g, PageFormat pageFormat, int page)
          DOCUMENT ME!
 void queryDrawnEdges(int xMin, int yMin, int xMax, int yMax, IntStack returnVal)
          DOCUMENT ME!
 void removeContentChangeListener(ContentChangeListener l)
          DOCUMENT ME!
 void removeEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 EdgeView removeEdgeView(Edge edge)
          Removes an EdgeView based on an Edge.
 EdgeView removeEdgeView(EdgeView edgeView)
          Removes an EdgeView based on an EdgeView.
 EdgeView removeEdgeView(int edgeInx)
          Removes an EdgeView based on an EdgeIndex.
 void removeGraphViewChangeListener(GraphViewChangeListener l)
          Remove GraphViewChangeListener from linked list of GraphViewChangeListeners.
 void removeNodeContextMenuListener(NodeContextMenuListener l)
          DOCUMENT ME!
 NodeView removeNodeView(int nodeInx)
          Removes a NodeView based on a specified index.
 NodeView removeNodeView(Node node)
          Removes a NodeView based on specified Node.
 NodeView removeNodeView(NodeView nodeView)
          Removes a NodeView based on specified NodeView.
 void removeViewportChangeListener(ViewportChangeListener l)
          DOCUMENT ME!
 void setAllEdgePropertyData(int edgeInx, Object[] data)
          DOCUMENT ME!
 void setAllNodePropertyData(int nodeInx, Object[] data)
          DOCUMENT ME!
 void setBackgroundPaint(Paint paint)
          Sets the background color on the canvas.
 void setCenter(double x, double y)
          DOCUMENT ME!
 boolean setEdgeBooleanProperty(int edgeInx, int property, boolean val)
          DOCUMENT ME!
 boolean setEdgeDoubleProperty(int edgeInx, int property, double val)
          DOCUMENT ME!
 boolean setEdgeFloatProperty(int edgeInx, int property, float value)
          DOCUMENT ME!
 boolean setEdgeIntProperty(int edgeInx, int property, int value)
          DOCUMENT ME!
 boolean setEdgeObjectProperty(int edgeInx, int property, Object value)
          DOCUMENT ME!
 void setGraphLOD(GraphLOD lod)
          DOCUMENT ME!
 void setIdentifier(String id)
          DOCUMENT ME!
 boolean setNodeBooleanProperty(int nodeInx, int property, boolean val)
          DOCUMENT ME!
 boolean setNodeDoubleProperty(int nodeInx, int property, double val)
          DOCUMENT ME!
 boolean setNodeFloatProperty(int nodeInx, int property, float value)
          DOCUMENT ME!
 boolean setNodeIntProperty(int nodeInx, int property, int value)
          DOCUMENT ME!
 boolean setNodeObjectProperty(int nodeInx, int property, Object value)
          DOCUMENT ME!
 void setPrintingTextAsShape(boolean textAsShape)
          DOCUMENT ME!
 void setViewportChanged(boolean val)
           
 void setZoom(double zoom)
          Set the zoom level and redraw the view.
 boolean showGraphObject(Object obj)
          DOCUMENT ME!
 boolean showGraphObjects(List objects)
          DOCUMENT ME!
 void updateView()
          Repaint network canvas.
 void xformComponentToNodeCoords(double[] coords)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEF_SNAPSHOT_SIZE

protected static int DEF_SNAPSHOT_SIZE
Constructor Detail

DGraphView

public DGraphView(GraphPerspective perspective)
Creates a new DGraphView object.

Parameters:
perspective - The graph model that we'll be creating a view for.
Method Detail

getGraphPerspective

public GraphPerspective getGraphPerspective()
Returns the graph model that this view was created for.

Specified by:
getGraphPerspective in interface GraphView
Returns:
The GraphPerspective that the view was created for.

getLock

public Object getLock()

setViewportChanged

public void setViewportChanged(boolean val)

nodeSelectionEnabled

public boolean nodeSelectionEnabled()
Whether node selection is enabled.

Specified by:
nodeSelectionEnabled in interface GraphView
Returns:
Whether node selection is enabled.

edgeSelectionEnabled

public boolean edgeSelectionEnabled()
Whether edge selection is enabled.

Specified by:
edgeSelectionEnabled in interface GraphView
Returns:
Whether edge selection is enabled.

enableNodeSelection

public void enableNodeSelection()
Enabling the ability to select nodes.

Specified by:
enableNodeSelection in interface GraphView

disableNodeSelection

public void disableNodeSelection()
Disables the ability to select nodes.

Specified by:
disableNodeSelection in interface GraphView

enableEdgeSelection

public void enableEdgeSelection()
Enables the ability to select edges.

Specified by:
enableEdgeSelection in interface GraphView

disableEdgeSelection

public void disableEdgeSelection()
Disables the ability to select edges.

Specified by:
disableEdgeSelection in interface GraphView

getSelectedNodeIndices

public int[] getSelectedNodeIndices()
Returns an array of selected node indices.

Specified by:
getSelectedNodeIndices in interface GraphView
Returns:
An array of selected node indices.

getSelectedNodes

public List getSelectedNodes()
Returns a list of selected node objects.

Specified by:
getSelectedNodes in interface GraphView
Returns:
A list of selected node objects.

getSelectedEdgeIndices

public int[] getSelectedEdgeIndices()
Returns an array of selected edge indices.

Specified by:
getSelectedEdgeIndices in interface GraphView
Returns:
An array of selected edge indices.

getSelectedEdges

public List getSelectedEdges()
Returns a list of selected edge objects.

Specified by:
getSelectedEdges in interface GraphView
Returns:
A list of selected edge objects.

addGraphViewChangeListener

public void addGraphViewChangeListener(GraphViewChangeListener l)
Add GraphViewChangeListener to linked list of GraphViewChangeListeners. AAAAAARRRGGGGHHHHHH!!!!

Specified by:
addGraphViewChangeListener in interface GraphView
Parameters:
l - GraphViewChangeListener to be added to the list.

removeGraphViewChangeListener

public void removeGraphViewChangeListener(GraphViewChangeListener l)
Remove GraphViewChangeListener from linked list of GraphViewChangeListeners. AAAAAARRRGGGGHHHHHH!!!!

Specified by:
removeGraphViewChangeListener in interface GraphView
Parameters:
l - GraphViewChangeListener to be removed from the list.

setBackgroundPaint

public void setBackgroundPaint(Paint paint)
Sets the background color on the canvas.

Specified by:
setBackgroundPaint in interface GraphView
Parameters:
paint - The Paint (color) to apply to the background.

getBackgroundPaint

public Paint getBackgroundPaint()
Returns the background color on the canvas.

Specified by:
getBackgroundPaint in interface GraphView
Returns:
The background color on the canvas.

getComponent

public Component getComponent()
Returns the InnerCanvas object. The InnerCanvas object is the actual component that the network is rendered on.

Specified by:
getComponent in interface GraphView
Returns:
The InnerCanvas object.

addNodeView

public NodeView addNodeView(int nodeInx)
Adds a NodeView object to the GraphView. Creates NodeView if one doesn't already exist.

Specified by:
addNodeView in interface GraphView
Parameters:
nodeInx - The index of the NodeView object to be added.
Returns:
The NodeView object that is added to the GraphView.

addEdgeView

public EdgeView addEdgeView(int edgeInx)
Adds EdgeView to the GraphView.

Specified by:
addEdgeView in interface GraphView
Parameters:
edgeInx - The index of EdgeView to be added.
Returns:
The EdgeView that was added.

addEdgeView

public EdgeView addEdgeView(String className,
                            int edgeInx)
Will thrown an UnsupportedOperationException. Don't use this.

Specified by:
addEdgeView in interface GraphView
Parameters:
className - ???
edgeInx - ???
Returns:
Nothing, an exception will be thrown.

addNodeView

public NodeView addNodeView(String className,
                            int nodeInx)
Will thrown an UnsupportedOperationException. Don't use this.

Specified by:
addNodeView in interface GraphView
Parameters:
className - ???
nodeInx - ???
Returns:
Nothing, an exception will be thrown.

addNodeView

public NodeView addNodeView(int nodeInx,
                            NodeView replacement)
Will thrown an UnsupportedOperationException. Don't use this.

Specified by:
addNodeView in interface GraphView
Parameters:
nodeInx - ??
replacement - ??
Returns:
Nothing, an exception will be thrown.

removeNodeView

public NodeView removeNodeView(NodeView nodeView)
Removes a NodeView based on specified NodeView.

Specified by:
removeNodeView in interface GraphView
Parameters:
nodeView - The NodeView object to be removed.
Returns:
The NodeView object that was removed.
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

public NodeView removeNodeView(Node node)
Removes a NodeView based on specified Node.

Specified by:
removeNodeView in interface GraphView
Parameters:
node - The Node object connected to the NodeView to be removed.
Returns:
The NodeView object that was removed.
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

public NodeView removeNodeView(int nodeInx)
Removes a NodeView based on a specified index.

Specified by:
removeNodeView in interface GraphView
Parameters:
nodeInx - The index of the NodeView to be removed.
Returns:
The NodeView object that was removed.
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

public EdgeView removeEdgeView(EdgeView edgeView)
Removes an EdgeView based on an EdgeView.

Specified by:
removeEdgeView in interface GraphView
Parameters:
edgeView - The EdgeView to be removed.
Returns:
The EdgeView that was removed.
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

public EdgeView removeEdgeView(Edge edge)
Removes an EdgeView based on an Edge.

Specified by:
removeEdgeView in interface GraphView
Parameters:
edge - The Edge of the EdgeView to be removed.
Returns:
The EdgeView that was removed.
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

public EdgeView removeEdgeView(int edgeInx)
Removes an EdgeView based on an EdgeIndex.

Specified by:
removeEdgeView in interface GraphView
Parameters:
edgeInx - The edge index of the EdgeView to be removed.
Returns:
The EdgeView that was removed.
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

public String getIdentifier()
DOCUMENT ME!

Specified by:
getIdentifier in interface GraphView
Returns:
DOCUMENT ME!

setIdentifier

public void setIdentifier(String id)
DOCUMENT ME!

Specified by:
setIdentifier in interface GraphView
Parameters:
id - DOCUMENT ME!

getZoom

public double getZoom()
DOCUMENT ME!

Specified by:
getZoom in interface GraphView
Returns:
DOCUMENT ME!

setZoom

public void setZoom(double zoom)
Set the zoom level and redraw the view.

Specified by:
setZoom in interface GraphView
Parameters:
zoom - The New ZoomLevel

fitContent

public void fitContent()
Resize the network view to the size of the canvas and redraw it.

Specified by:
fitContent in interface GraphView

updateView

public void updateView()
Repaint network canvas.

Specified by:
updateView in interface GraphView

getRootGraph

public RootGraph getRootGraph()
DOCUMENT ME!

Specified by:
getRootGraph in interface GraphView
Returns:
DOCUMENT ME!

getNodeViewsIterator

public Iterator getNodeViewsIterator()
DOCUMENT ME!

Specified by:
getNodeViewsIterator in interface GraphView
Returns:
DOCUMENT ME!

getNodeViewCount

public int getNodeViewCount()
DOCUMENT ME!

Specified by:
getNodeViewCount in interface GraphView
Returns:
DOCUMENT ME!

getEdgeViewCount

public int getEdgeViewCount()
DOCUMENT ME!

Specified by:
getEdgeViewCount in interface GraphView
Returns:
DOCUMENT ME!

getNodeView

public NodeView getNodeView(Node node)
DOCUMENT ME!

Specified by:
getNodeView in interface GraphView
Parameters:
node - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeView

public NodeView getNodeView(int nodeInx)
DOCUMENT ME!

Specified by:
getNodeView in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeViewsList

public List getEdgeViewsList()
DOCUMENT ME!

Specified by:
getEdgeViewsList in interface GraphView
Returns:
DOCUMENT ME!

getEdgeViewsList

public List getEdgeViewsList(Node oneNode,
                             Node otherNode)
DOCUMENT ME!

Specified by:
getEdgeViewsList in interface GraphView
Parameters:
oneNode - DOCUMENT ME!
otherNode - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeViewsList

public List getEdgeViewsList(int oneNodeInx,
                             int otherNodeInx,
                             boolean includeUndirected)
DOCUMENT ME!

Specified by:
getEdgeViewsList in interface GraphView
Parameters:
oneNodeInx - DOCUMENT ME!
otherNodeInx - DOCUMENT ME!
includeUndirected - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeView

public EdgeView getEdgeView(int edgeInx)
DOCUMENT ME!

Specified by:
getEdgeView in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeViewsIterator

public Iterator getEdgeViewsIterator()
DOCUMENT ME!

Specified by:
getEdgeViewsIterator in interface GraphView
Returns:
DOCUMENT ME!

getEdgeView

public EdgeView getEdgeView(Edge edge)
DOCUMENT ME!

Specified by:
getEdgeView in interface GraphView
Parameters:
edge - DOCUMENT ME!
Returns:
DOCUMENT ME!

edgeCount

public int edgeCount()
DOCUMENT ME!

Specified by:
edgeCount in interface GraphView
Returns:
DOCUMENT ME!

nodeCount

public int nodeCount()
DOCUMENT ME!

Specified by:
nodeCount in interface GraphView
Returns:
DOCUMENT ME!

hideGraphObject

public boolean hideGraphObject(Object obj)
DOCUMENT ME!

Specified by:
hideGraphObject in interface GraphView
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

showGraphObject

public boolean showGraphObject(Object obj)
DOCUMENT ME!

Specified by:
showGraphObject in interface GraphView
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

hideGraphObjects

public boolean hideGraphObjects(List objects)
DOCUMENT ME!

Specified by:
hideGraphObjects in interface GraphView
Parameters:
objects - DOCUMENT ME!
Returns:
DOCUMENT ME!

showGraphObjects

public boolean showGraphObjects(List objects)
DOCUMENT ME!

Specified by:
showGraphObjects in interface GraphView
Parameters:
objects - DOCUMENT ME!
Returns:
DOCUMENT ME!

getContextMethods

public Object[] getContextMethods(String className,
                                  boolean plusSuperclass)
DOCUMENT ME!

Specified by:
getContextMethods in interface GraphView
Parameters:
className - DOCUMENT ME!
plusSuperclass - DOCUMENT ME!
Returns:
DOCUMENT ME!

getContextMethods

public Object[] getContextMethods(String className,
                                  Object[] methods)
DOCUMENT ME!

Specified by:
getContextMethods in interface GraphView
Parameters:
className - DOCUMENT ME!
methods - DOCUMENT ME!
Returns:
DOCUMENT ME!

addContextMethod

public boolean addContextMethod(String className,
                                String methodClassName,
                                String methodName,
                                Object[] args,
                                ClassLoader loader)
DOCUMENT ME!

Specified by:
addContextMethod in interface GraphView
Parameters:
className - DOCUMENT ME!
methodClassName - DOCUMENT ME!
methodName - DOCUMENT ME!
args - DOCUMENT ME!
loader - DOCUMENT ME!
Returns:
DOCUMENT ME!

setAllNodePropertyData

public void setAllNodePropertyData(int nodeInx,
                                   Object[] data)
DOCUMENT ME!

Specified by:
setAllNodePropertyData in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
data - DOCUMENT ME!

getAllNodePropertyData

public Object[] getAllNodePropertyData(int nodeInx)
DOCUMENT ME!

Specified by:
getAllNodePropertyData in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
Returns:
DOCUMENT ME!

setAllEdgePropertyData

public void setAllEdgePropertyData(int edgeInx,
                                   Object[] data)
DOCUMENT ME!

Specified by:
setAllEdgePropertyData in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
data - DOCUMENT ME!

getAllEdgePropertyData

public Object[] getAllEdgePropertyData(int edgeInx)
DOCUMENT ME!

Specified by:
getAllEdgePropertyData in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeObjectProperty

public Object getNodeObjectProperty(int nodeInx,
                                    int property)
DOCUMENT ME!

Specified by:
getNodeObjectProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setNodeObjectProperty

public boolean setNodeObjectProperty(int nodeInx,
                                     int property,
                                     Object value)
DOCUMENT ME!

Specified by:
setNodeObjectProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeObjectProperty

public Object getEdgeObjectProperty(int edgeInx,
                                    int property)
DOCUMENT ME!

Specified by:
getEdgeObjectProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setEdgeObjectProperty

public boolean setEdgeObjectProperty(int edgeInx,
                                     int property,
                                     Object value)
DOCUMENT ME!

Specified by:
setEdgeObjectProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeDoubleProperty

public double getNodeDoubleProperty(int nodeInx,
                                    int property)
DOCUMENT ME!

Specified by:
getNodeDoubleProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setNodeDoubleProperty

public boolean setNodeDoubleProperty(int nodeInx,
                                     int property,
                                     double val)
DOCUMENT ME!

Specified by:
setNodeDoubleProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeDoubleProperty

public double getEdgeDoubleProperty(int edgeInx,
                                    int property)
DOCUMENT ME!

Specified by:
getEdgeDoubleProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setEdgeDoubleProperty

public boolean setEdgeDoubleProperty(int edgeInx,
                                     int property,
                                     double val)
DOCUMENT ME!

Specified by:
setEdgeDoubleProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeFloatProperty

public float getNodeFloatProperty(int nodeInx,
                                  int property)
DOCUMENT ME!

Specified by:
getNodeFloatProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setNodeFloatProperty

public boolean setNodeFloatProperty(int nodeInx,
                                    int property,
                                    float value)
DOCUMENT ME!

Specified by:
setNodeFloatProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeFloatProperty

public float getEdgeFloatProperty(int edgeInx,
                                  int property)
DOCUMENT ME!

Specified by:
getEdgeFloatProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setEdgeFloatProperty

public boolean setEdgeFloatProperty(int edgeInx,
                                    int property,
                                    float value)
DOCUMENT ME!

Specified by:
setEdgeFloatProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeBooleanProperty

public boolean getNodeBooleanProperty(int nodeInx,
                                      int property)
DOCUMENT ME!

Specified by:
getNodeBooleanProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setNodeBooleanProperty

public boolean setNodeBooleanProperty(int nodeInx,
                                      int property,
                                      boolean val)
DOCUMENT ME!

Specified by:
setNodeBooleanProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeBooleanProperty

public boolean getEdgeBooleanProperty(int edgeInx,
                                      int property)
DOCUMENT ME!

Specified by:
getEdgeBooleanProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setEdgeBooleanProperty

public boolean setEdgeBooleanProperty(int edgeInx,
                                      int property,
                                      boolean val)
DOCUMENT ME!

Specified by:
setEdgeBooleanProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

getNodeIntProperty

public int getNodeIntProperty(int nodeInx,
                              int property)
DOCUMENT ME!

Specified by:
getNodeIntProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setNodeIntProperty

public boolean setNodeIntProperty(int nodeInx,
                                  int property,
                                  int value)
DOCUMENT ME!

Specified by:
setNodeIntProperty in interface GraphView
Parameters:
nodeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEdgeIntProperty

public int getEdgeIntProperty(int edgeInx,
                              int property)
DOCUMENT ME!

Specified by:
getEdgeIntProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
Returns:
DOCUMENT ME!

setEdgeIntProperty

public boolean setEdgeIntProperty(int edgeInx,
                                  int property,
                                  int value)
DOCUMENT ME!

Specified by:
setEdgeIntProperty in interface GraphView
Parameters:
edgeInx - DOCUMENT ME!
property - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!

setCenter

public void setCenter(double x,
                      double y)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!

getCenter

public Point2D getCenter()
DOCUMENT ME!

Returns:
DOCUMENT ME!

fitSelected

public void fitSelected()
DOCUMENT ME!


setGraphLOD

public void setGraphLOD(GraphLOD lod)
DOCUMENT ME!

Parameters:
lod - DOCUMENT ME!

getGraphLOD

public GraphLOD getGraphLOD()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setPrintingTextAsShape

public void setPrintingTextAsShape(boolean textAsShape)
DOCUMENT ME!

Parameters:
textAsShape - DOCUMENT ME!

getNodesIntersectingRectangle

public void getNodesIntersectingRectangle(double xMinimum,
                                          double yMinimum,
                                          double xMaximum,
                                          double yMaximum,
                                          boolean treatNodeShapesAsRectangle,
                                          IntStack returnVal)
Efficiently computes the set of nodes intersecting an axis-aligned query rectangle; the query rectangle is specified in the node coordinate system, not the component coordinate system.

NOTE: The order of elements placed on the stack follows the rendering order of nodes; the element waiting to be popped off the stack is the node that is rendered last, and thus is "on top of" other nodes potentially beneath it.

HINT: To perform a point query simply set xMin equal to xMax and yMin equal to yMax.

Parameters:
xMinimum - a boundary of the query rectangle: the minimum X coordinate.
yMinimum - a boundary of the query rectangle: the minimum Y coordinate.
xMaximum - a boundary of the query rectangle: the maximum X coordinate.
yMaximum - a boundary of the query rectangle: the maximum Y coordinate.
treatNodeShapesAsRectangle - if true, nodes are treated as rectangles for purposes of the query computation; if false, true node shapes are respected, at the expense of slowing down the query by a constant factor.
returnVal - RootGraph indices of nodes intersecting the query rectangle will be placed onto this stack; the stack is not emptied by this method initially.

queryDrawnEdges

public void queryDrawnEdges(int xMin,
                            int yMin,
                            int xMax,
                            int yMax,
                            IntStack returnVal)
DOCUMENT ME!

Parameters:
xMin - DOCUMENT ME!
yMin - DOCUMENT ME!
xMax - DOCUMENT ME!
yMax - DOCUMENT ME!
returnVal - DOCUMENT ME!

getExtents

public boolean getExtents(double[] extentsBuff)
Extents of the view. After the call extentsBuff[0] will be xmin, extentsBuff[1] will be ymin, extentsBuff[2] will be xmax, extentsBuff[3] will be ymax.

Returns:
true if the extends were successfully retrieved, else false

xformComponentToNodeCoords

public void xformComponentToNodeCoords(double[] coords)
DOCUMENT ME!

Parameters:
coords - DOCUMENT ME!

drawSnapshot

public void drawSnapshot(Image img,
                         GraphLOD lod,
                         Paint bgPaint,
                         double xCenter,
                         double yCenter,
                         double scaleFactor)
DOCUMENT ME!

Parameters:
img - DOCUMENT ME!
lod - DOCUMENT ME!
bgPaint - DOCUMENT ME!
xCenter - DOCUMENT ME!
yCenter - DOCUMENT ME!
scaleFactor - DOCUMENT ME!

addContentChangeListener

public void addContentChangeListener(ContentChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeContentChangeListener

public void removeContentChangeListener(ContentChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

addViewportChangeListener

public void addViewportChangeListener(ViewportChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeViewportChangeListener

public void removeViewportChangeListener(ViewportChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

print

public int print(Graphics g,
                 PageFormat pageFormat,
                 int page)
DOCUMENT ME!

Specified by:
print in interface Printable
Parameters:
g - DOCUMENT ME!
pageFormat - DOCUMENT ME!
page - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCanvas

public InnerCanvas getCanvas()
Method to return a reference to the network canvas. This method existed before the addition of background and foreground canvases, and it remains for backward compatibility.

Returns:
InnerCanvas

getCanvas

public DingCanvas getCanvas(DGraphView.Canvas canvasId)
Method to return a reference to a DingCanvas object, given a canvas id.

Parameters:
canvasId - Canvas
Returns:
DingCanvas

createImage

public Image createImage(int width,
                         int height,
                         double shrink)
Method to return a reference to an Image object, which represents the current network view.

Parameters:
width - Width of desired image.
height - Height of desired image.
shrink - Percent to shrink the network shown in the image. This doesn't shrink the image, just the network shown, as if the user zoomed out. Can be between 0 and 1, if not it will default to 1.
Returns:
Image
Throws:
IllegalArgumentException

getPickedNodeView

public NodeView getPickedNodeView(Point2D pt)
utility that returns the nodeView that is located at input point

Parameters:
pt -

getPickedEdgeView

public EdgeView getPickedEdgeView(Point2D pt)
DOCUMENT ME!

Parameters:
pt - DOCUMENT ME!
Returns:
DOCUMENT ME!

addNodeContextMenuListener

public void addNodeContextMenuListener(NodeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeNodeContextMenuListener

public void removeNodeContextMenuListener(NodeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

addEdgeContextMenuListener

public void addEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeEdgeContextMenuListener

public void removeEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

getAnchorSize

public final float getAnchorSize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getAnchorSelectedPaint

public final Paint getAnchorSelectedPaint()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getAnchorUnselectedPaint

public final Paint getAnchorUnselectedPaint()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodeShapes

public static Map<Integer,Shape> getNodeShapes()
This is inefficient, but there is no way to sync. giny type and renderer type.

Returns:
map of shape ids to shapes

getArrowShapes

public static Map<Integer,Shape> getArrowShapes()
DOCUMENT ME!

Returns:
DOCUMENT ME!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.