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