Package com.mxgraph.layout
Class mxOrganicLayout.CellWrapper
java.lang.Object
com.mxgraph.layout.mxOrganicLayout.CellWrapper
- Enclosing class:
mxOrganicLayout
Internal representation of a node or edge that holds cached information
to enable the layout to perform more quickly and to simplify the code
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
The actual graph cell this wrapper representsprotected int[]
the index of all connected edges in thee
array to this node.protected double
The height of the node squared, only used if approxNodeDimensions is set to true.protected double
The approximate radius squared of this cell, nodes only.protected int[]
All edge that repel this cell, only used for nodes.protected int
The index of the node attached to this edge as source, edges onlyprotected int
The index of the node attached to this edge as target, edges onlyprotected double
The x-coordinate position of this cell, nodes onlyprotected double
The y-coordinate position of this cell, nodes only -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCell()
int[]
double
double
int[]
int
int
double
getX()
double
getY()
void
setConnectedEdges
(int[] connectedEdges) void
setHeightSquared
(double heightSquared) void
setRadiusSquared
(double radiusSquared) void
setRelevantEdges
(int[] relevantEdges) void
setSource
(int source) void
setTarget
(int target) void
setX
(double x) void
setY
(double y)
-
Field Details
-
cell
The actual graph cell this wrapper represents -
relevantEdges
protected int[] relevantEdgesAll edge that repel this cell, only used for nodes. This array is equivalent to all edges unconnected to this node -
connectedEdges
protected int[] connectedEdgesthe index of all connected edges in thee
array to this node. This is only used for nodes. -
x
protected double xThe x-coordinate position of this cell, nodes only -
y
protected double yThe y-coordinate position of this cell, nodes only -
radiusSquared
protected double radiusSquaredThe approximate radius squared of this cell, nodes only. If approxNodeDimensions is true on the layout this value holds the width of the node squared -
heightSquared
protected double heightSquaredThe height of the node squared, only used if approxNodeDimensions is set to true. -
source
protected int sourceThe index of the node attached to this edge as source, edges only -
target
protected int targetThe index of the node attached to this edge as target, edges only
-
-
Constructor Details
-
CellWrapper
Constructs a new CellWrapper- Parameters:
cell
- the graph cell this wrapper represents
-
-
Method Details
-
getRelevantEdges
public int[] getRelevantEdges()- Returns:
- the relevantEdges
-
setRelevantEdges
public void setRelevantEdges(int[] relevantEdges) - Parameters:
relevantEdges
- the relevantEdges to set
-
getConnectedEdges
public int[] getConnectedEdges()- Returns:
- the connectedEdges
-
setConnectedEdges
public void setConnectedEdges(int[] connectedEdges) - Parameters:
connectedEdges
- the connectedEdges to set
-
getX
public double getX()- Returns:
- the x
-
setX
public void setX(double x) - Parameters:
x
- the x to set
-
getY
public double getY()- Returns:
- the y
-
setY
public void setY(double y) - Parameters:
y
- the y to set
-
getRadiusSquared
public double getRadiusSquared()- Returns:
- the radiusSquared
-
setRadiusSquared
public void setRadiusSquared(double radiusSquared) - Parameters:
radiusSquared
- the radiusSquared to set
-
getHeightSquared
public double getHeightSquared()- Returns:
- the heightSquared
-
setHeightSquared
public void setHeightSquared(double heightSquared) - Parameters:
heightSquared
- the heightSquared to set
-
getSource
public int getSource()- Returns:
- the source
-
setSource
public void setSource(int source) - Parameters:
source
- the source to set
-
getTarget
public int getTarget()- Returns:
- the target
-
setTarget
public void setTarget(int target) - Parameters:
target
- the target to set
-
getCell
- Returns:
- the cell
-