Package com.mxgraph.layout
Class mxOrganicLayout.CellWrapper
- java.lang.Object
-
- com.mxgraph.layout.mxOrganicLayout.CellWrapper
-
- Enclosing class:
- mxOrganicLayout
public class mxOrganicLayout.CellWrapper extends java.lang.Object
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
Fields Modifier and Type Field Description protected java.lang.Object
cell
The actual graph cell this wrapper representsprotected int[]
connectedEdges
the index of all connected edges in thee
array to this node.protected double
heightSquared
The height of the node squared, only used if approxNodeDimensions is set to true.protected double
radiusSquared
The approximate radius squared of this cell, nodes only.protected int[]
relevantEdges
All edge that repel this cell, only used for nodes.protected int
source
The index of the node attached to this edge as source, edges onlyprotected int
target
The index of the node attached to this edge as target, edges onlyprotected double
x
The x-coordinate position of this cell, nodes onlyprotected double
y
The y-coordinate position of this cell, nodes only
-
Constructor Summary
Constructors Constructor Description CellWrapper(java.lang.Object cell)
Constructs a new CellWrapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getCell()
int[]
getConnectedEdges()
double
getHeightSquared()
double
getRadiusSquared()
int[]
getRelevantEdges()
int
getSource()
int
getTarget()
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 Detail
-
cell
protected java.lang.Object cell
The actual graph cell this wrapper represents
-
relevantEdges
protected int[] relevantEdges
All edge that repel this cell, only used for nodes. This array is equivalent to all edges unconnected to this node
-
connectedEdges
protected int[] connectedEdges
the index of all connected edges in thee
array to this node. This is only used for nodes.
-
x
protected double x
The x-coordinate position of this cell, nodes only
-
y
protected double y
The y-coordinate position of this cell, nodes only
-
radiusSquared
protected double radiusSquared
The 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 heightSquared
The height of the node squared, only used if approxNodeDimensions is set to true.
-
source
protected int source
The index of the node attached to this edge as source, edges only
-
target
protected int target
The index of the node attached to this edge as target, edges only
-
-
Method Detail
-
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
public java.lang.Object getCell()
- Returns:
- the cell
-
-