Package org.apache.jmeter.gui

Examples of org.apache.jmeter.gui.GuiPackage


        add(modulesPanel);
    }

    private void reinitialize() {
        nodesModel.removeAllElements();
        GuiPackage gp = GuiPackage.getInstance();
        JMeterTreeNode root;
        if (gp != null) {
            root = (JMeterTreeNode) GuiPackage.getInstance().getTreeModel().getRoot();
            buildNodesModel(root, "", 0); // $NON-NLS-1$
        }
View Full Code Here


    /**
     * @param selected JMeterTreeNode tree node to expand
     */
    protected void expandToSelectNode(JMeterTreeNode selected) {
        GuiPackage guiInstance = GuiPackage.getInstance();
        JTree jTree = guiInstance.getMainFrame().getTree();
        jTree.expandPath(new TreePath(selected.getPath()));
        selected.setMarkedBySearch(true);
    }
View Full Code Here

        // Stop action notifications while we shuffle this around:
        targetNodes.removeActionListener(this);

        targetNodesModel.removeAllElements();
        GuiPackage gp = GuiPackage.getInstance();
        JMeterTreeNode root;
        if (gp != null) {
            root = (JMeterTreeNode) GuiPackage.getInstance().getTreeModel().getRoot();
            targetNodesModel
                    .addElement(new TreeNodeWrapper(null, JMeterUtils.getResString("use_recording_controller"))); // $NON-NLS-1$
View Full Code Here

                JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE);
        if (isConfirm == JOptionPane.YES_OPTION) {
            // TODO - removes the nodes from the CheckDirty map - should it be done later, in case some can't be removed?
            ActionRouter.getInstance().actionPerformed(new ActionEvent(e.getSource(), e.getID(), ActionNames.CHECK_REMOVE));
            GuiPackage guiPackage = GuiPackage.getInstance();
            JMeterTreeNode[] nodes = guiPackage.getTreeListener().getSelectedNodes();
            TreePath newTreePath = // Save parent node for later
            guiPackage.getTreeListener().removedSelectedNode();
            for (int i = nodes.length - 1; i >= 0; i--) {
                removeNode(nodes[i]);
            }
            guiPackage.getTreeListener().getJTree().setSelectionPath(newTreePath);
            guiPackage.updateCurrentGui();
        }
    }
View Full Code Here

     *            the generic UI action event
     */
    @Override
    public void doAction(ActionEvent e) {
        if (ActionNames.TOOLBAR.equals(e.getActionCommand())) {
            GuiPackage guiInstance = GuiPackage.getInstance();
            if (guiInstance.getMenuItemToolbar().getModel().isSelected()) {
                guiInstance.getMainToolbar().setVisible(true);
            } else {
                guiInstance.getMainToolbar().setVisible(false);
            }
        }
    }
View Full Code Here

     *
     * @param engine
     *            remote engine object
     */
    private void initEngine(JMeterEngine engine) {
        GuiPackage gui = GuiPackage.getInstance();
        HashTree testTree = gui.getTreeModel().getTestPlan();
        JMeter.convertSubTree(testTree);
        testTree.add(testTree.getArray()[0], gui.getMainFrame());
        // Used for remote notification of threads start/stop,see BUG 54152
        testTree.add(testTree.getArray()[0], new RemoteThreadsListenerTestElement());
        engine.configure(testTree);
    }
View Full Code Here

    /**
     * @see Command#doAction(ActionEvent)
     */
    @Override
    public void doAction(ActionEvent e) {
        GuiPackage guiPack = GuiPackage.getInstance();
        JMeterTreeNode[] currentNodes = guiPack.getTreeListener().getSelectedNodes();

        currentNodes = Copy.keepOnlyAncestors(currentNodes);
        Copy.setCopiedNodes(currentNodes);
        for (JMeterTreeNode currentNode : currentNodes) {
            guiPack.getTreeModel().removeNodeFromParent(currentNode);
        }
        guiPack.getMainFrame().repaint();
    }
View Full Code Here

     *            the generic UI action event
     */
    @Override
    public void doAction(ActionEvent e) {
        boolean collapse=ActionNames.COLLAPSE_ALL.equals(e.getActionCommand());
        GuiPackage guiInstance = GuiPackage.getInstance();
        JTree jTree = guiInstance.getMainFrame().getTree();
        if (collapse){
            for (int i = jTree.getRowCount() - 1; i >= 0; i--) {
                 jTree.collapseRow(i);
            }
            return;
View Full Code Here

     *
    */
    private String getPassword() {
        String password = this.defaultpw;
        if (null == password) {
            final GuiPackage guiInstance = GuiPackage.getInstance();
            if (guiInstance != null) {
                synchronized (this) { // TODO is sync really needed?
                    this.defaultpw = JOptionPane.showInputDialog(
                            guiInstance.getMainFrame(),
                            JMeterUtils.getResString("ssl_pass_prompt")// $NON-NLS-1$
                            JMeterUtils.getResString("ssl_pass_title")// $NON-NLS-1$
                            JOptionPane.QUESTION_MESSAGE);
                    System.setProperty(KEY_STORE_PASSWORD, this.defaultpw);
                    password = this.defaultpw;
View Full Code Here

    /**
     * Start JMeter engine
     * @param noTimer ignore timers
     */
    private void startEngine(boolean ignoreTimer) {
        GuiPackage gui = GuiPackage.getInstance();
        HashTree testTree = gui.getTreeModel().getTestPlan();
        JMeter.convertSubTree(testTree);
        testTree.add(testTree.getArray()[0], gui.getMainFrame());
        log.debug("test plan before cloning is running version: "
                + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
        TreeCloner cloner = cloneTree(testTree, ignoreTimer);
        engine = new StandardJMeterEngine();
        engine.configure(cloner.getClonedTree());
        try {
            engine.runTest();
        } catch (JMeterEngineException e) {
            JOptionPane.showMessageDialog(gui.getMainFrame(), e.getMessage(),
                    JMeterUtils.getResString("error_occurred"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$
        }
        log.debug("test plan after cloning and running test is running version: "
                + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.gui.GuiPackage

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.