Class mxStackLayout

java.lang.Object
com.mxgraph.layout.mxGraphLayout
com.mxgraph.layout.mxStackLayout
All Implemented Interfaces:
mxIGraphLayout

public class mxStackLayout extends mxGraphLayout
  • Field Details

    • horizontal

      protected boolean horizontal
      Specifies the orientation of the layout. Default is true.
    • spacing

      protected int spacing
      Specifies the spacing between the cells. Default is 0.
    • x0

      protected int x0
      Specifies the horizontal origin of the layout. Default is 0.
    • y0

      protected int y0
      Specifies the vertical origin of the layout. Default is 0.
    • border

      protected int border
      Border to be added if fill is true. Default is 0.
    • fill

      protected boolean fill
      Boolean indicating if dimension should be changed to fill out the parent cell. Default is false.
    • resizeParent

      protected boolean resizeParent
      If the parent should be resized to match the width/height of the stack. Default is false.
    • wrap

      protected int wrap
      Value at which a new column or row should be created. Default is 0.
  • Constructor Details

    • mxStackLayout

      public mxStackLayout(mxGraph graph)
      Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
    • mxStackLayout

      public mxStackLayout(mxGraph graph, boolean horizontal)
      Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
    • mxStackLayout

      public mxStackLayout(mxGraph graph, boolean horizontal, int spacing)
      Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
    • mxStackLayout

      public 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 Details

    • isHorizontal

      public boolean isHorizontal()
    • moveCell

      public void moveCell(Object cell, double x, double y)
      Description copied from interface: mxIGraphLayout
      Notified 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:
      moveCell in interface mxIGraphLayout
      Overrides:
      moveCell in class mxGraphLayout
      Parameters:
      cell - Cell which is being moved.
      x - X-coordinate of the new cell location.
      y - Y-coordinate of the new cell location.
    • getContainerSize

      public mxRectangle getContainerSize()
      Hook for subclassers to return the container size.
    • execute

      public void execute(Object parent)
      Description copied from interface: mxIGraphLayout
      Executes the layout for the children of the specified parent.
      Specified by:
      execute in interface mxIGraphLayout
      Overrides:
      execute in class mxGraphLayout
      Parameters:
      parent - Parent cell that contains the children to be layed out.