| 
 | JGraph X 2.1.0.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.layout.mxGraphLayout
com.mxgraph.layout.mxCompactTreeLayout
public class mxCompactTreeLayout
| Nested Class Summary | |
|---|---|
| protected static class | mxCompactTreeLayout.Polygon | 
| protected static class | mxCompactTreeLayout.Polyline | 
| protected static class | mxCompactTreeLayout.TreeNode | 
| protected  class | mxCompactTreeLayout.WeightedCellSorterA utility class used to track cells whilst sorting occurs on the weighted sum of their connected edges. | 
| Field Summary | |
|---|---|
| protected  int | channelBufferThe size of the vertical buffer in the center of inter-rank channels where edge control points should not be placed | 
| protected  boolean | edgeRoutingWhether or not to apply the internal tree edge routing | 
| protected  int | groupPaddingPadding added to resized parents | 
| protected  boolean | horizontalSpecifies the orientation of the layout. | 
| protected  boolean | invertSpecifies if edge directions should be inverted. | 
| protected  int | levelDistanceHolds the levelDistance. | 
| protected  int | minEdgeJettyThe minimum distance for an edge jetty from a vertex | 
| protected  boolean | moveTreeSpecifies if the tree should be moved to the top, left corner if it is inside a top-level layer. | 
| protected  int | nodeDistanceHolds the nodeDistance. | 
| protected  Set<Object> | parentsChangedA set of the parents that need updating based on children process as part of the layout | 
| protected  int | prefHozEdgeSepThe preferred horizontal distance between edges exiting a vertex | 
| protected  int | prefVertEdgeOffThe preferred vertical offset between edges exiting a vertex | 
| protected  boolean | resetEdgesSpecifies if all edge points of traversed edges should be removed. | 
| protected  boolean | resizeParentIf the parents should be resized to match the width/height of the children. | 
| Fields inherited from class com.mxgraph.layout.mxGraphLayout | 
|---|
| graph, parent, useBoundingBox | 
| Constructor Summary | |
|---|---|
| mxCompactTreeLayout(mxGraph graph) | |
| mxCompactTreeLayout(mxGraph graph,
                    boolean horizontal) | |
| mxCompactTreeLayout(mxGraph graph,
                    boolean horizontal,
                    boolean invert) | |
| Method Summary | |
|---|---|
| protected  void | adjustParents()Adjust parent cells whose child geometries have changed. | 
| protected  mxRectangle | apply(mxCompactTreeLayout.TreeNode node,
      mxRectangle bounds) | 
| protected  void | attachParent(mxCompactTreeLayout.TreeNode node,
             double height) | 
| protected  mxCompactTreeLayout.Polyline | bridge(mxCompactTreeLayout.Polyline line1,
       double x1,
       double y1,
       mxCompactTreeLayout.Polyline line2,
       double x2,
       double y2) | 
| protected  mxCompactTreeLayout.Polyline | createLine(double dx,
           double dy,
           mxCompactTreeLayout.Polyline next) | 
| protected  mxCompactTreeLayout.TreeNode | createNode(Object cell) | 
| protected  mxCompactTreeLayout.TreeNode | dfs(Object cell,
    Object parent,
    Set<Object> visited)Does a depth first search starting at the specified cell. | 
|  void | execute(Object parent)Executes the layout for the children of the specified parent. | 
|  void | execute(Object parent,
        Object root)Implements | 
|  List<Object> | findTreeRoots(Object parent,
              boolean invert)Returns all visible children in the given parent which do not have incoming edges. | 
|  double | getGroupPadding() | 
|  int | getLevelDistance() | 
|  int | getNodeDistance() | 
| protected  mxRectangle | horizontalLayout(mxCompactTreeLayout.TreeNode node,
                 double x0,
                 double y0,
                 mxRectangle bounds) | 
|  boolean | isEdgeRouting() | 
|  boolean | isHorizontal() | 
|  boolean | isInvert() | 
|  boolean | isMoveTree() | 
|  boolean | isResetEdges() | 
|  boolean | isResizeParent() | 
|  boolean | isVertexIgnored(Object vertex)Returns a boolean indicating if the given | 
| protected  double | join(mxCompactTreeLayout.TreeNode node) | 
| protected  void | layout(mxCompactTreeLayout.TreeNode node)Starts the actual compact tree layout algorithm at the given node. | 
| protected  void | layoutLeaf(mxCompactTreeLayout.TreeNode node) | 
| protected  void | localEdgeProcessing(mxCompactTreeLayout.TreeNode node)Moves the specified node and all of its children by the given amount. | 
| protected  double | merge(mxCompactTreeLayout.Polygon p1,
      mxCompactTreeLayout.Polygon p2) | 
| protected  void | moveNode(mxCompactTreeLayout.TreeNode node,
         double dx,
         double dy)Moves the specified node and all of its children by the given amount. | 
| protected  double | offset(double p1,
       double p2,
       double a1,
       double a2,
       double b1,
       double b2) | 
