Пример #1
0
  /**
   * Gets the <tt>JMenu</tt> which is the component of this plug-in. If it still doesn't exist, it's
   * created.
   *
   * @return the <tt>JMenu</tt> which is the component of this plug-in
   */
  private JMenu getMenu() {
    if (menu == null) {
      menu = new SIPCommMenu();
      menu.setText(getName());

      if (Container.CONTAINER_CONTACT_RIGHT_BUTTON_MENU.equals(getContainer())) {
        Icon icon = OtrActivator.resourceService.getImage("plugin.otr.MENU_ITEM_ICON_16x16");

        if (icon != null) menu.setIcon(icon);
      }

      if (!inMacOSXScreenMenuBar) menu.getPopupMenu().addPopupMenuListener(this);
    }
    return menu;
  }