int counter = 0;
int zoneWidth = node.getMetaInfo().getTreeSize().getWidth() / node.getChildren().size();
int zoneHeight = node.getMetaInfo().getTreeSize().getHeight() / node.getChildren().size();
for (Node<Node<T>> n : node.getChildren()) {
NodeMetaInfo<Node<T>> child = (NodeMetaInfo<Node<T>>) n;
TreeSize treeSize = new TreeSize();
if (vertical){
child.setX(node.getX() + counter * zoneWidth);
child.setY(node.getY());
treeSize.setHeight(node.getMetaInfo().getTreeSize().getHeight());
treeSize.setWidth(zoneWidth);
} else {
child.setY(node.getY() + counter * zoneHeight);
child.setX(node.getX());
treeSize.setHeight(zoneHeight);
treeSize.setWidth(node.getMetaInfo().getTreeSize().getWidth());
}
if (counter == 0 || vertical){
child.setY(child.getY() + 15);
treeSize.setHeight(treeSize.getHeight() - 15);
}
child.getMetaInfo().setTreeSize(treeSize);
initSizes(child, !vertical);
counter++;
}