add ( )源码实例Demo

javax.swing.JPopupMenu#add ( )源码实例Demo

下面列出了javax.swing.JPopupMenu#add ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: WorldGrower   文件: GuiMouseListener.java
private void addRestActions(JPopupMenu menu, WorldObject worldObject) {
	if (Game.canActionExecute(playerCharacter, Actions.SLEEP_ACTION, Args.EMPTY, world, worldObject)) {
		JMenuItem restMultipleTurnsMenuItem = MenuFactory.createJMenuItem(new GuiRestMultipleTurnsAction(playerCharacter, imageInfoReader, soundIdReader, world, container, dungeonMaster, worldObject, parentFrame), soundIdReader);
		restMultipleTurnsMenuItem.setText("Sleep multiple turns...");
		setMenuIcon(restMultipleTurnsMenuItem, ImageIds.SLEEPING_INDICATOR);
		restMultipleTurnsMenuItem.setToolTipText(Actions.SLEEP_ACTION.getDescription());
		menu.add(restMultipleTurnsMenuItem);
		
		GuiRestUntilRestedAction guiRestUntilRestedAction = new GuiRestUntilRestedAction(playerCharacter, imageInfoReader, soundIdReader, world, container, dungeonMaster, worldObject, parentFrame);
		JMenuItem restUntilRestedMenuItem = MenuFactory.createJMenuItem(guiRestUntilRestedAction, soundIdReader);
		restUntilRestedMenuItem.setText("Sleep " +  guiRestUntilRestedAction.getTurns() + " turns until energy is recovered");
		setMenuIcon(restUntilRestedMenuItem, ImageIds.SLEEPING_INDICATOR);
		restUntilRestedMenuItem.setEnabled(guiRestUntilRestedAction.getTurns() > 0);
		restUntilRestedMenuItem.setToolTipText(Actions.SLEEP_ACTION.getDescription());
		menu.add(restUntilRestedMenuItem);
	}
}
 
源代码2 项目: WorldGrower   文件: GuiMouseListener.java
private void addVoteActions(JPopupMenu menu, WorldObject worldObject) {
	if (canPlayerCharacterPerformAction(worldObject, Actions.VOTE_FOR_LEADER_ACTION)) {
		JMenuItem guiVoteMenuItem = MenuFactory.createJMenuItem(new GuiVoteAction(playerCharacter, imageInfoReader, soundIdReader, world, container, dungeonMaster, worldObject, parentFrame), soundIdReader);
		guiVoteMenuItem.setText("Vote...");
		setMenuIcon(guiVoteMenuItem, Actions.VOTE_FOR_LEADER_ACTION.getImageIds(playerCharacter));
		guiVoteMenuItem.setToolTipText(Actions.VOTE_FOR_LEADER_ACTION.getDescription());
		menu.add(guiVoteMenuItem);
	}
	if (VotingPropertyUtils.isVotingBox(worldObject)) {
		JMenuItem guiViewCandidatesMenuItem = MenuFactory.createJMenuItem(new GuiViewCandidatesAction(playerCharacter, imageInfoReader, soundIdReader, world, container, dungeonMaster, worldObject, parentFrame), soundIdReader);
		guiViewCandidatesMenuItem.setText("View Candidates...");
		setMenuIcon(guiViewCandidatesMenuItem, Actions.VOTE_FOR_LEADER_ACTION.getImageIds(playerCharacter));
		guiViewCandidatesMenuItem.setToolTipText("View list of candidates for the election");
		menu.add(guiViewCandidatesMenuItem);
	}
}
 
源代码3 项目: pcgen   文件: EquipInfoTab.java
@Override
public void showPopup(MouseEvent e)
{
	List<EquipNode> targets = getMenuTargets(equipmentSetTable, e);
	if (targets.isEmpty())
	{
		return;
	}

	JPopupMenu popupMenu = new JPopupMenu();
	popupMenu.add(new MoveEquipUpMenuItem(character, targets));
	popupMenu.add(new MoveEquipDownMenuItem(character, targets));
	popupMenu.addSeparator();
	popupMenu.add(new SortEquipMenuItem(character, targets));
	popupMenu.show(e.getComponent(), e.getX(), e.getY());
}
 
