/** * */ protected mxRectangle verticalLayout(TreeNode node, Object parent, double x0, double y0, mxRectangle bounds) { node.x += x0 + node.offsetY; node.y += y0 + node.offsetX; bounds = apply(node, bounds); TreeNode child = node.child; if (child != null) { bounds = verticalLayout(child, node, node.x, node.y, bounds); double siblingOffset = node.x + child.offsetY; TreeNode s = child.next; while (s != null) { bounds = verticalLayout(s, node, siblingOffset, node.y + child.offsetX, bounds); siblingOffset += s.offsetY; s = s.next; } } return bounds; }
/** * */ protected mxRectangle verticalLayout(TreeNode node, Object parent, double x0, double y0, mxRectangle bounds) { node.x += x0 + node.offsetY; node.y += y0 + node.offsetX; bounds = apply(node, bounds); TreeNode child = node.child; if (child != null) { bounds = verticalLayout(child, node, node.x, node.y, bounds); double siblingOffset = node.x + child.offsetY; TreeNode s = child.next; while (s != null) { bounds = verticalLayout(s, node, siblingOffset, node.y + child.offsetX, bounds); siblingOffset += s.offsetY; s = s.next; } } return bounds; }
bounds = verticalLayout(node, null, x0, y0, null);
bounds = verticalLayout(node, null, x0, y0, null);