Package devplugin

Examples of devplugin.ActionMenu


    protected ActionMenu doGetContextMenuActions(Program program) {
        if (mScript == null) { return null; }

        try {

          ActionMenu actionMenu = mScript.getContextMenuActions(program);
          setActionMenuDefaultValues(actionMenu);

          return actionMenu;
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


    protected ActionMenu doGetButtonAction() {
       
        if (mScript == null) { return null; }

        try {
            ActionMenu menu = mScript.getButtonAction();
            setActionMenuDefaultValues(menu);
            return menu;
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

   
    return mInstance;
  }
 
  public ActionMenu getContextMenuActions(Program program) {
    return new ActionMenu(new ContextMenuAction(mLocalizer.msg("doNothing","No action")));
  }
View Full Code Here

      createPluginAction(dataServiceProxy);
    }
  }

  private void createPluginAction(ButtonActionIf plugin) {
    ActionMenu actionMenu = plugin.getButtonAction();
    if (actionMenu != null) {
      if (!actionMenu.hasSubItems()) {
        Action action = actionMenu.getAction();
        action.putValue(ToolBar.ACTION_ID_KEY, plugin.getId());
        mAvailableActions.put(plugin.getId(), action);
        String tooltip = (String) action.getValue(Action.SHORT_DESCRIPTION);
        if (tooltip == null) {
          action.putValue(Action.SHORT_DESCRIPTION, plugin.getButtonActionDescription());
        }
      } else {
        createPluginAction(plugin, actionMenu.getSubItems());
      }
    }
  }
View Full Code Here

    // search bar has its own space, so we don't add the space action
  }

  private void addButtonActionIfToVisibleActions(ButtonActionIf buttonAction) {
    ActionMenu actionMenu = buttonAction.getButtonAction();
    if (actionMenu != null) {
      if (!actionMenu.hasSubItems()) {
        Action action = mAvailableActions.get(buttonAction.getId());
        if (action != null
            && !ContextMenuSeparatorAction.getInstance().equals(action)) {
          mVisibleActions.add(action);
        }
View Full Code Here

      if (menuIf instanceof SeparatorMenuItem) {
        mList.addElement(menuIf);
      } else if (menuIf instanceof ConfigMenuItem || menuIf instanceof LeaveFullScreenMenuItem) {
          mList.addElement(menuIf);
      } else {
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          mList.addElement(menuIf);
          items.add(menuIf);
        }
      }
View Full Code Here

        // Get the context menu item text
        StringBuilder text = new StringBuilder();
        Icon icon = null;
        // Action[] actionArr = plugin.getContextMenuActions(exampleProgram);
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          Action action = actionMenu.getAction();
          if (action != null) {
            text.append((String) action.getValue(Action.NAME));
            icon = (Icon) action.getValue(Action.SMALL_ICON);
            if (icon != null) {
              icon = new FixedSizeIcon(16, 16, icon);
View Full Code Here

        Program exampleProgram = Plugin.getPluginManager().getExampleProgram();

        // Get the context menu item text
        StringBuilder text = new StringBuilder();
        Icon icon = null;
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          Action action = actionMenu.getAction();
          if (action != null) {
            text.append((String) action.getValue(Action.NAME));
            icon = (Icon) action.getValue(Action.SMALL_ICON);
          } else if (menuIf instanceof PluginProxy) {
            text.append(((PluginProxy) menuIf).getInfo().getName());
View Full Code Here

          e.printStackTrace();
        }
      }
    });

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

      for (ContextMenuIf element : menuIfList) {
        if (element instanceof SeparatorMenuItem) {
        } else if (element instanceof ConfigMenuItem
            || element instanceof LeaveFullScreenMenuItem) {
        } else {
          ActionMenu actionMenu = element.getContextMenuActions(exampleProgram);
          if (actionMenu != null) {
            mComboBox.addItem(element);
          }
        }
      }
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.