public final class LayoutNode extends Object implements Comparable<LayoutNode>
Module: layoutapi
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>layoutapi</artifactId> </dependency>
Constructor and Description 

LayoutNode(View<CyNode> nodeView,
int index,
CyRow row)
The main constructor for a LayoutNode.

Modifier and Type  Method and Description 

void 
addNeighbor(LayoutNode v)
Convenience function to keep track of neighbors of this node.

int 
compareTo(LayoutNode nodeView) 
void 
decrement(double x,
double y)
Decrement the location of this node by (x,y).

void 
decrementDisp(double x,
double y)
Decrement the displacement recorded for this node by (x,y).

double 
distance(double uX,
double uY)
Return the Euclidean distance between this node and a location

double 
distance(LayoutNode otherNode)
Return the Euclidean distance between this node and another node

int 
getDegree()
Return the node's degree (i.e.

double 
getHeight()
Return the height of this node

String 
getIdentifier()
Return the node's identifier.

int 
getIndex()
Returns the index of this LayoutNode.

List<LayoutNode> 
getNeighbors()
Convenience function to return the list of neighbors (connected nodes) of this node.

CyNode 
getNode()
Accessor function to return the Node associated with
this LayoutNode.

View<CyNode> 
getNodeView()
Accessor function to return the View

CyRow 
getRow()
Accessor function to return the CyRow associated with
this LayoutNode.

double 
getWidth()
Return the width of this node

double 
getX()
Return the current X value for this LayoutNode.

double 
getXDisp()
Return the current X displacement value for this LayoutNode.

double 
getY()
Return the current Y value for this LayoutNode.

double 
getYDisp()
Return the current Y displacement value for this LayoutNode.

void 
increment(double x,
double y)
Increment the location of this node by (x,y).

void 
incrementDisp(double x,
double y)
Increment the displacement recorded for this node by (x,y).

boolean 
isLocked()
Returns "true" if this node is locked, false otherwise.

void 
lock()
Register this node as being "locked".

void 
moveToLocation()
Move the node to its current x,y coordinate.

String 
printDisp()
Return a string representation of the node's displacement

String 
printLocation()
Return a string representation of the node's location

void 
setDisp(double x,
double y)
Set the displacement of this LayoutNode.

void 
setLocation(double x,
double y)
Set the location of this LayoutNode.

void 
setX(double x)
Set the X location of this LayoutNode.

void 
setY(double y)
Set the Y location of this LayoutNode.

String 
toString()
Return a string representation of the node

void 
unLock()
Register this node as being "unlocked".

public CyNode getNode()
public CyRow getRow()
public View<CyNode> getNodeView()
public void setLocation(double x, double y)
x
 Double representing the new X coordinate of this nodey
 Double representing the new Y coordinate of this nodepublic void setX(double x)
x
 Double representing the new X coordinate of this nodepublic void setY(double y)
y
 Double representing the new Y coordinate of this nodepublic void setDisp(double x, double y)
x
 Double representing the amount to offset in the x directiony
 Double representing the amount to offset in the y directionpublic void addNeighbor(LayoutNode v)
v
 LayoutNode that is a neighbor of this LayoutNodepublic List<LayoutNode> getNeighbors()
public int getIndex()
LayoutPartition
public void lock()
public void unLock()
public boolean isLocked()
public void incrementDisp(double x, double y)
x
 the additional amount to displace in the x directiony
 the additional amount to displace in the y directionpublic void increment(double x, double y)
x
 the amount to move in the x directiony
 the amount to move in the y directionpublic void decrementDisp(double x, double y)
x
 the additional amount to displace in the x directiony
 the additional amount to displace in the y directionpublic void decrement(double x, double y)
x
 the amount to move in the x directiony
 the amount to move in the y directionpublic double getX()
public double getY()
public double getXDisp()
public double getYDisp()
public double getWidth()
public double getHeight()
public double distance(LayoutNode otherNode)
otherNode
 the node to measure the distance topublic double distance(double uX, double uY)
uX
 the X location to measure the distance touY
 the Y location to measure the distance topublic void moveToLocation()
public String getIdentifier()
public int getDegree()
public String toString()
public String printDisp()
public String printLocation()
public int compareTo(LayoutNode nodeView)
compareTo
in interface Comparable<LayoutNode>
Copyright 2011 Cytoscape Consortium. All rights reserved.