public void recalculateOrigin() {
    int xBasis = NodeDrawConfig.isVertical() ? getIndex() : getDepth();
    int yBasis = NodeDrawConfig.isVertical() ? getDepth() : getIndex();

    originX =
        ((xBasis + 1) * NodeDrawConfig.getHorizontalNodeSpacing())
            + (xBasis * (NodeDrawConfig.getMaxNodeRadius() << 1))
            + NodeDrawConfig.getMaxNodeRadius();

    originY =
        ((yBasis) * NodeDrawConfig.getVerticalNodeSpacing())
            + (yBasis * (NodeDrawConfig.getMaxNodeRadius() << 1))
            + NodeDrawConfig.getMaxNodeRadius();
  }
 public int getOffset() {
   return NodeDrawConfig.getMaxNodeRadius() >> 1;
 }