源代码4 项目: rapidminer-studio   文件: DockableResultDisplay.java
public DockableResultDisplay() {
	this.dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
	DockableActionCustomizer customizer = new DockableActionCustomizer() {

		@Override
		public void visitTabSelectorPopUp(JPopupMenu popUpMenu, Dockable dockable) {
			popUpMenu.add(new JMenuItem(new CloseAllResultsAction(RapidMinerGUI.getMainFrame())));
		}
	};
	customizer.setTabSelectorPopUpCustomizer(true); // enable tabbed dock custom popup menu
													 // entries
	this.dockKey.setActionCustomizer(customizer);
	setLayout(new BorderLayout());
	ExtendedJScrollPane overviewScrollpane = new ExtendedJScrollPane(overview);
	overviewScrollpane.setBorder(null);
	overviewScrollpane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
	overviewScrollpane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	add(overviewScrollpane, BorderLayout.CENTER);
	tableUpdateQueue.start();
}
 
源代码5 项目: netbeans   文件: RefactoringPanelContainer.java
/** Creates new form RefactoringPanelContainer */
private RefactoringPanelContainer(String name, boolean isRefactoring) {
    setName(name);
    setToolTipText(name);
    setFocusable(true);
    setLayout(new java.awt.BorderLayout());
    setMinimumSize(new Dimension(1,1));
    getAccessibleContext().setAccessibleDescription(
        NbBundle.getMessage(RefactoringPanelContainer.class, "ACSD_usagesPanel")
    );
    pop = new JPopupMenu();
    pop.add(new Close());
    pop.add(new CloseAll());
    pop.add(new CloseAllButCurrent());
    listener = new PopupListener();
    closeL = new CloseListener();
    this.isRefactoring = isRefactoring;
    setFocusCycleRoot(true);
    JLabel label = new JLabel(NbBundle.getMessage(RefactoringPanelContainer.class, "LBL_NoUsages"));
    label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    label.setEnabled(false);
    this.add(label, BorderLayout.CENTER);
    initActions();
}
 
源代码6 项目: netbeans   文件: ManagedBeanCustomizer.java
private void customizeTemplatesLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_customizeTemplatesLabelMouseClicked
    if (collection) {
        new OpenTemplateAction(this, NbBundle.getMessage(ManagedBeanCustomizer.class, "ManagedBeanCustomizer.tableTemplate"),
                JsfTemplateUtils.getTemplatePath(TemplateType.SNIPPETS, getTemplatesStyle(), TABLE_TEMPLATE)).actionPerformed(null);
    } else {
        JPopupMenu menu = new JPopupMenu();
        String viewTemplatePath = JsfTemplateUtils.getTemplatePath(TemplateType.SNIPPETS, getTemplatesStyle(), VIEW_TEMPLATE);
        String editTemplatePath = JsfTemplateUtils.getTemplatePath(TemplateType.SNIPPETS, getTemplatesStyle(), EDIT_TEMPLATE);
        menu.add(new OpenTemplateAction(this, NbBundle.getMessage(ManagedBeanCustomizer.class, "ManagedBeanCustomizer.allTemplates"), viewTemplatePath, editTemplatePath));
        menu.add(new OpenTemplateAction(this, NbBundle.getMessage(ManagedBeanCustomizer.class, "ManagedBeanCustomizer.viewTemplate"), viewTemplatePath));
        menu.add(new OpenTemplateAction(this, NbBundle.getMessage(ManagedBeanCustomizer.class, "ManagedBeanCustomizer.editTemplate"), editTemplatePath));
        menu.show(customizeTemplatesLabel, evt.getX(), evt.getY());
    }
}
 
源代码7 项目: netbeans   文件: MergeDialogComponent.java
private static JPopupMenu createPopupMenu(MergePanel panel) {
    JPopupMenu popup = new JPopupMenuPlus();
    SystemAction[] actions = panel.getSystemActions();
    for (int i = 0; i < actions.length; i++) {
        if (actions[i] == null) {
            popup.addSeparator();
        } else if (actions[i] instanceof CallableSystemAction) {
            popup.add(((CallableSystemAction)actions[i]).getPopupPresenter());
            //add FileSystemAction to pop-up menu
        } else if (actions[i] instanceof FileSystemAction) {
            popup.add(((FileSystemAction)actions[i]).getPopupPresenter());
        }
    }
    return popup;
}
 
