/** * Loads dragged file asking before for save if current open file is dirty. * @param e {@link ActionEvent} * @param file File to Load */ public static void loadProject(ActionEvent e, File file) { if(!Close.performAction(e)) { return; } Load.loadProjectFile(e, file, false); } }
/** * Start JMeter engine * @param ignoreTimer flag to ignore timers */ private void startEngine(boolean ignoreTimer) { startEngine(ignoreTimer, null); }
@Override public void actionPerformed(ActionEvent actionEvent) { setVisible(false); } };
/** * @param wordToSearch * @return */ private Searcher createSearcher(String wordToSearch) { if (isRegexpCB.isSelected()) { return new RegexpSearcher(isCaseSensitiveCB.isSelected(), wordToSearch); } else { return new RawTextSearcher(isCaseSensitiveCB.isSelected(), wordToSearch); } }
@Override public void doActionAfterCheck(ActionEvent e) { // We must ask the user if it is ok to close current project if (!Close.performAction(e)) { return; } // Load the file for this recent file command loadProjectFile(e, getRecentFile(e), false); }
/** * @param action {@link Class} * @param e {@link ActionEvent} */ protected void preActionPerformed(Class<? extends Command> action, ActionEvent e) { actionPerformed(action, e, preActionListeners); }
@Override public void actionPerformed(ActionEvent actionEvent) { setVisible(false); } };
/** * Allows an ActionListener to receive notification of a command being * executed after the command has executed. * * @param action * the Class of the command for which the listener will * notifications for. Class must extend * org.apache.jmeter.gui.action.Command. * @param listener * The {@link ActionListener} to be registered */ public void addPostActionListener(Class<?> action, ActionListener listener) { addActionListener(action, listener, postActionListeners); }
/** * Loads or merges a file into the current GUI, reporting any errors to the user. * If the file is a complete test plan, sets the GUI test plan file name * * @param e the event that triggered the action * @param f the file to load * @param merging if true, then try to merge the file into the current GUI. */ static void loadProjectFile(final ActionEvent e, final File f, final boolean merging) { loadProjectFile(e, f, merging, true); }
/** * This method performs the actual command processing. * * @param e * the generic UI action event */ @Override public void doActionAfterCheck(ActionEvent e) { performAction(e); }
/** * To execute an action immediately in the current thread. * * @param e * the action to execute */ public void doActionNow(ActionEvent e) { performAction(e); }
/** * Inserts the tree into the GUI. * Does not check if the previous tree has been saved. * Clears the existing GUI test plan if we are inserting a complete plan. * @param id the id for the ActionEvent that is created * @param tree the tree to load * @return true if the loaded tree was a full test plan * @throws IllegalUserActionException if the tree cannot be merged at the selected position or the tree is empty */ // Called by JMeter#startGui() public static boolean insertLoadedTree(final int id, final HashTree tree) throws IllegalUserActionException { return insertLoadedTree(id, tree, false); }
@Override public void stateChanged(ChangeEvent event) { populateTemplatePage(); }
/** * Allows an ActionListener to be removed from receiving notifications of a * command being executed after the command has executed. * * @param action * the Class of the command for which the listener will * notifications for. Class must extend * org.apache.jmeter.gui.action.Command. * @param listener The {@link ActionListener} that should be deregistered */ public void removePostActionListener(Class<?> action, ActionListener listener) { removeActionListener(action, listener, postActionListeners); }
public static JMeterTreeNode[] cloneTreeNodes(JMeterTreeNode[] nodes) { JMeterTreeNode[] treeNodes = new JMeterTreeNode[nodes.length]; for (int i = 0; i < nodes.length; i++) { treeNodes[i] = cloneTreeNode(nodes[i]); } return treeNodes; }
/** * Start JMeter engine * @param ignoreTimer flag to ignore timers * @param threadGroupsToRun Array of AbstractThreadGroup to run */ private void startEngine(boolean ignoreTimer, AbstractThreadGroup[] threadGroupsToRun) { startEngine(ignoreTimer, false, threadGroupsToRun); }
/** * @see org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest#doActionAfterCheck(ActionEvent) */ @Override public void doActionAfterCheck(ActionEvent e) { IODH.dialog.setVisible(true); }
/** * @param action {@link Class} * @param e {@link ActionEvent} */ protected void postActionPerformed(Class<? extends Command> action, ActionEvent e) { actionPerformed(action, e, postActionListeners); }
/** * @see Command#doAction(ActionEvent) */ @Override public void doAction(ActionEvent e) { dialog.setVisible(true); }
/** * Allows an ActionListener to receive notification of a command being * executed prior to the actual execution of the command. * * @param action * the Class of the command for which the listener will * notifications for. Class must extend * org.apache.jmeter.gui.action.Command. * @param listener * the ActionListener to receive the notifications */ public void addPreActionListener(Class<?> action, ActionListener listener) { addActionListener(action, listener, preActionListeners); }