Examples of JMeterGUIComponent


Examples of org.apache.jmeter.gui.JMeterGUIComponent

  protected void convertSubTree(HashTree tree)
  {
    Iterator iter = new LinkedList(tree.list()).iterator();
    while (iter.hasNext())
    {
      JMeterGUIComponent item = (JMeterGUIComponent)iter.next();
      if(item.isEnabled())
      {
        convertSubTree(tree.getTree(item));
        TestElement testElement = item.createTestElement();
        tree.replace(item,testElement);
      }
      else
      {
        tree.remove(item);
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

   * The tree traverses itself depth-first, calling processNode for each object
   * it encounters as it goes.
   */
  public void addNode(Object node,HashTree subTree)
  {
    JMeterGUIComponent treeNode = (JMeterGUIComponent)node;
    if(checkMode)
    {
      if(previousGuiItems.containsKey(treeNode))
      {
        if(!previousGuiItems.get(treeNode).equals(
            treeNode.createTestElement()))
        {
          dirty = true;
        }
      }
      else
      {
        dirty = true;
      }
    }
    else if(removeMode)
    {
      previousGuiItems.remove(treeNode);
    }
    else
    {
      previousGuiItems.put(treeNode,treeNode.createTestElement());
    }
  }
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

    }

    @Override
    public void doAction(ActionEvent e) {
        GuiPackage guiPackage = GuiPackage.getInstance();
        JMeterGUIComponent currentGui = guiPackage.getCurrentGui();
        guiPackage.getMainFrame().setMainPanel((javax.swing.JComponent) currentGui);
        guiPackage.getMainFrame().setEditMenu(guiPackage.getTreeListener().getCurrentNode().createPopupMenu());
        // TODO: I believe the following code (to the end of the method) is
        // obsolete,
        // since NamePanel no longer seems to be the GUI for any component:
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

                    continue;
                }

                boolean hideBean = false; // Should the TestBean be hidden?

                JMeterGUIComponent item;
                try {
                    Class<?> c = Class.forName(name);
                    if (TestBean.class.isAssignableFrom(c)) {
                        TestBeanGUI tbgui = new TestBeanGUI(c);
                        hideBean = tbgui.isHidden() || (tbgui.isExpert() && !JMeterUtils.isExpertMode());
                        item = tbgui;
                    } else {
                        item = (JMeterGUIComponent) c.newInstance();
                    }
                } catch (NoClassDefFoundError e) {
                    log.warn("Missing jar? Could not create " + name + ". " + e);
                    continue;
                } catch (Throwable e) {
                    log.warn("Could not instantiate " + name, e);
                    if (e instanceof Error){
                        throw (Error) e;
                    }
                    if (e instanceof RuntimeException){
                        if (!(e instanceof HeadlessException)) { // Allow headless testing
                            throw (RuntimeException) e;
                        }
                    }
                    continue;
                }
                if (hideBean || elementsToSkip.contains(item.getStaticLabel())) {
                    log.info("Skipping " + name);
                    continue;
                } else {
                    elementsToSkip.add(name); // Don't add it again
                }
                Collection<String> categories = item.getMenuCategories();
                if (categories == null) {
                    log.debug(name + " participates in no menus.");
                    continue;
                }
                if (categories.contains(THREADS)) {
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

        GuiPackage guiPackage = GuiPackage.getInstance();
        if (guiPackage != null) {
            // The node can be added in non GUI mode at startup
            guiPackage.updateCurrentNode();
            JMeterGUIComponent guicomp = guiPackage.getGui(component);
            guicomp.configure(component);
            guicomp.modifyTestElement(component);
            guiPackage.getCurrentGui(); // put the gui object back
                                        // to the way it was.
        }
        JMeterTreeNode newNode = new JMeterTreeNode(component, this);
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

  public Set getActionNames() {
    return commands;
  }

  public void doAction(ActionEvent e) throws IllegalUserActionException {
    JMeterGUIComponent component = null;
    JComponent comp = null;
    if (!commands.contains(e.getActionCommand())) {
      throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand());
    }
    if (e.getActionCommand().equals(SAVE_GRAPHICS)) {
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

         */
        if (name.endsWith("JMeterTreeNode") || name.endsWith("TestBeanGUI")) {
          continue;// Don't try to instantiate these
        }

        JMeterGUIComponent item;
        try {
          Class c = Class.forName(name);
          if (TestBean.class.isAssignableFrom(c)) {
            item = new TestBeanGUI(c);
          } else {
            item = (JMeterGUIComponent) c.newInstance();
          }
        } catch (NoClassDefFoundError e) {
          log.warn("Missing jar? Could not create " + name + ". " + e);
          continue;
        } catch (Throwable e) {
          log.warn("Could not instantiate " + name, e);
          continue;
        }
        if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) {
          log.info("Skipping " + name);
          continue;
        } else {
          elementsToSkip.add(name);
        }
        Collection categories = item.getMenuCategories();
        if (categories == null) {
          log.debug(name + " participates in no menus.");
          continue;
        }

        if (categories.contains(POST_PROCESSORS)) {
          postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(PRE_PROCESSORS)) {
          preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(CONTROLLERS)) {
          controllers.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(NON_TEST_ELEMENTS)) {
          nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(LISTENERS)) {
          listeners.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(CONFIG_ELEMENTS)) {
          configElements.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(TABLES)) {
          tables.add(new MenuInfo(item.getStaticLabel(), name));
        }

        if (categories.contains(REPORT_PAGE)) {
          reportPage.add(new MenuInfo(item.getStaticLabel(), name));
        }
      }
    } catch (Exception e) {
      log.error("", e);
    }
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

    }
    component.setProperty(TestElement.GUI_CLASS, NameUpdater
        .getCurrentName(component
            .getPropertyAsString(TestElement.GUI_CLASS)));
    ReportGuiPackage.getInstance().updateCurrentNode();
    JMeterGUIComponent guicomp = ReportGuiPackage.getInstance().getGui(component);
    guicomp.configure(component);
    guicomp.modifyTestElement(component);
    ReportGuiPackage.getInstance().getCurrentGui(); // put the gui object back
    // to the way it was.
    ReportTreeNode newNode = new ReportTreeNode(component, this);

    // This check the state of the TestElement and if returns false it
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

    GuiPackage guiPackage = GuiPackage.getInstance();
    if (guiPackage != null) {
      // The node can be added in non GUI mode at startup
      guiPackage.updateCurrentNode();
      JMeterGUIComponent guicomp = guiPackage.getGui(component);
      guicomp.configure(component);
      guicomp.modifyTestElement(component);
      guiPackage.getCurrentGui(); // put the gui object back
                    // to the way it was.
    }
    JMeterTreeNode newNode = new JMeterTreeNode(component, this);
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

  public Set getActionNames() {
    return commands;
  }

  public void doAction(ActionEvent e) throws IllegalUserActionException {
    JMeterGUIComponent component = null;
    JComponent comp = null;
    if (!commands.contains(e.getActionCommand())) {
      throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand());
    }
    if (e.getActionCommand().equals(ActionNames.SAVE_GRAPHICS)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.