public void adjust() {
    List children;

    try {
      children = this.tree.getChildren(parentNode);
    } catch (GraphException ex) {
      ex.printStackTrace();
      return;
    }

    // Find the child that that is immediately to the right and to the left
    // of the inserted column
    VisualVertex immediateRightChild = null, immediateLeftChild = null;
    int immediateRightChildX = grid.getWidth();
    int immediateLeftChildX = 0;

    for (int i = 0; i < children.size(); i++) {
      VisualVertex vVertex;
      vVertex = this.vGraph.getVisualVertex(children.get(i));
      Point vertexPoint = grid.findVisualVertex(vVertex);
      if (vertexPoint.x > insertedColumnX
          && (immediateRightChild == null || vertexPoint.x < immediateRightChildX)) {
        immediateRightChild = vVertex;
        immediateRightChildX = vertexPoint.x;
      }
      if (vertexPoint.x < insertedColumnX
          && (immediateLeftChild == null || vertexPoint.x > immediateLeftChildX)) {
        immediateLeftChild = vVertex;
        immediateLeftChildX = vertexPoint.x;
      }
    }

    // Move the granchild nodes to the right
    // whose parent is immediately to the right of the inserted colunm grid
    // but itself is to the left of the inserted column grid
    if (immediateRightChild != null) {
      this.adjustToRight = true;
      this.visit(immediateRightChild.getVertex());
    }

    // Move the granchild nodes to the left
    // whose parent is immediately to the left of the inserted colunm grid
    // but itself is to the right of the inserted column grid
    if (immediateLeftChild != null) {
      this.adjustToRight = false;
      this.visit(immediateLeftChild.getVertex());
    }
  }