code: private int mapDirection(boolean isLeft) {
          if (isLeft) {
  
              if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
                  return SwingConstants.WEST;
              }
  
              return SwingConstants.NORTH;
          }
  
          if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
              return SwingConstants.EAST;
          }
  
          return SwingConstants.SOUTH;
      }
docs: Convert the orientation of the pane into compass points based on the pane
  orientation and the left-right orientation of the containter.
  
  @param  isLeft {@code true} if the component's container is laid out
  left-to-right, otherwise {@code false}.
  
  @return the compass direction for increasing the divider.