Package devplugin

Examples of devplugin.ActionMenu


   * @return the actions this plugin provides for the given program or
   *         <code>null</code> if the plugin does not provide this feature.
   */
  public final ActionMenu getContextMenuActions(Program program) {
    try {
      ActionMenu menu = doGetContextMenuActions(program);

      if (menu != null) {
        return new ActionMenuProxy(this, menu);
      } else {
        return null;
View Full Code Here


   * @return the actions this plugin provides for the given channel or
   *         <code>null</code> if the plugin does not provide this feature.
   */
  public final ActionMenu getContextMenuActions(final Channel channel) {
    try {
      ActionMenu menu = doGetContextMenuActions(channel);

      if (menu != null) {
        return new ActionMenuProxy(this, menu);
      } else {
        return null;
View Full Code Here

   * @return the action to use for the menu and the toolbar or <code>null</code>
   *         if the plugin does not provide this feature.
   */
  public final ActionMenu getButtonAction() {
    try {
      ActionMenu menu = doGetButtonAction();

      if (menu != null) {
        return new ActionMenuProxy(this, menu);
      } else {
        return null;
View Full Code Here

    }
  }

  public Icon getPluginIcon() {
    // first try button icon
    ActionMenu actionMenu = getButtonAction();
    Icon icon = getMenuIcon(actionMenu);

    // then try the mark icon
    if (icon == null) {
      icon = getMarkIcon();
View Full Code Here

    action.setSmallIcon(getIconFromTheme(ICON_CATEGORY, ICON_NAME, 16));
    action.setShortDescription(mLocalizer.msg("favoritesManager",
            "Manage favorite programs"));
    action.setText(getName());

    return new ActionMenu(action);
  }
View Full Code Here

   * @return the action to use for the menu and the toolbar or <code>null</code>
   *         if the plugin does not provide this feature.
   */
  protected ActionMenu doGetButtonAction() {
    if (mPlugin != null) {
      ActionMenu actMenu = mPlugin.getButtonAction();
      if (actMenu != null) {
        Action action = actMenu.getAction();
        if (action != null && !(action instanceof ContextMenuAction)) {
          if (action.getValue(Action.SMALL_ICON) == null) {
            mLog.warning("Small icon missing for button action "
                + action.getValue(Action.NAME));
            action.putValue(Action.SMALL_ICON, TVBrowserIcons.warning(TVBrowserIcons.SIZE_SMALL));
View Full Code Here

            };
          });
          rootMenu.add(item);
        }
      } else if (!equalsPlugin) {
        ActionMenu actionMenu = menuIf.getContextMenuActions(program);
        if (actionMenu != null) {
          JMenuItem menuItem = MenuUtil.createMenuItem(actionMenu);
          items.add(menuItem);
          if (menuIf == leftSingleClickIf && markDefaultIf && !menuIf.equals(DoNothingContextMenuItem.getInstance())) {
            ((JMenuItem)getLastFirstMenuEntry(menuItem)).setForeground(new Color(0,90,0));
View Full Code Here

        "Allows searching programs containing a certain text."));
    action.setText(mLocalizer.ellipsisMsg("searchPrograms", "Search programs"));
    action.putValue(InternalPluginProxyIf.KEYBOARD_ACCELERATOR, KeyStroke
        .getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));

    return new ActionMenu(action);
  }
View Full Code Here

    action.setActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        searchRepetitions(program);
      }
    });
    return new ActionMenu(action);
  }
View Full Code Here

    action.putValue(Action.NAME, mLocalizer.msg("0", "IMDb ratings"));
    action.putValue(Action.SHORT_DESCRIPTION, getInfo().getDescription());
    Icon icon = ImageUtilities.createImageIconFromJar("de/kunysch/localimdb/localimdb.png", getClass());
    action.putValue(Action.SMALL_ICON, icon);
    action.putValue(BIG_ICON, new FixedSizeIcon(24, 24, icon));
    return new ActionMenu(action);
  }
View Full Code Here

TOP

Related Classes of devplugin.ActionMenu

Copyright © 2018 www.massapicom. 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.