源代码8 项目: wpcleaner   文件: MainWindow.java
/**
 * Add an item to the generate lists menu.
 * 
 * @param menu Menu.
 * @param mode List to be generated.
 */
private void addItemInInternalLinks(JPopupMenu menu, PageListWorker.Mode mode) {
  JMenuItem item = Utilities.createJMenuItem(mode.getTitle(), true);
  item.setActionCommand(mode.name());
  item.addActionListener(EventHandler.create(
      ActionListener.class, this, "actionInternalLinks", "actionCommand"));
  menu.add(item);
}
 
源代码9 项目: WorldGrower   文件: InventoryDialog.java
private void addPlayerCharacterMenuActions(JPopupMenu popupMenu, InventoryItem inventoryItem, InventoryDialogModel inventoryDialogModel, InventoryActionFactory inventoryActionFactory) {
	for(Action inventoryDialogAction : inventoryActionFactory.getPlayerCharacterInventoryActions(inventoryItem.getId())) {
		JMenuItem actionMenuItem = MenuFactory.createJMenuItem(inventoryDialogAction, soundIdReader);
		actionMenuItem.setToolTipText((String) inventoryDialogAction.getValue(Action.LONG_DESCRIPTION));
		popupMenu.add(actionMenuItem);
	}
}
 
源代码10 项目: binnavi   文件: CMenuBuilder.java
/**
 * Adds menus related to node selection to a given node context menu.
 *
 * @param menu The node context menu to extend.
 * @param graph The graph the clicked node belongs to.
 * @param node The clicked node.
 */
public static void addSelectionMenus(
    final JPopupMenu menu, final ZyGraph graph, final NaviNode node) {
  Preconditions.checkNotNull(menu, "IE02144: Menu argument can not be null");
  Preconditions.checkNotNull(graph, "IE02145: Graph argument can not be null");
  Preconditions.checkNotNull(node, "IE02146: Node argument can not be null");

  final JMenu selectionMenu = new JMenu("Selection");

  selectionMenu.add(CActionProxy.proxy(new CActionSelectNodePredecessors(graph, node)));
  selectionMenu.add(CActionProxy.proxy(new CActionSelectNodeSuccessors(graph, node)));

  if (graph.getSelectedNodes().size() > 0) {
    selectionMenu.add(CActionProxy.proxy(new CGroupAction(graph)));
  }

  if (node.getRawNode() instanceof INaviCodeNode) {
    try {
      final INaviFunction parentFunction =
          ((INaviCodeNode) node.getRawNode()).getParentFunction();

      selectionMenu.add(CActionProxy.proxy(
          new CActionSelectSameParentFunction(graph, parentFunction)));
    } catch (final MaybeNullException exception) {
      // Obviously we can not select nodes of the same parent function if there
      // is no parent function.
    }
  } else if (node.getRawNode() instanceof INaviFunctionNode) {
    final INaviFunction function = ((INaviFunctionNode) node.getRawNode()).getFunction();

    selectionMenu.add(CActionProxy.proxy(
        new CActionSelectSameFunctionType(graph, function.getType())));
  }

  menu.add(selectionMenu);

  menu.addSeparator();
}
 
源代码11 项目: Logisim   文件: PlaRom.java
@Override
public void configureMenu(JPopupMenu menu, Project proj) {
	this.circState = proj.getCircuitState();
	boolean enabled = circState != null;

	this.edit = createItem(enabled, Strings.get("ramEditMenuItem"));
	this.clear = createItem(enabled, Strings.get("ramClearMenuItem"));
	menu.addSeparator();
	menu.add(this.edit);
	menu.add(this.clear);
}
 
源代码12 项目: wpcleaner   文件: CWToolsPanel.java
/**
 * Action called when Load Selection button is pressed.
 */
