public final class LayoutEdge extends Object implements Comparable<LayoutEdge>
Module: layout-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>layout-api</artifactId> </dependency>
Constructor and Description |
---|
LayoutEdge(CyEdge edge,
CyRow row)
Create a LayoutEdge that will contain information about this edge.
|
LayoutEdge(CyEdge edge,
LayoutNode v1,
LayoutNode v2,
CyRow row)
Create a LayoutEdge that will contains information about this edge,
and that record that it connects LayoutNodes v1 and v2.
|
Modifier and Type | Method and Description |
---|---|
void |
addNodes(LayoutNode v1,
LayoutNode v2)
Set the nodes associated with this edge.
|
int |
compareTo(LayoutEdge edgeView) |
CyEdge |
getEdge()
Return the Edge this LayoutEdge represents
|
String |
getIdentifier()
Return the edge's identifier.
|
double |
getLogWeight()
Return the current value for this edge's logWeight (-log(weight)).
|
CyRow |
getRow()
Return the CyRow for this LayoutEdge
|
LayoutNode |
getSource()
Return the source of this edge
|
LayoutNode |
getTarget()
Return the target of this edge
|
double |
getWeight()
Return the current value for this edge's weight.
|
void |
setLogWeight(double logWeight)
Set the log weight for this LayoutEdge.
|
void |
setWeight(double weight)
Set the weight for this LayoutEdge.
|
String |
toString()
Return a string representation for this LayoutEdge.
|
public LayoutEdge(CyEdge edge, CyRow row)
edge
- Edge that this LayoutEdge representspublic LayoutEdge(CyEdge edge, LayoutNode v1, LayoutNode v2, CyRow row)
edge
- Edge that this LayoutEdge representsv1
- The LayoutNode that represents the source of the edgev2
- The LayoutNode that represents the target of the edgepublic void addNodes(LayoutNode v1, LayoutNode v2)
v1
- The LayoutNode that represents the source of the edgev2
- The LayoutNode that represents the target of the edgepublic void setWeight(double weight)
weight
- the actual weightpublic void setLogWeight(double logWeight)
logWeight
- the actual -log of the weightpublic double getWeight()
public double getLogWeight()
public LayoutNode getSource()
public LayoutNode getTarget()
public CyEdge getEdge()
public CyRow getRow()
public String getIdentifier()
public String toString()
public int compareTo(LayoutEdge edgeView)
compareTo
in interface Comparable<LayoutEdge>
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.