コード例 #1
0
  public void actionPerformed(ActionEvent evt) {
    // build pop-up window

    if (hideableWindow instanceof OntologySelector) {
      OntologySelector ost = (OntologySelector) hideableWindow;
      ost.updatehistory();
    }

    addListener(hideableWindow);
    showPopup(hideableWindow);
  }
コード例 #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();
      }
    }
  }