public abstract class mxGraphLayout extends java.lang.Object implements mxIGraphLayout
Modifier and Type | Field and Description |
---|---|
protected mxGraph |
graph
Holds the enclosing graph.
|
protected java.lang.Object |
parent
The parent cell of the layout, if any
|
protected boolean |
useBoundingBox
Boolean indicating if the bounding box of the label should be used if
its available.
|
Constructor and Description |
---|
mxGraphLayout(mxGraph graph)
Constructs a new fast organic layout for the specified graph.
|
Modifier and Type | Method and Description |
---|---|
void |
arrangeGroups(java.lang.Object[] groups,
int border)
Updates the bounds of the given groups to include all children.
|
void |
execute(java.lang.Object parent)
Executes the layout for the children of the specified parent.
|
java.lang.Object |
getConstraint(java.lang.Object key,
java.lang.Object cell)
Returns the constraint for the given key and cell.
|
java.lang.Object |
getConstraint(java.lang.Object key,
java.lang.Object cell,
java.lang.Object edge,
boolean source)
Returns the constraint for the given key and cell.
|
mxGraph |
getGraph()
Returns the associated graph.
|
mxPoint |
getParentOffset(java.lang.Object parent) |
mxRectangle |
getVertexBounds(java.lang.Object vertex)
Returns an
|
boolean |
isEdgeIgnored(java.lang.Object edge)
Returns true if the given edge has no source or target terminal.
|
boolean |
isUseBoundingBox() |
boolean |
isVertexIgnored(java.lang.Object vertex)
Returns true if the given vertex has no connected edges.
|
boolean |
isVertexMovable(java.lang.Object vertex)
Returns true if the given vertex may be moved by the layout.
|
void |
moveCell(java.lang.Object cell,
double x,
double y)
Notified when a cell is being moved in a parent that has automatic
layout to update the cell state (eg.
|
void |
setEdgePoints(java.lang.Object edge,
java.util.List<mxPoint> points)
Sets the control points of the given edge to the given
list of mxPoints.
|
void |
setEdgeStyleEnabled(java.lang.Object edge,
boolean value)
Disables or enables the edge style of the given edge.
|
void |
setOrthogonalEdge(java.lang.Object edge,
boolean value)
Disables or enables orthogonal end segments of the given edge
|
void |
setUseBoundingBox(boolean useBoundingBox) |
mxRectangle |
setVertexLocation(java.lang.Object vertex,
double x,
double y)
Sets the new position of the given cell taking into account the size of
the bounding box if
|
protected mxGraph graph
protected java.lang.Object parent
protected boolean useBoundingBox
public mxGraphLayout(mxGraph graph)
public void execute(java.lang.Object parent)
mxIGraphLayout
execute
in interface mxIGraphLayout
parent
- Parent cell that contains the children to be layed out.public void moveCell(java.lang.Object cell, double x, double y)
mxIGraphLayout
moveCell
in interface mxIGraphLayout
cell
- Cell which is being moved.x
- X-coordinate of the new cell location.y
- Y-coordinate of the new cell location.public mxGraph getGraph()
public java.lang.Object getConstraint(java.lang.Object key, java.lang.Object cell)
key
- Key of the constraint to be returned.cell
- Cell whose constraint should be returned.public java.lang.Object getConstraint(java.lang.Object key, java.lang.Object cell, java.lang.Object edge, boolean source)
key
- Key of the constraint to be returned.cell
- Cell whose constraint should be returned.edge
- Optional cell that represents the connection whose constraint
should be returned. Default is null.source
- Optional boolean that specifies if the connection is incoming
or outgoing. Default is false.public boolean isUseBoundingBox()
public void setUseBoundingBox(boolean useBoundingBox)
useBoundingBox
- the useBoundingBox to setpublic boolean isVertexMovable(java.lang.Object vertex)
vertex
- Object that represents the vertex to be tested.public boolean isVertexIgnored(java.lang.Object vertex)
vertex
- Object that represents the vertex to be tested.public boolean isEdgeIgnored(java.lang.Object edge)
edge
- Object that represents the edge to be tested.public void setEdgeStyleEnabled(java.lang.Object edge, boolean value)
public void setOrthogonalEdge(java.lang.Object edge, boolean value)
public mxPoint getParentOffset(java.lang.Object parent)
public void setEdgePoints(java.lang.Object edge, java.util.List<mxPoint> points)
public mxRectangle getVertexBounds(java.lang.Object vertex)
public mxRectangle setVertexLocation(java.lang.Object vertex, double x, double y)
public void arrangeGroups(java.lang.Object[] groups, int border)
groups
- the groups to adjustborder
- the border applied to the adjusted groupsCopyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.