| protected  void | processNodeOutgoing(mxCompactTreeLayout.TreeNode node)Separates the x position of edges as they connect to vertices | 
|  void | setEdgeRouting(boolean edgeRouting) | 
|  void | setGroupPadding(int groupPadding) | 
|  void | setHorizontal(boolean horizontal) | 
|  void | setInvert(boolean invert) | 
|  void | setLevelDistance(int levelDistance) | 
|  void | setMoveTree(boolean moveTree) | 
|  void | setNodeDistance(int nodeDistance) | 
|  void | setResetEdges(boolean resetEdges) | 
|  void | setResizeParent(boolean resizeParent) | 
| protected  mxRectangle | verticalLayout(mxCompactTreeLayout.TreeNode node,
               Object parent,
               double x0,
               double y0,
               mxRectangle bounds) | 
| Methods inherited from class com.mxgraph.layout.mxGraphLayout | 
|---|
| arrangeGroups, getConstraint, getConstraint, getGraph, getParentOffset, getVertexBounds, isEdgeIgnored, isUseBoundingBox, isVertexMovable, moveCell, setEdgePoints, setEdgeStyleEnabled, setOrthogonalEdge, setUseBoundingBox, setVertexLocation | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean horizontal
protected boolean invert
protected boolean resizeParent
protected int groupPadding
protected Set<Object> parentsChanged
protected boolean moveTree
protected boolean resetEdges
protected int levelDistance
protected int nodeDistance
protected int prefHozEdgeSep
protected int prefVertEdgeOff
protected int minEdgeJetty
protected int channelBuffer
protected boolean edgeRouting
| Constructor Detail | 
|---|
public mxCompactTreeLayout(mxGraph graph)
graph - 
public mxCompactTreeLayout(mxGraph graph,
                           boolean horizontal)
graph - horizontal - 
public mxCompactTreeLayout(mxGraph graph,
                           boolean horizontal,
                           boolean invert)
graph - horizontal - invert - | Method Detail | 
|---|
public boolean isVertexIgnored(Object vertex)
isVertexIgnored in class mxGraphLayoutvertex - Object that represents the vertex to be tested.
public boolean isHorizontal()
public void setHorizontal(boolean horizontal)
horizontal - the horizontal to setpublic boolean isInvert()
public void setInvert(boolean invert)
invert - the invert to setpublic boolean isResizeParent()
public void setResizeParent(boolean resizeParent)
resizeParent - the resizeParent to setpublic boolean isMoveTree()
public void setMoveTree(boolean moveTree)
moveTree - the moveTree to setpublic boolean isResetEdges()
public void setResetEdges(boolean resetEdges)
resetEdges - the resetEdges to setpublic boolean isEdgeRouting()
public void setEdgeRouting(boolean edgeRouting)
public int getLevelDistance()
public void setLevelDistance(int levelDistance)
levelDistance - the levelDistance to setpublic int getNodeDistance()
public void setNodeDistance(int nodeDistance)
nodeDistance - the nodeDistance to setpublic double getGroupPadding()
public void setGroupPadding(int groupPadding)
public void execute(Object parent)
mxIGraphLayout
execute in interface mxIGraphLayoutexecute in class mxGraphLayoutparent - Parent cell that contains the children to be layed out.
public void execute(Object parent,
                    Object root)
public List<Object> findTreeRoots(Object parent,
                                  boolean invert)
parent - Cell whose children should be checked.invert - Specifies if outgoing or incoming edges should be counted
 for a tree root. If false then outgoing edges will be counted.
protected void moveNode(mxCompactTreeLayout.TreeNode node,
                        double dx,
                        double dy)
protected mxCompactTreeLayout.TreeNode dfs(Object cell,
                                           Object parent,
                                           Set<Object> visited)
protected void layout(mxCompactTreeLayout.TreeNode node)
protected mxRectangle horizontalLayout(mxCompactTreeLayout.TreeNode node,
                                       double x0,
                                       double y0,
                                       mxRectangle bounds)
protected mxRectangle verticalLayout(mxCompactTreeLayout.TreeNode node,
                                     Object parent,
                                     double x0,
                                     double y0,
                                     mxRectangle bounds)
protected void attachParent(mxCompactTreeLayout.TreeNode node,
                            double height)
protected void layoutLeaf(mxCompactTreeLayout.TreeNode node)
protected double join(mxCompactTreeLayout.TreeNode node)
protected double merge(mxCompactTreeLayout.Polygon p1,
                       mxCompactTreeLayout.Polygon p2)
protected double offset(double p1,
                        double p2,
                        double a1,
                        double a2,
                        double b1,
                        double b2)
protected mxCompactTreeLayout.Polyline bridge(mxCompactTreeLayout.Polyline line1,
                                              double x1,
                                              double y1,
                                              mxCompactTreeLayout.Polyline line2,
                                              double x2,
                                              double y2)
protected mxCompactTreeLayout.TreeNode createNode(Object cell)
protected mxRectangle apply(mxCompactTreeLayout.TreeNode node,
                            mxRectangle bounds)
node - bounds - 
protected mxCompactTreeLayout.Polyline createLine(double dx,
                                                  double dy,
                                                  mxCompactTreeLayout.Polyline next)
protected void adjustParents()
protected void localEdgeProcessing(mxCompactTreeLayout.TreeNode node)
protected void processNodeOutgoing(mxCompactTreeLayout.TreeNode node)
node - the root node of the tree| 
 | JGraph X 2.1.0.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||