Package tvbrowser.ui.pluginview.contextmenu

Examples of tvbrowser.ui.pluginview.contextmenu.ContextMenu


    }
    boolean isDoubleClick = SwingUtilities.isLeftMouseButton(e) && (e.getClickCount() == 2);

    TreePath[] selectedPaths = mTree.getSelectionPaths();

    ContextMenu menu = createContextMenu(selectedPaths);
    if (menu == null) {
      return;
    }

    if (isDoubleClick) {
      Action defaultAction = menu.getDefaultAction();
      if (defaultAction != null) {
        defaultAction.actionPerformed(new ActionEvent(mTree, 0, ""));
      }
    }
View Full Code Here


      mTree.setSelectionPath(path);
    }

    TreePath[] selectedPaths = mTree.getSelectionPaths();

    ContextMenu menu = createContextMenu(selectedPaths);
    if (menu == null) {
      return;
    }

    menu.getPopupMenu().show(mTree, e.getX(), e.getY());
  }
View Full Code Here

  @Override
  public void keyReleased(final KeyEvent event) {
    // check if menu item has key event for pure keyboard usage
    TreePath[] selectedPaths = mTree.getSelectionPaths();
    ContextMenu menu = createContextMenu(selectedPaths);
    for (MenuElement element : menu.getPopupMenu().getSubElements()) {
      if (element instanceof JMenuItem) {
        final JMenuItem item = (JMenuItem) element;
        final Action action = item.getAction();
        if (action != null) {
          Object keyboard = action
View Full Code Here

TOP

Related Classes of tvbrowser.ui.pluginview.contextmenu.ContextMenu

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.