public void actionLoadSelection() {

  // Retrieve possible selections
  Configuration config = Configuration.getConfiguration();
  Properties properties = config.getProperties(null, Configuration.ARRAY_CHECK_BOT_SELECTION);
  if ((properties == null) || (properties.isEmpty())) {
    return;
  }
  Set<Object> keySet = properties.keySet();
  List<String> keyList = new ArrayList<String>();
  for (Object key : keySet) {
    keyList.add(key.toString());
  }
  Collections.sort(keyList);

  // Create menu
  JPopupMenu menu = new JPopupMenu();
  for (String name : keyList) {
    JMenuItem item = Utilities.createJMenuItem(name, true);
    item.setActionCommand(properties.getProperty(name));
    item.addActionListener(EventHandler.create(
        ActionListener.class, this, "actionLoadSelection", "actionCommand"));
    menu.add(item);
  }
  menu.show(
      buttonLoadSelection,
      0,
      buttonLoadSelection.getHeight());
}
 
源代码13 项目: binnavi   文件: MemberTableMouseListener.java
private void showPopup(final MouseEvent event) {
  final JPopupMenu popupMenu = new JPopupMenu();
  popupMenu.add(new AddMemberAction());
  final int selectedRow = table.getSelectedRow();
  if (selectedRow != -1) {
    final MemberTableRowData row = table.getModel().getRow(selectedRow);
    popupMenu.add(new InsertMemberBeforeAction(selectedRow, row.getName()));
    popupMenu.add(new InsertMemberAfterAction(selectedRow, row.getName()));
    popupMenu.add(new DeleteMemberAction(selectedRow, row.getName()));
  }
  popupMenu.show(event.getComponent(), event.getX(), event.getY());
}
 
源代码14 项目: netbeans   文件: DropdownButton.java
private void addAction(JPopupMenu popup, Action action) {
    if (action == null) {
        popup.addSeparator();
    } else {
        Class cls = (Class)action.getValue(KEY_CLASS);
        if (Boolean.class.equals(cls)) {
            Boolean boolvalue = (Boolean)action.getValue(KEY_BOOLVALUE);
            JCheckBoxMenuItem item = new JCheckBoxMenuItem(action);
            item.setSelected(boolvalue);
            popup.add(item);
        } else {
            popup.add(action);
        }
    }
}
 
源代码15 项目: buffer_bci   文件: PolarChartPanel.java
/**
 * Creates a popup menu for the panel.
 *
 * @param properties  include a menu item for the chart property editor.
 * @param save  include a menu item for saving the chart.
 * @param print  include a menu item for printing the chart.
 * @param zoom  include menu items for zooming.
 *
 * @return The popup menu.
 */
@Override
protected JPopupMenu createPopupMenu(boolean properties, boolean save,
        boolean print, boolean zoom) {

   JPopupMenu result = super.createPopupMenu(properties, save, print, zoom);
   int zoomInIndex = getPopupMenuItem(result,
           localizationResources.getString("Zoom_In"));
   int zoomOutIndex = getPopupMenuItem(result,
           localizationResources.getString("Zoom_Out"));
   int autoIndex = getPopupMenuItem(result,
           localizationResources.getString("Auto_Range"));
   if (zoom) {
       JMenuItem zoomIn = new JMenuItem(
               localizationResources.getString("Zoom_In"));
       zoomIn.setActionCommand(POLAR_ZOOM_IN_ACTION_COMMAND);
       zoomIn.addActionListener(this);

       JMenuItem zoomOut = new JMenuItem(
               localizationResources.getString("Zoom_Out"));
       zoomOut.setActionCommand(POLAR_ZOOM_OUT_ACTION_COMMAND);
       zoomOut.addActionListener(this);

       JMenuItem auto = new JMenuItem(
               localizationResources.getString("Auto_Range"));
       auto.setActionCommand(POLAR_AUTO_RANGE_ACTION_COMMAND);
       auto.addActionListener(this);

       if (zoomInIndex != -1) {
           result.remove(zoomInIndex);
       }
       else {
           zoomInIndex = result.getComponentCount() - 1;
       }
       result.add(zoomIn, zoomInIndex);
       if (zoomOutIndex != -1) {
           result.remove(zoomOutIndex);
       }
       else {
           zoomOutIndex = zoomInIndex + 1;
       }
       result.add(zoomOut, zoomOutIndex);
       if (autoIndex != -1) {
           result.remove(autoIndex);
       }
       else {
           autoIndex = zoomOutIndex + 1;
       }
       result.add(auto, autoIndex);
   }
   return result;
}
 
