
Cytoscape 3.0.1 API  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.cytoscape.view.layout.LayoutNode
public final class LayoutNode
The LayoutNode class. This class is used as a container for information
about the nodes in a layout. In particular, it provides a convenient handle
to information about position, the node itself, the node view. Many of
the methods of this class are wrappers for Node or View
Constructor Summary  

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

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". 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Constructor Detail 

public LayoutNode(View<CyNode> nodeView, int index, CyRow row)
nodeView
 The Viewindex
 The index (usually in a node array) of this nodeMethod Detail 

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 to
public double distance(double uX, double uY)
uX
 the X location to measure the distance touY
 the Y location to measure the distance to
public void moveToLocation()
public String getIdentifier()
public int getDegree()
public String toString()
toString
in class Object
public String printDisp()
public String printLocation()
public int compareTo(LayoutNode nodeView)
compareTo
in interface Comparable<LayoutNode>

Cytoscape 3.0.1 API  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 