Package org.apache.jmeter.gui

Examples of org.apache.jmeter.gui.GuiPackage


        // 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


    }

    private void reinitialize() {
        TreeNodeWrapper current;
        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

    }

    public void startHttpMirror() {
        server = new HttpMirrorServer(getPort());
        server.start();
        GuiPackage instance = GuiPackage.getInstance();
        if (instance != null) {
            instance.register(server);
        }
    }
View Full Code Here

    }

    public void stopHttpMirror() {
        if (server != null) {
            server.stopServer();
            GuiPackage instance = GuiPackage.getInstance();
            if (instance != null) {
                instance.unregister(server);
            }
            try {
                server.join(1000); // wait for server to stop
            } catch (InterruptedException e) {
            }
View Full Code Here

   *  Description of the Method
   *
   *@param  gui  Description of Parameter
   */
  private void startEngine() {
    GuiPackage gui = GuiPackage.getInstance();
    Collection groups = TestPlan.createTestPlan(null).compileTestPlan();
    engine = new StandardJMeterEngine();
    for (Iterator i = groups.iterator(); i.hasNext(); ) {
      engine.addThreadGroup((ThreadGroup) i.next());
    }
    gui.getMainFrame().setRunning(true);
    engine.runTest();
  }
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
View Full Code Here

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

     Copy.setCopiedNodes(currentNodes);
     for(int i=0;i<currentNodes.length;i++) {
           guiPack.getTreeModel().removeNodeFromParent(currentNodes[i]);
     }
        guiPack.getMainFrame().repaint();
    }
View Full Code Here

        }
    }

    protected void startEngine()
    {
        GuiPackage gui = GuiPackage.getInstance();
        engine = new StandardJMeterEngine();
        HashTree testTree = gui.getTreeModel().getTestPlan();
        convertSubTree(testTree);
        DisabledComponentRemover remover =
            new DisabledComponentRemover(testTree);
        testTree.traverse(remover);
        testTree.add(testTree.getArray()[0], gui.getMainFrame());
        log.debug(
            "test plan before cloning is running version: "
                + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
        TreeCloner cloner = new TreeCloner(false);
        testTree.traverse(cloner);
        engine.configure(cloner.getClonedTree());
        try
        {
            engine.runTest();
        }
        catch (JMeterEngineException e)
        {
            JOptionPane.showMessageDialog(
                gui.getMainFrame(),
                e.getMessage(),
                JMeterUtils.getResString("Error Occurred"),
                JOptionPane.ERROR_MESSAGE);
        }
        log.debug(
View Full Code Here

            GuiPackage.getInstance().getTreeModel().getTestPlan().traverse(
                this);
        }
        else if (action.equals(REMOVE))
        {
            GuiPackage guiPackage = GuiPackage.getInstance();
            JMeterTreeNode[] nodes =
                guiPackage.getTreeListener().getSelectedNodes();
            removeMode = true;
            for (int i = nodes.length - 1; i >= 0; i--)
            {
                guiPackage.getTreeModel().getCurrentSubTree(nodes[i]).traverse(
                    this);
            }
            removeMode = false;
        }
        checkMode = true;
View Full Code Here

        }
    }

    private void enableComponents(JMeterTreeNode[] nodes, boolean enable)
    {
      GuiPackage pack = GuiPackage.getInstance();
      for(int i=0;i<nodes.length;i++)
      {
        nodes[i].setEnabled(enable);
        pack.getGui(nodes[i].getTestElement()).setEnabled(enable);
      }
    }
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.