Package javax.swing

Examples of javax.swing.Action.actionPerformed()


    // Delete new catalog piece of furniture
    final Action deleteAction = homeView.getActionMap().get(HomePane.ActionType.DELETE);
    assertTrue("Delete action isn't enable", deleteAction.isEnabled());
    tester.invokeLater(new Runnable() {
        public void run() {
          deleteAction.actionPerformed(null);
        }
      });
    // Wait for confirm dialog to be shown
    tester.waitForFrameShowing(new AWTHierarchy(), preferences.getLocalizedString(
        HomePane.class, "confirmDeleteCatalogSelection.title"));
View Full Code Here


      Object selectedItem = e.getItem();
      String cmd = (String)selectionMap.get(selectedItem);
      if (cmd != null) {
        Action action = getAction(cmd);
        if (action != null) {
    action.actionPerformed(new ActionEvent(e.getSource(), e.getID(), cmd));
        }
      }
    }
  }
      });
View Full Code Here

                    MailTreeNode mtn = null;
                    net.suberic.pooka.FolderInfo fi = storeInfo.getChild("INBOX");
                    if (fi != null) {
                      FolderNode fn = fi.getFolderNode();
                      Action openAction = fn.getAction("file-open");
                      openAction.actionPerformed(new java.awt.event.ActionEvent(this, 0, "file-open"));
                      mtn = fn;
                    } else {
                      mtn = storeInfo.getStoreNode();
                    }
                    if (mtn != null) {
View Full Code Here

          if (textActions[i].getValue(Action.NAME).equals(name))
            selectedAction = textActions[i];
        }

        if (selectedAction != null) {
          selectedAction.actionPerformed(e);
        }
      }
    }
  }
View Full Code Here

        public void hyperlinkUpdate(HyperlinkEvent e) {
          if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
            if (e.getDescription().equals("StartTutorial")) {
              startTutorial.actionPerformed(null);
            } else if (e.getDescription().equals("StopTutorial")) {
              stopTutorial.actionPerformed(null);
            } else {
              try {
                tutorialArea.setPage(e.getURL());
              } catch (IOException e1) {
                MessageCenter.getInstance().getLogger().error(
View Full Code Here

    public void windowClosing(final WindowEvent e)
    {
      final Action cancelAction = getCancelAction();
      if (cancelAction != null)
      {
        cancelAction.actionPerformed(null);
      }
      else
      {
        setConfirmed(false);
        setVisible(false);
View Full Code Here

        final Action selectPrevious = map.get(actionName);
        return new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                e.setSource(tree);
                selectPrevious.actionPerformed(e);
            }
        };
    }

    @SwingThread
View Full Code Here

    public void windowClosing(final WindowEvent e)
    {
      final Action cancelAction = getCancelAction();
      if (cancelAction != null)
      {
        cancelAction.actionPerformed(null);
      }
      else
      {
        setConfirmed(false);
        setVisible(false);
View Full Code Here

            Action fatalAction = pane.getActionMap().get(JXErrorPane.FATAL_ACTION_KEY);
            if (fatalAction == null) {
                System.exit(1);
            } else {
                ActionEvent ae = new ActionEvent(closeButton, -1, "fatal");
                fatalAction.actionPerformed(ae);
            }
        }
    }

    private final class ErrorPaneListener implements PropertyChangeListener {
View Full Code Here

                /*
                 * PatrykRy: Commit today date only when commit action is enabled.
                 * Home navigate is always enabled.
                 */
                if (delegate !=  null && delegate.isEnabled()) { 
                    delegate.actionPerformed(null);
                }
               
            }
        }
    }
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.