Package java.awt.event

Examples of java.awt.event.ActionEvent


                .setSelectionPath(
                        new TreePath(((ReportTreeNode) newTree.getArray()[0])
                                .getPath()));
        tree = ReportGuiPackage.getInstance().getCurrentSubTree();
        ReportActionRouter.getInstance().actionPerformed(
                new ActionEvent(tree.get(tree.getArray()[tree.size() - 1]), id,
                        ReportCheckDirty.SUB_TREE_LOADED));

        return isTestPlan;
    }
View Full Code Here


        return commands;
    }

    public void doAction(ActionEvent e) {
        ReportActionRouter.getInstance().actionPerformed(
                new ActionEvent(e.getSource(), e.getID(),
                        ReportCheckDirty.REMOVE));
        ReportGuiPackage guiPackage = ReportGuiPackage.getInstance();
        ReportTreeNode[] nodes = guiPackage.getTreeListener()
                .getSelectedNodes();
        TreePath newTreePath = // Save parent node for later
View Full Code Here

     * @param e
     *            Description of Parameter
     */
    public void doAction(ActionEvent e) {
        ReportActionRouter.getInstance().doActionNow(
                new ActionEvent(e.getSource(), e.getID(),
                        ReportCheckDirty.CHECK_DIRTY));
        if (ReportGuiPackage.getInstance().isDirty()) {
            int chosenOption = JOptionPane.showConfirmDialog(ReportGuiPackage
                    .getInstance().getMainFrame(), JMeterUtils
                    .getResString("cancel_exit_to_save"), JMeterUtils
                    .getResString("Save?"), JOptionPane.YES_NO_CANCEL_OPTION,
                    JOptionPane.QUESTION_MESSAGE);
            if (chosenOption == JOptionPane.NO_OPTION) {
                System.exit(0);
            } else if (chosenOption == JOptionPane.YES_OPTION) {
                ReportActionRouter.getInstance().doActionNow(
                        new ActionEvent(e.getSource(), e.getID(),
                                ReportSave.SAVE_ALL_AS));
                if (!ReportGuiPackage.getInstance().isDirty()) {
                    System.exit(0);
                }
            }
View Full Code Here

        log.debug("popupShouldSave");
        if (ReportGuiPackage.getInstance().getReportPlanFile() == null) {
            if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), JMeterUtils
                    .getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
                ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE));
            }
        }
    }
View Full Code Here

            new org.apache.jmeter.gui.ReportMainFrame(ReportActionRouter.getInstance(),
                treeModel, treeLis);
        ComponentUtil.centerComponentInWindow(main, 80);
        main.setVisible(true);

        ReportActionRouter.getInstance().actionPerformed(new ActionEvent(main, 1, ReportCheckDirty.ADD_ALL));
        if (testFile != null) {
            FileInputStream reader = null;
            try {
                File f = new File(testFile.getArgument());
                log.info("Loading file: " + f);
View Full Code Here

        // NOTUSED: GuiPackage guiPack =
        GuiPackage.getInstance(treeLis, treeModel);
        MainFrame main = new MainFrame(ActionRouter.getInstance(), treeModel, treeLis);
        ComponentUtil.centerComponentInWindow(main, 80);
        main.setVisible(true);
        ActionRouter.getInstance().actionPerformed(new ActionEvent(main, 1, ActionNames.ADD_ALL));
        if (testFile != null) {
            FileInputStream reader = null;
            try {
                File f = new File(testFile);
                log.info("Loading file: " + f);
View Full Code Here

            this.actionListener = actionListener;
        }

        public void doAction() {
            if (actionListener != null) {
                actionListener.actionPerformed(new ActionEvent(this, 0, null));
            }
        }
View Full Code Here

    addApplicationListener( new ApplicationAdapter() {

      public void handleAbout( ApplicationEvent event ) {
        if (aboutAction != null) {
          event.setHandled( true );        
          aboutAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_ABOUT ));
        } else {
          super.handleAbout( event );
        }
      }

      public void handleOpenApplication( ApplicationEvent event ) {
        if (appAction != null) {
          appAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_OPENAPP) );
          event.setHandled( true );
        } else {
          super.handleOpenApplication( event );
        }
      }

      public void handleOpenFile( ApplicationEvent event ) {
        if (fileAction != null) {
          fileAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_OPENFILE) );
          event.setHandled( true );
        } else {
          super.handleOpenFile( event );
        }
      }

      public void handlePreferences( ApplicationEvent event ) {
        if (prefAction != null) {
          prefAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_PREF) );
          event.setHandled( true );
        } else {
          super.handlePreferences( event );
        }
      }

      public void handlePrintFile( ApplicationEvent event ) {
        if (printAction != null) {
          printAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_PRINT) );
          event.setHandled( true );
        } else {
          super.handlePrintFile( event );
        }
      }

      public void handleQuit( ApplicationEvent event ) {
        if (quitAction != null) {
          quitAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_QUIT) );
          event.setHandled( true );
        } else {
          super.handleQuit( event );
        }
      }

      public void handleReOpenApplication( ApplicationEvent event ) {
        if (reopenAction != null) {
          reopenAction.actionPerformed( new ActionEvent(event.getSource(),
                  MacApp.this.sequence++,
                  Parser.ATTR_MACOS_OPENAPP) );
          event.setHandled( true );
        } else {
          super.handleReOpenApplication( event );
View Full Code Here

     */
    @Override
    public void doClick() {
        Action action = getActionMap().get("pressed");
        if (action != null) {
            action.actionPerformed(new ActionEvent(this, 0, ""));
        }
    }
View Full Code Here

     * Clicks on the drop down menu part of the <code>JideSplitButton</code>.
     */
    public void doClickOnMenu() {
        Action action = getActionMap().get("downPressed");
        if (action != null) {
            action.actionPerformed(new ActionEvent(this, 0, ""));
        }
    }
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.