源代码16 项目: Logisim   文件: Splitter.java
@Override
public void configureMenu(JPopupMenu menu, Project proj) {
	menu.addSeparator();
	menu.add(new SplitterDistributeItem(proj, this, 1));
	menu.add(new SplitterDistributeItem(proj, this, -1));
}
 
源代码17 项目: nextreports-designer   文件: DBBrowserTree.java
private void selectionChart(DBBrowserNode selectedNode, MouseEvent e, boolean pressed) {
	OpenChartAction openAction = new OpenChartAction();
	openAction.setChartName(selectedNode.getDBObject().getName());
	openAction.setChartPath(selectedNode.getDBObject().getAbsolutePath());

	if (e.getClickCount() == 2) {
		if (pressed) {
			openAction.actionPerformed(new ActionEvent(e.getSource(), e.getID(), ""));
		}

	} else {
		JPopupMenu popupMenu = new JPopupMenu();
		JMenuItem menuItem = new JMenuItem(openAction);
		popupMenu.add(menuItem);

		DeleteChartAction deleteAction = new DeleteChartAction(instance, selectedNode);
		JMenuItem menuItem2 = new JMenuItem(deleteAction);
		popupMenu.add(menuItem2);

		RenameChartAction renameAction = new RenameChartAction(instance, selectedNode);
		JMenuItem menuItem3 = new JMenuItem(renameAction);
		popupMenu.add(menuItem3);

		ExportChartAction exportAction = new ExportChartAction(instance, selectedNode);
		JMenuItem menuItem4 = new JMenuItem(exportAction);
		popupMenu.add(menuItem4);

		Chart chart = ChartUtil.loadChart(selectedNode.getDBObject().getAbsolutePath());
		PreviewChartAction previewHTML5Action = new PreviewChartAction(ChartRunner.GRAPHIC_FORMAT,
				ChartRunner.HTML5_TYPE, I18NSupport.getString("preview.html5"));
		previewHTML5Action.setChart(chart);
		popupMenu.add(previewHTML5Action);
		PreviewChartAction previewFlashAction = new PreviewChartAction(ChartRunner.GRAPHIC_FORMAT,
				ChartRunner.FLASH_TYPE, I18NSupport.getString("preview.flash"));
		previewFlashAction.setChart(chart);
		popupMenu.add(previewFlashAction);
		previewFlashAction.setEnabled(!ChartType.hasNoFlashSupport(chart.getType().getType()));
		PreviewChartAction previewImageAction = new PreviewChartAction(ChartRunner.IMAGE_FORMAT,
				ChartRunner.NO_TYPE, I18NSupport.getString("preview.image"));
		previewImageAction.setChart(chart);
		popupMenu.add(previewImageAction);

		PublishChartAction publishAction = new PublishChartAction(selectedNode.getDBObject().getAbsolutePath());
		JMenuItem menuItem5 = new JMenuItem(publishAction);
		popupMenu.add(menuItem5);

		JMenuItem menuItem6 = new JMenuItem(new ValidateSqlsAction(selectedNode.getDBObject()));
		popupMenu.add(menuItem6);

		JMenuItem menuItem7 = new JMenuItem(new AddToFavoritesAction(selectedNode.getDBObject()));
		popupMenu.add(menuItem7);

		popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
	}
}
 
