public void showPopupAbove(Point loc, GraphControllerPopupListener graphControllerPopupListener) {
   if (_popUp.isVisible()) {
     _popUp.setVisible(false);
   } else {
     _popUp.show(_desktopPane, 0, 0);
     _popUp.setLocation(loc.x, loc.y - _popUp.getHeight());
   }
   _currentGraphControllerPopupListener = graphControllerPopupListener;
 }
Пример #2
0
 /** Shows popup menu if button was pressed. */
 private void buttonMousePressed(java.awt.event.MouseEvent evt) {
   this.setComponentPopupMenu(popUpMenu);
   if (popUpMenu != null) {
     popUpMenu.show(this, 0, this.getHeight());
     int width = this.getWidth();
     if (width < popUpMenu.getWidth()) {
       width = popUpMenu.getWidth();
     }
     popUpMenu.setPopupSize(width, popUpMenu.getHeight());
   }
 }
Пример #3
0
  /** Show the status popup menu over this status button */
  private void showStatusMenu() {
    if (statusMenu.isVisible()) {
      return;
    }
    currentParent = StatusButton.this;
    txtStatus.setText(message);

    if (heightInvalid) {
      statusMenu.show(currentParent, 0, 0);
      statusMenu.setVisible(false);
      heightInvalid = false;
    }
    statusMenu.show(currentParent, 0, 0 - statusMenu.getHeight());
  }
  public void showMenu() {
    if (LOCATION == BELOW) {
      setPopupLocation(main.getX() - main.getWidth(), main.getY() + getHeight());
    } else if (LOCATION == ABOVE) {
      setPopupLocation(main.getX() - main.getWidth(), main.getY() - menu.getHeight());
    }

    if (getPopperButtonLocation() == RIGHT) {
      if (getPopperButtonLocation() == RIGHT) {
        tempPopArrowDir = getPopperArrowDirection();
      }

      setPopperArrowDirection(DOWN);
    }

    menu.show(popper, getPopupX(), getPopupY());
  }