public abstract class mxGraphLayout extends Object implements mxIGraphLayout
Modifier and Type | Field and Description |
---|---|
protected mxGraph |
graph
Holds the enclosing graph.
|
protected 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(Object[] groups,
int border)
Updates the bounds of the given groups to include all children.
|
void |
execute(Object parent)
Executes the layout for the children of the specified parent.
|
Object |
getConstraint(Object key,
Object cell)
Returns the constraint for the given key and cell.
|
Object |
getConstraint(Object key,
Object cell,
Object edge,
boolean source)
Returns the constraint for the given key and cell.
|
mxGraph |
getGraph()
Returns the associated graph.
|
mxPoint |
getParentOffset(Object parent) |
mxRectangle |
getVertexBounds(Object vertex)
Returns an
|
boolean |
isEdgeIgnored(Object edge)
Returns true if the given edge has no source or target terminal.
|
boolean |
isUseBoundingBox() |
boolean |
isVertexIgnored(Object vertex)
Returns true if the given vertex has no connected edges.
|
boolean |
isVertexMovable(Object vertex)
Returns true if the given vertex may be moved by the layout.
|
void |
moveCell(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(Object edge,
List<mxPoint> points)
Sets the control points of the given edge to the given
list of mxPoints.
|
void |
setEdgeStyleEnabled(Object edge,
boolean value)
Disables or enables the edge style of the given edge.
|
void |
setOrthogonalEdge(Object edge,
boolean value)
Disables or enables orthogonal end segments of the given edge
|
void |
setUseBoundingBox(boolean useBoundingBox) |
mxRectangle |
setVertexLocation(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 Object parent
protected boolean useBoundingBox
public mxGraphLayout(mxGraph graph)
public void execute(Object parent)
mxIGraphLayout
execute
in interface mxIGraphLayout
parent
- Parent cell that contains the children to be layed out.public void moveCell(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 Object getConstraint(Object key, Object cell)
key
- Key of the constraint to be returned.cell
- Cell whose constraint should be returned.public Object getConstraint(Object key, Object cell, 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(Object vertex)
vertex
- Object that represents the vertex to be tested.public boolean isVertexIgnored(Object vertex)
vertex
- Object that represents the vertex to be tested.public boolean isEdgeIgnored(Object edge)
edge
- Object that represents the edge to be tested.public void setEdgeStyleEnabled(Object edge, boolean value)
public void setOrthogonalEdge(Object edge, boolean value)
public void setEdgePoints(Object edge, List<mxPoint> points)
public mxRectangle getVertexBounds(Object vertex)
public mxRectangle setVertexLocation(Object vertex, double x, double y)
public void arrangeGroups(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.