Package org.apache.jmeter.report.gui.tree

Examples of org.apache.jmeter.report.gui.tree.ReportTreeNode


public class ReportTreeModel extends DefaultTreeModel {

    private static final long serialVersionUID = 240L;

    public ReportTreeModel() {
        super(new ReportTreeNode(new ReportGui().createTestElement(), null));
        initTree();
    }
View Full Code Here


        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
        // disable the loaded node
        try {
            newNode.setEnabled(component.isEnabled());
        } catch (Exception e) { // TODO can this ever happen?
            newNode.setEnabled(true);
        }

        this.insertNodeInto(newNode, node, node.getChildCount());
        return newNode;
    }
View Full Code Here

            nodeList.add(node);
        }
        @SuppressWarnings("unchecked") // OK
        Enumeration<ReportTreeNode> enumNode = node.children();
        while (enumNode.hasMoreElements()) {
            ReportTreeNode child = enumNode.nextElement();
            traverseAndFind(type, child, nodeList);
        }
    }
View Full Code Here

            return node;
        }
        @SuppressWarnings("unchecked") // OK
        Enumeration<ReportTreeNode> enumNode = node.children();
        while (enumNode.hasMoreElements()) {
            ReportTreeNode child = enumNode.nextElement();
            ReportTreeNode result = traverseAndFind(userObject, child);
            if (result != null) {
                return result;
            }
        }
        return null;
View Full Code Here

    public HashTree getCurrentSubTree(ReportTreeNode node) {
        ListedHashTree hashTree = new ListedHashTree(node);
        @SuppressWarnings("unchecked") // OK
        Enumeration<ReportTreeNode> enumNode = node.children();
        while (enumNode.hasMoreElements()) {
            ReportTreeNode child = enumNode.nextElement();
            hashTree.add(node, getCurrentSubTree(child));
        }
        return hashTree;
    }
View Full Code Here

        initTree();
    }

    private void initTree() {
        TestElement rp = new ReportGui().createTestElement();
        this.insertNodeInto(new ReportTreeNode(rp, this),
                (ReportTreeNode) getRoot(), 0);
    }
View Full Code Here

     * object it encounters as it goes.
     */
    @Override
    public void addNode(Object node, HashTree subTree) {
        log.debug("Node is class:" + node.getClass());
        ReportTreeNode treeNode = (ReportTreeNode) node;
        if (checkMode) {
            if (previousGuiItems.containsKey(treeNode)) {
                if (!previousGuiItems.get(treeNode).equals(treeNode.getTestElement())) {
                    dirty = true;
                }
            } else {
                dirty = true;
            }
        } else if (removeMode) {
            previousGuiItems.remove(treeNode);
        } else {
            previousGuiItems.put(treeNode, (TestElement) treeNode.getTestElement().clone());
        }
    }
View Full Code Here

public class ReportTreeModel extends DefaultTreeModel {

    private static final long serialVersionUID = 240L;

    public ReportTreeModel() {
        super(new ReportTreeNode(new ReportGui().createTestElement(), null));
        initTree();
    }
View Full Code Here

        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
        // disable the loaded node
        try {
            if (component.getProperty(TestElement.ENABLED) instanceof NullProperty
                    || component.getPropertyAsBoolean(TestElement.ENABLED)) {
                newNode.setEnabled(true);
            } else {
                newNode.setEnabled(false);
            }
        } catch (Exception e) {
            newNode.setEnabled(true);
        }

        this.insertNodeInto(newNode, node, node.getChildCount());
        return newNode;
    }
View Full Code Here

            nodeList.add(node);
        }
        @SuppressWarnings("unchecked") // OK
        Enumeration<ReportTreeNode> enumNode = node.children();
        while (enumNode.hasMoreElements()) {
            ReportTreeNode child = enumNode.nextElement();
            traverseAndFind(type, child, nodeList);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.report.gui.tree.ReportTreeNode

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.