Package javax.swing

Examples of javax.swing.JMenuItem.addActionListener()


        if(item instanceof SoftwareUpdateItem) {
          if(((SoftwareUpdateItem)item).getWebsite() != null) {
            JPopupMenu menu = new JPopupMenu();

            JMenuItem menuItem = new JMenuItem(mLocalizer.msg("openWebsite","Open website"), TVBrowserIcons.webBrowser(TVBrowserIcons.SIZE_SMALL));
            menuItem.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                Launch.openURL(((SoftwareUpdateItem)item).getWebsite());
              }
            });
View Full Code Here


      }

      JMenuItem menuItem = new JMenuItem(TVBrowserActions.scrollToNow.getValue(Action.NAME).toString());
      menuItem.setHorizontalTextPosition(SwingConstants.CENTER);

      menuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          MainFrame.getInstance().scrollToNow();
          btn.setSelected(false);
          MainFrame.getInstance().updateToolbar();
        }
View Full Code Here

      item.setIcon(UiUtilities.createChannelIcon(ch.getIcon()));
      item.setPreferredSize(new Dimension(item.getPreferredSize().width, item
          .getIcon().getIconHeight()));
    }

    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().showChannel(ch);
        btn.setSelected(false);
        MainFrame.getInstance().updateToolbar();
      }
View Full Code Here

    }

    JMenuItem item = new JMenuItem(hour + ":" + minute);
    item.setHorizontalTextPosition(SwingConstants.CENTER);

    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().scrollToTime(time);
        btn.setSelected(false);
        MainFrame.getInstance().updateToolbar();
      }
View Full Code Here

    return show;
  }

  private static JMenuItem createConfigureItem() {
    JMenuItem item = new JMenuItem(mLocalizer.ellipsisMsg("configure", "Configure"));
    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        new ToolBarDragAndDropSettings();
      }
    });
    return item;
View Full Code Here

          popupMenu.add(item);

          item = new JMenuItem(mLocalizer.msg("searchWikipedia",
              "Search in Wikipedia"));
          item.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              searchWikipedia(searchText);
            }
          });
View Full Code Here

              subMenu.setIcon(webPlugin.getMarkIcon());
              popupMenu.add(subMenu);

              for (final ProgramReceiveTarget target : targets) {
                item = new JMenuItem(target.toString());
                item.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent e) {
                    searchWebPlugin(searchText, target);
                  }
                });
View Full Code Here

      private JMenuItem searchTextMenuItem(final String desc) {
        JMenuItem item = new JMenuItem(mLocalizer.msg("searchTvBrowser",
            "Search in TV-Browser"), IconLoader.getInstance().getIconFromTheme(
            "actions", "edit-find"));
        item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            internalSearch(desc);
          }
        });
        return item;
View Full Code Here

          final boolean actor) {
        JMenuItem item;
        item = new JMenuItem(mLocalizer.ellipsisMsg("addFavorite",
            "Create favorite"), IconLoader.getInstance().getIconFromTheme(
            "emblems", "emblem-favorite"));
        item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (actor) {
              FavoritesPlugin.getInstance().showCreateActorFavoriteWizard(
                  mProgram, desc);
            } else {
View Full Code Here

    }
    menu.add(new JSeparator());
    // new channel group
    JMenuItem menuItemAdd = createMenuItem("channelGroupNew",
        "Add channel group", null, true);
    menuItemAdd.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        EditFilterComponentDlg dlg = new EditFilterComponentDlg(null, null,
            ChannelFilterComponent.class);
        FilterComponent rule = dlg.getFilterComponent();
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.