code: private boolean shouldDisplayTooltipAbove() {
  
          boolean displayAbove;
          if (isSimpleValue()) {
              Direction direction = Direction.none;
              if (m_widget instanceof I_CmsHasDisplayDirection) {
                  direction = ((I_CmsHasDisplayDirection)m_widget).getDisplayingDirection();
              }
              switch (direction) {
                  case above:
                      displayAbove = true;
                      break;
                  case below:
                  case none:
                  default:
                      displayAbove = true;
                      break;
              }
          } else {
              displayAbove = true;
          }
  
          m_helpBubble.getStyle().setDisplay(Display.BLOCK);
          int bubbleHeight = m_helpBubble.getOffsetHeight();
          m_helpBubble.getStyle().clearDisplay();
  
          Element widgetElement = m_widget.asWidget().getElement();
          // Calculate top position for the popup
          int top = widgetElement.getAbsoluteTop();
  
          int windowTop = Window.getScrollTop();
          int windowBottom = Window.getScrollTop() + Window.getClientHeight();
          CmsDebugLog.consoleLog("window bottom: " + windowBottom + "    window height: " + Window.getClientHeight());
  
          int distanceFromWindowTop = top - windowTop - TOOLBAR_HEIGHT;
  
          int distanceToWindowBottom = windowBottom - (top + widgetElement.getOffsetHeight());
          if (displayAbove
              && ((distanceFromWindowTop < bubbleHeight) && (distanceToWindowBottom > distanceFromWindowTop))) {
              // in case there is too little space above, and there is more below, change direction
              displayAbove = false;
          } else if (!displayAbove
              && ((distanceToWindowBottom < bubbleHeight) && (distanceFromWindowTop > distanceToWindowBottom))) {
              // in case there is too little space below, and there is more above, change direction
              displayAbove = true;
          }
          return displayAbove;
      }
docs: Returns if the help bubble should be displayed above the value field.<p>
  
  @return <code>true</code> if the help bubble should be displayed above