Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.PropertyKey


            reloadScripts(getSelectedTreeNode());
        }

        /** Respond to a change in the selected tree node */
        public void valueChanged(TreeSelectionEvent e) {
            PropertyKey selectedNode = getSelectedTreeNode();
            if (!currentlyChangingTreeSelection)
                changeActiveTask(selectedNode);
            reloadScripts(selectedNode);
        }
View Full Code Here


                add(relaunchAction);
            add(new DeleteProjectAction());
        }

        public void valueChanged(TreeSelectionEvent e) {
            PropertyKey projectKey = getSelectedTreeNode();
            String templateID = ctx.getHierarchy().getID(projectKey);
            setEnabled(StringUtils.hasValue(templateID));
            relaunchAction.checkEnabledForProcess(templateID);
        }
View Full Code Here

        private void findNodeToMoveUp() {
            nodeParent = null;

            DashHierarchy hier = ctx.getHierarchy();
            PropertyKey selectedNode = getSelectedTreeNode();
            if (!StringUtils.hasValue(hier.getID(selectedNode)))
                return;

            Prop parent = hier.pget(selectedNode.getParent());
            int pos = parent.getChildPos(selectedNode) + nodeOffset;
            if (pos > 0 && pos < parent.getNumChildren()) {
                nodeParent = parent;
                childPosToMoveUp = pos;
            }
View Full Code Here

        public void checkEnabledForProcess(String templateID) {
            setEnabled(templateID != null && templateID.endsWith("/TeamRoot"));
        }

        public void actionPerformed(ActionEvent e) {
            PropertyKey projectKey = getSelectedTreeNode();
            String templateID = ctx.getHierarchy().getID(projectKey);
            checkEnabledForProcess(templateID);
            if (!isEnabled())
                return;

            StringBuilder uri = new StringBuilder();
            uri.append(HTMLUtils.urlEncodePath(projectKey.path()));

            int slashPos = templateID.indexOf('/');
            String processID = templateID.substring(0, slashPos);
            if (isRelaunchSupported(processID))
                uri.append("//").append(processID)
View Full Code Here

        public TreeTableModel getTaskSelectionChoices() {
            return this;
        }

        public Object getTreeNodeForPath(String path) {
            PropertyKey key = dash.getHierarchy().findExistingKey(path);
            return getNodeForKey(key);
        }
View Full Code Here

            key = hierarchy.findExistingKey(fullName);

        if (key != null) {
            int numKids = hierarchy.getNumChildren(key);
            for (int i = 0;   i < numKids;  i++) {
                PropertyKey child = hierarchy.getChildKey(key, i);
                children.add(new EVTask(this, taskListName,
                                        child.name(), child.path(), child,
                                        data, hierarchy, listener));
                addedChild = true;
            }
        }
        return addedChild;
View Full Code Here

        try {
            ListData hierItem = (ListData) context
                    .get(DashHierarchy.DATA_REPOSITORY_NAME);
            DashHierarchy hier = (DashHierarchy) hierItem.get(0);
           
            PropertyKey key = hier.findExistingKey(prefix);
            if (key == null) return null;
           
            String templateID = hier.getID(key);
            return StringData.create(templateID);
        } catch (Exception e) {
View Full Code Here

        return result;
    }

    private String findProjectWithID(PropertyKey parent, String projectID) {
        for (int i = ctx.getHierarchy().getNumChildren(parent); i-- > 0;) {
            PropertyKey node = ctx.getHierarchy().getChildKey(parent, i);

            // check to see if THIS node is the project we're looking for.
            String path = node.path();
            if (pathMatchesProjectID(path, projectID))
                return path;

            // Otherwise, recurse into children to look for the project.
            String childResult = findProjectWithID(node, projectID);
View Full Code Here

  String getSelectedPath() {
    DefaultMutableTreeNode selected = getSelectedNode();
    if (selected == null) return "";

    PropertyKey key = treeModel.getPropKey (useProps, selected.getPath());
    return (key == null ? "" : key.path());
  }
View Full Code Here

    applyFilter();
  }


  protected void reload () {
    PropertyKey pKey;
    Prop prop;
    DefectLog dl;
    String defLogName;
    Defect[] defects;
    defectLogs.clear();
    Enumeration pKeys = useProps.keys ();
    while (pKeys.hasMoreElements()) {
      pKey = (PropertyKey)pKeys.nextElement();
      prop = useProps.pget (pKey);
      defLogName = prop.getDefectLog ();
      if (defLogName != null && defLogName.length() != 0) {
        dl = new DefectLog (dashboard.getDirectory() + defLogName,
                            pKey.path(),
                            data);
        defects = dl.readDefects();
        defectLogs.put (pKey, new DefectListID (pKey, dl, defects));
      }
    }
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.