Package com.mxgraph.layout
Class mxStackLayout
java.lang.Object
com.mxgraph.layout.mxGraphLayout
com.mxgraph.layout.mxStackLayout
- All Implemented Interfaces:
mxIGraphLayout
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intBorder to be added if fill is true.protected booleanBoolean indicating if dimension should be changed to fill out the parent cell.protected booleanSpecifies the orientation of the layout.protected booleanIf the parent should be resized to match the width/height of the stack.protected intSpecifies the spacing between the cells.protected intValue at which a new column or row should be created.protected intSpecifies the horizontal origin of the layout.protected intSpecifies the vertical origin of the layout.Fields inherited from class com.mxgraph.layout.mxGraphLayout
graph, parent, useBoundingBox -
Constructor Summary
ConstructorsConstructorDescriptionmxStackLayout(mxGraph graph) Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.mxStackLayout(mxGraph graph, boolean horizontal) Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.mxStackLayout(mxGraph graph, boolean horizontal, int spacing) Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.mxStackLayout(mxGraph graph, boolean horizontal, int spacing, int x0, int y0, int border) Constructs a new stack layout layout for the specified graph, spacing, orientation and offset. -
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes the layout for the children of the specified parent.Hook for subclassers to return the container size.booleanvoidNotified when a cell is being moved in a parent that has automatic layout to update the cell state (eg.Methods inherited from class com.mxgraph.layout.mxGraphLayout
arrangeGroups, getConstraint, getConstraint, getGraph, getParentOffset, getVertexBounds, isEdgeIgnored, isUseBoundingBox, isVertexIgnored, isVertexMovable, setEdgePoints, setEdgeStyleEnabled, setOrthogonalEdge, setUseBoundingBox, setVertexLocation
-
Field Details
-
horizontal
protected boolean horizontalSpecifies the orientation of the layout. Default is true. -
spacing
protected int spacingSpecifies the spacing between the cells. Default is 0. -
x0
protected int x0Specifies the horizontal origin of the layout. Default is 0. -
y0
protected int y0Specifies the vertical origin of the layout. Default is 0. -
border
protected int borderBorder to be added if fill is true. Default is 0. -
fill
protected boolean fillBoolean indicating if dimension should be changed to fill out the parent cell. Default is false. -
resizeParent
protected boolean resizeParentIf the parent should be resized to match the width/height of the stack. Default is false. -
wrap
protected int wrapValue at which a new column or row should be created. Default is 0.
-
-
Constructor Details
-
mxStackLayout
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset. -
mxStackLayout
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset. -
mxStackLayout
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset. -
mxStackLayout
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
-
-
Method Details
-
isHorizontal
public boolean isHorizontal() -
moveCell
Description copied from interface:mxIGraphLayoutNotified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. index) so that the outcome of the layout will position the vertex as close to the point (x, y) as possible.- Specified by:
moveCellin interfacemxIGraphLayout- Overrides:
moveCellin classmxGraphLayout- Parameters:
cell- Cell which is being moved.x- X-coordinate of the new cell location.y- Y-coordinate of the new cell location.
-
getContainerSize
Hook for subclassers to return the container size. -
execute
Description copied from interface:mxIGraphLayoutExecutes the layout for the children of the specified parent.- Specified by:
executein interfacemxIGraphLayout- Overrides:
executein classmxGraphLayout- Parameters:
parent- Parent cell that contains the children to be layed out.
-