Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.PropertyKey


        return node;
    }

    public boolean setNode(PropertyKey node) {
        if (node != null && hierarchy.containsKey(node)) {
            PropertyKey oldNode = this.node;
            this.node = node;
            propSupport.firePropertyChange("node", oldNode, node);
            return true;
        } else {
            return false;
View Full Code Here


    public boolean setPath(String path) {
        return setNode(hierarchy.findExistingKey(path));
    }

    public boolean setPhase(String phase) {
        PropertyKey parent = node.getParent();
        for (int i = hierarchy.getNumChildren(parent);  i-- > 0; )
            if (phase.equals(hierarchy.getChildName(parent, i)))
                return setNode(hierarchy.getChildKey(parent, i));
       
        return false;
View Full Code Here

       
        return false;
    }

    public boolean setNextPhase() {
        PropertyKey parent = node.getParent();
        PropertyKey nextNode = null;
        for (int i = hierarchy.getNumChildren(parent);  i-- > 0; ) {
            PropertyKey childKey = hierarchy.getChildKey(parent, i);
            if (node.equals(childKey))
                return setNode(nextNode);
            else
                nextNode = childKey;
        }
View Full Code Here

     * NOTE: currently, the children are placed in alphabetical order.
     */
    private static void createProcessRoot(DashHierarchy templates) {
        Enumeration nodes = templates.keys();
        Vector processes = new Vector();
        PropertyKey key, parent;
        while (nodes.hasMoreElements()) {
            key = (PropertyKey) nodes.nextElement();
            parent = key.getParent();
            if (parent != null && parent.equals(PropertyKey.ROOT))
                processes.add(key);
        }

        if (processes.size() > 0) {
View Full Code Here

    }
    public static long getTemplateTimestamp() { return templateTimestamp; }

    private static void createScriptMaps(DashHierarchy templates) {
        Enumeration nodes = templates.keys();
        PropertyKey key;
        while (nodes.hasMoreElements()) {
            key = (PropertyKey) nodes.nextElement();
            if (key.getParent().equals(PropertyKey.ROOT))
                addScriptMaps(templates, key, null, null);
        }
    }
View Full Code Here

    }


    private void importDefects(List defects) {
        DashHierarchy hier = dashboardContext.getHierarchy();
        PropertyKey defectLogKey = hier.findExistingKey(defectLogPath);
        ProcessDashboard dashboard = (ProcessDashboard) dashboardContext;
        String filename = hier.pget(defectLogKey).getDefectLog();
        if (!StringUtils.hasValue(filename)) {
            AbortImport.showError("Hierarchy_Changed", selectedPath);
            return;
View Full Code Here

            int selectedChild = hier.getSelectedChild(node);
            HierMenuItem selectedItem = null;
            allItems = new ArrayList<HierarchyNavigator.HierMenuItem>();

            for (int i = 0; i < numChildren; i++) {
                PropertyKey key = hier.getChildKey(node, i);
                HierMenuItem menuItem = new HierMenuItem(this, key);
                if (i == selectedChild || selectedItem == null)
                    selectedItem = menuItem;
                allItems.add(menuItem);
View Full Code Here

            int numChildren = hier.getNumChildren(node);
            if (numChildren != allItems.size())
                return true;

            for (int i = numChildren; i-- > 0;) {
                PropertyKey childKey = hier.getChildKey(node, i);
                if (!allItems.get(i).node.equals(childKey))
                    return true;
            }

            return false;
View Full Code Here

                }});
            return;
        }
       
        if (saveRevertOrCancel(false)) {
            PropertyKey selectedNode = getSelectedNode();
            showEditorFor(selectedNode);
            updateButtons();
        }
    }
View Full Code Here

        MacGUIUtils.setDirty(frame, isDirty);
    }

    private PropertyKey getSelectedNode() {
        TreePath selection = tree.getSelectionPath();
        PropertyKey selectedNode = null;
        if (selection != null)
            selectedNode = treeModel.getKeyForNode(selection.getLastPathComponent());
       
        return selectedNode;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.hier.PropertyKey

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.