Package javax.swing

Examples of javax.swing.Action.actionPerformed()


            Action a = node.getPreferredAction();
            if (a instanceof ContextAwareAction) {
                a = ((ContextAwareAction) a).createContextAwareInstance(node.getLookup());
            }
            if (a != null) {
                a.actionPerformed(new ActionEvent(node, ActionEvent.ACTION_PERFORMED, "")); // NOI18N
            }
        } catch (DataObjectNotFoundException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
View Full Code Here


        }
        final JMenuItem menuItem = (JMenuItem) treeNode.getUserObject();
        final Action action = menuItem.getAction();

        if (action != null) {
          action.actionPerformed(e);
        } else {
          LogUtils.warn("Trying to call a menu hyperlink action that doesn't exist.");
        }
      }
      else {
View Full Code Here

    selectionDialog.setModal(true);
    selectionDialog.show();
    final int result = selectionDialog.getResult();
    if (result >= 0) {
      final Action action = (Action) actions.get(result);
      action.actionPerformed(new ActionEvent(action, 0, NodeModel.NODE_ICON, selectionDialog.getModifiers()));
    }
  }
}
View Full Code Here

            }
            final JMenuItem menuItem = (JMenuItem) treeNode.getUserObject();
            final Action action = menuItem.getAction();
            LogUtils.info("executing " + menuItem.getText() + "(" + menuItemKey + ")");
            ActionEvent e = new ActionEvent(menuItem, 0, null);
            action.actionPerformed(e);
        }
    }

    private static MenuBuilder getMenuBuilder() {
        final ModeController modeController = Controller.getCurrentModeController();
View Full Code Here


  boolean insertBreakSpecialHandling(ActionEvent e) {
    Action a = tokenMaker.getInsertBreakAction();
    if (a!=null) {
      a.actionPerformed(e);
      return true;
    }
    return false;
  }
View Full Code Here

        AbstractActionExt wrapper = new AbstractActionExt(null, icon) {

            public void actionPerformed(ActionEvent e) {
                Action action = monthView.getActionMap().get(actionKey);
                if (action != null) {
                    action.actionPerformed(e);
                }
            }

        };
        monthView.getActionMap().put(newActionKey, wrapper);
View Full Code Here

        ActionMap map = component.getActionMap();
        Action action = map.get(command);

        if (action != null) {
            if (value instanceof ActionEvent) {
                action.actionPerformed( (ActionEvent) value);
            }
            else {
                // XXX should the value represent the event source?
                action.actionPerformed(new ActionEvent(value, 0,
                    command.toString()));
View Full Code Here

            if (value instanceof ActionEvent) {
                action.actionPerformed( (ActionEvent) value);
            }
            else {
                // XXX should the value represent the event source?
                action.actionPerformed(new ActionEvent(value, 0,
                    command.toString()));
            }
            return true;
        }
        return false;
View Full Code Here

        Iterator<String> iter = getActionIDs().iterator();
        while (iter.hasNext()) {
            String id = iter.next();
            Action action = manager.getAction(id);
            if (action != null) {
            action.actionPerformed(evt);
            }
        }
    }

    /**
 
View Full Code Here

                Action action = map.get(command);
                if (action != null) {
                    if (evt == null) {
                        evt = new ActionEvent(comp, 0, command.toString());
                    }
                    action.actionPerformed(evt);

                    return true;
                }
            }
            comp = comp.getParent();
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.