Package javax.swing

Examples of javax.swing.JPopupMenu.show()


      }
      popup.add(filterMenuItem);
    }

    popup.show(this, 0, getHeight());
  }

  public void updateText() {
    logger.info("updateText()");
    Outcome requirement = _jobBuilder.getRequirement();
View Full Code Here


        if (_rightClickMenuItems != null && _rightClickMenuItems.size() > 0) {
          JPopupMenu popup = new JPopupMenu();
          for (JMenuItem item : _rightClickMenuItems) {
            popup.add(item);
          }
          popup.show(e.getComponent(), e.getX(), e.getY());
          return;
        }
      }
    }
  }
View Full Code Here

        });

        final JPopupMenu popup = new JPopupMenu("Add extension");
        popup.add(extensionSwapMenuItem);
        popup.add(manualInstallMenuItem);
        popup.show(addExtensionButton, 0, addExtensionButton.getHeight());
      }
    });

    final JToolBar toolBar = WidgetFactory.createToolBar();
    toolBar.add(WidgetFactory.createToolBarSeparator());
View Full Code Here

          public void mouseReleased(MouseEvent e) {
            showPopup(e);
          }
          private void showPopup(MouseEvent e) {
            Component comp = e.getComponent();
            sortPopupMenu.show(comp, 0, comp.getSize().height);
          }
        });

      return sortButton;
    }
View Full Code Here

      int index = BuddyPanel.this.locationToIndex(e.getPoint());
      Object obj = BuddyPanel.this.getModel().getElementAt(index);
      if (obj instanceof Buddy) {
        Buddy buddy = (Buddy) obj;
        final JPopupMenu popup = new BuddyLabelPopMenu(buddy.getName(), buddy.isOnline());
        popup.show(e.getComponent(), e.getX() - POPUP_OFFSET, e.getY() - POPUP_OFFSET);
      }
    }
  }
}
View Full Code Here

          clear();
        }
      });
      popup.add(menuItem);

      popup.show(e.getComponent(), e.getX(), e.getY());
    }
  }
 

  /**
 
View Full Code Here

      if (actions.length > 0) {
        final IEntity entity = view.getEntity();

        JPopupMenu menu = new EntityViewCommandList(entity.getType(), actions, view);
        menu.show(canvas, point.x - MENU_OFFSET, point.y - MENU_OFFSET);
        contextMenuFlag = true;
        /*
         * Tricky way to detect recent popup menues. We need the
         * information to prevent walking when hiding the menu.
         */
 
View Full Code Here

      this.button = button;
    }
   
    public void actionPerformed(ActionEvent e) {
      JPopupMenu menu = button.getComponentPopupMenu();
      menu.show(button, 0, button.getHeight());
    }
  }
}
View Full Code Here

     
      item = new JMenuItem("Single");
      item.addActionListener(new LootmodeActionListener("single"));
      popup.add(item);
     
      popup.show(header, e.getX() - POPUP_OFFSET, e.getY() - POPUP_OFFSET);
    }
  }
 
  private class MemberListMouseListener extends MousePopupAdapter {
    @Override
View Full Code Here

      // no menu for the player herself
      if ((obj instanceof Member) && (obj != me)) {
        Member member = (Member) obj;
        final JPopupMenu popup = new MemberPopupMenu(member.getName());
        popup.show(memberListComponent, e.getX() - POPUP_OFFSET, e.getY() - POPUP_OFFSET);
      }
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.