Package java.awt.event

Examples of java.awt.event.ActionEvent


                                     UserPreferences preferences,
                                     final Action clipboardAction) {
    getActionMap().put(actionType,
        new ResourceAction (preferences, HomePane.class, actionType.name()) {
          public void actionPerformed(ActionEvent ev) {
            ev = new ActionEvent(lastFocusedComponent, ActionEvent.ACTION_PERFORMED, null);
            clipboardAction.actionPerformed(ev);
          }
        });
  }
View Full Code Here


   * Moves quickly camera 10 steps backward.
   */
  private void seekBackward() {
    for (int i = 0; i < 10 && this.cameraPathIterator.hasPrevious(); i++) {
      this.playbackTimer.getActionListeners() [0].actionPerformed(
          new ActionEvent(this.playbackTimer, 0, "backward", System.currentTimeMillis(), 0));
    }
  }
View Full Code Here

   * Moves quickly camera 10 steps forward.
   */
  private void seekForward() {
    for (int i = 0; i < 10 && this.cameraPathIterator.hasNext(); i++) {
      this.playbackTimer.getActionListeners() [0].actionPerformed(
          new ActionEvent(this.playbackTimer, 0, "forward", System.currentTimeMillis(), 0));
    }
  }
View Full Code Here

     * Updates the Folder.
     */
    public void update() {
      getLogger().fine("creating update action for folder " + folder.getFolderID());
      updateRunning = true;
      folder.getFolderThread().addToQueue(getAction(), new ActionEvent(this, 1, "folder-check - " + folder.getFolderID()), ActionThread.PRIORITY_LOW);
    }
View Full Code Here

            Attachment selectedAttachment = getSelectedAttachment();
            String actionCommand = Pooka.getProperty("AttachmentPane.2xClickAction", "file-open");
            if (selectedAttachment != null) {
              Action clickAction = getActionByName(actionCommand);
              if (clickAction != null) {
                clickAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, actionCommand));

              }
            }
          } else if (e.isPopupTrigger()) {
            // see if anything is selected
View Full Code Here

            if (event instanceof InputEvent)
                modifier = ((InputEvent)event).getModifiers();
            else if (event instanceof ActionEvent)
                modifier = ((ActionEvent)event).getModifiers();
            else assert (false);
            ActionEvent actionEvent = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, m_actionCommand, EventQueue.getMostRecentEventTime(), modifier);
            for (ActionListener listener : m_actionListenersArray)
                listener.actionPerformed(actionEvent);
        }
    }
View Full Code Here

                //System.err.println("actionPerformed: " + option);
                nd.setValue(option);

                if (buttonListener != null) {
                    // #34485: some listeners expect that the action source is the option, not the button
                    ActionEvent e2 = new ActionEvent(
                            option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers());
                    buttonListener.actionPerformed(e2);
                }

                if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) {
View Full Code Here

     * @param e
     *            the generic UI action event
     */
    public void doAction(ActionEvent e) {
        ReportActionRouter.getInstance().doActionNow(
                new ActionEvent(e.getSource(), e.getID(),
                        ReportCheckDirty.CHECK_DIRTY));
        ReportGuiPackage guiPackage = ReportGuiPackage.getInstance();
        if (guiPackage.isDirty()) {
            if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance()
                    .getMainFrame(), JMeterUtils
                    .getResString("cancel_new_to_save"), JMeterUtils
                    .getResString("Save?"), JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
                ReportActionRouter.getInstance().doActionNow(
                        new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE));
            }
        }
        guiPackage.getTreeModel().clearTestPlan();
        guiPackage.getTreeListener().getJTree().setSelectionRow(1);

        // Clear the name of the test plan file
        ReportGuiPackage.getInstance().setReportPlanFile(null);

        ReportActionRouter.getInstance().actionPerformed(
                new ActionEvent(e.getSource(), e.getID(), ActionNames.ADD_ALL));
    }
View Full Code Here

            }
        }
        // TODO: doesn't putting this here mark the tree as
        // saved even though a failure may occur later?

        ReportActionRouter.getInstance().doActionNow(new ActionEvent(subTree, e.getID(), ReportCheckDirty.SUB_TREE_SAVED));
        try {
            convertSubTree(subTree);
        } catch (Exception err) {
        }
        FileOutputStream ostream = null;
View Full Code Here

    public void doAction(ActionEvent e) {
        boolean merging = e.getActionCommand().equals("merge");

        if (!merging) {
            ReportActionRouter.getInstance().doActionNow(
                    new ActionEvent(e.getSource(), e.getID(), "close"));
        }

        JFileChooser chooser = ReportFileDialoger
                .promptToOpenFile(new String[] { ".jmr" });
        if (chooser == null) {
View Full Code Here

TOP

Related Classes of java.awt.event.ActionEvent

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.