源代码18 项目: keystore-explorer   文件: KseFrame.java
private void initKeyStoreTabPopupMenu() {
	jpmKeyStoreTab = new JPopupMenu();

	jmiKeyStoreTabSave = new JMenuItem(saveAction);
	jmiKeyStoreTabSave.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabSave, (String) saveAction.getValue(Action.LONG_DESCRIPTION), this);
	jpmKeyStoreTab.add(jmiKeyStoreTabSave);

	jmiKeyStoreTabSaveAll = new JMenuItem(saveAllAction);
	jmiKeyStoreTabSaveAll.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabSaveAll, (String) saveAllAction.getValue(Action.LONG_DESCRIPTION),
			this);
	jpmKeyStoreTab.add(jmiKeyStoreTabSaveAll);

	jpmKeyStoreTab.addSeparator();

	jmiKeyStoreTabPaste = new JMenuItem(pasteAction);
	jmiKeyStoreTabPaste.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabPaste, (String) pasteAction.getValue(Action.LONG_DESCRIPTION), this);
	jpmKeyStoreTab.add(jmiKeyStoreTabPaste);

	jpmKeyStoreTab.addSeparator();

	jmiKeyStoreTabClose = new JMenuItem(closeAction);
	jmiKeyStoreTabClose.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabClose, (String) closeAction.getValue(Action.LONG_DESCRIPTION), this);
	jpmKeyStoreTab.add(jmiKeyStoreTabClose);

	jmiKeyStoreTabCloseOthers = new JMenuItem(closeOthersAction);
	jmiKeyStoreTabCloseOthers.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabCloseOthers,
			(String) closeOthersAction.getValue(Action.LONG_DESCRIPTION), this);
	jpmKeyStoreTab.add(jmiKeyStoreTabCloseOthers);

	jmiKeyStoreTabCloseAll = new JMenuItem(closeAllAction);
	jmiKeyStoreTabCloseAll.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabCloseAll, (String) closeAllAction.getValue(Action.LONG_DESCRIPTION),
			this);
	jpmKeyStoreTab.add(jmiKeyStoreTabCloseAll);

	jpmKeyStoreTab.addSeparator();

	jmiKeyStoreTabProperties = new JMenuItem(propertiesAction);
	jmiKeyStoreTabProperties.setToolTipText(null);
	new StatusBarChangeHandler(jmiKeyStoreTabProperties,
			(String) propertiesAction.getValue(Action.LONG_DESCRIPTION), this);
	jpmKeyStoreTab.add(jmiKeyStoreTabProperties);
}
 
源代码19 项目: netbeans   文件: ResultView.java
public ResultView() {
    setLayout(contentCards = new CardLayout());

    setName("Search Results");                                      //NOI18N
    setDisplayName(NbBundle.getMessage(ResultView.class, "TITLE_SEARCH_RESULTS"));    //NOI18N
    
    initAccessibility();

    pop = new JPopupMenu();
    pop.add(new Close());
    pop.add(new CloseAll());
    pop.add(new CloseAllButCurrent());
    popL = new PopupListener();
    closeL = new CloseListener();
    
    emptyPanel = new JPanel();
    singlePanel = new JPanel();
    singlePanel.setLayout(new BoxLayout(singlePanel, BoxLayout.PAGE_AXIS));
    emptyPanel.setOpaque(true);
    tabs = TabbedPaneFactory.createCloseButtonTabbedPane();
    tabs.addChangeListener(new ChangeListener() {
        @Override
        public void stateChanged(ChangeEvent e) {
            updateLookup();
        }
    });
    tabs.setMinimumSize(new Dimension(0, 0));
    tabs.addMouseListener(popL);
    tabs.addPropertyChangeListener(closeL);
    add(emptyPanel, CARD_NAME_EMPTY);
    add(tabs, CARD_NAME_TABS);
    add(singlePanel, CARD_NAME_SINGLE);
    if (isMacLaf) {
        emptyPanel.setBackground(macBackground);
        tabs.setBackground(macBackground);
        tabs.setOpaque(true);
        setBackground(macBackground);
        setOpaque(true);
    } else {
        emptyPanel.setBackground(
                UIManager.getColor("Tree.background"));         //NOI18N
    }
    contentCards.show(this, CARD_NAME_EMPTY);
    associateLookup(Lookups.proxy(lookupProvider));
}
 
源代码20 项目: Spark   文件: BannedUsers.java
/**
 * Responsible for popping up the menu items.
 *
 * @param e   the MouseEvent that triggered it.
 * @param jid the JID to handle.
 */
private void showPopup(MouseEvent e, String jid) {
    final JPopupMenu popup = new JPopupMenu();
    popup.add(unBanMenuItem);
    popup.show(this, e.getX(), e.getY());
}