Ejemplo n.º 1
0
 @Nullable
 private Rectangle getHintBounds() {
   LightweightHint hint = myHint;
   if (hint == null) {
     return null;
   }
   JComponent hintComponent = hint.getComponent();
   if (!hintComponent.isShowing()) {
     return null;
   }
   return new Rectangle(hintComponent.getLocationOnScreen(), hintComponent.getSize());
 }
Ejemplo n.º 2
0
  /**
   * Show the window.
   *
   * @param container - Window of JFrame to show
   */
  private void showPopup(Window container) {
    if (visibleComponent.isEnabled()) {
      Point pt = visibleComponent.getLocationOnScreen();
      pt.translate(0, visibleComponent.getHeight());
      container.setLocation(pt);
      container.toFront();

      ApplicationManager.setCurrentlySelectedField(fieldName);
      if (container instanceof OntologySelector) {
        ((OntologySelector) container).makeVisible();
      } else {
        container.setVisible(true);
        container.requestFocusInWindow();
      }
    }
  }