Package net.sourceforge.processdash.ev

Examples of net.sourceforge.processdash.ev.EVTaskDependency


                tl.recalc();
                List l = tl.findTasksByFullName(taskPath);
                if (l != null && l.size() == 1) {
                    EVTask t = (EVTask) l.get(0);
                    for (Iterator i = dependencies.iterator(); i.hasNext();) {
                        EVTaskDependency d = (EVTaskDependency) i.next();
                        d.loadParentDate(t);
                    }
                }
            }

            // an immediate change to the dashboard will cause the window to
View Full Code Here


        if (value instanceof Collection) {
            for (Iterator i = ((Collection) value).iterator(); i.hasNext();) {
                Object obj = i.next();
                if (obj instanceof EVTaskDependency) {
                    EVTaskDependency d = (EVTaskDependency) obj;
                    // reverse dependencies aren't editable - skip over them
                    if (!d.isReverse())
                        dependencies.add(d)
                }
            }
        }
View Full Code Here

    private class DependencyTableCellRenderer extends DefaultTableCellRenderer {

        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus, int row,
                int column) {
            EVTaskDependency d = (EVTaskDependency) value;
            String name = null;
            if (d != null) {
                name = d.getDisplayName();
                if (name == null)
                    name = resources.getString("Dependency.Unresolved.Text");
            }

            Component result = super.getTableCellRendererComponent(table, name,
                    isSelected, hasFocus, row, column);

            if (d != null && d.isUnresolvable()) {
                setForeground(Color.red);
                setToolTipText(resources
                        .getString("Dependency.Unresolved.Explanation"));
            } else {
                setForeground(Color.black);
View Full Code Here

            super(resources.getDlgString("Buttons.Add_Dependency"));
        }

        public void actionPerformed(ActionEvent e) {
            String taskListName = chooseTaskList();
            EVTaskDependency d = chooseTask(taskListName);
            dependencyTableModel.addDependency(d);
        }
View Full Code Here

                String taskID = EVTaskDependencyResolver.getIdForTask(task,
                        tl.getID());
                System.out.println("taskID is " + taskID);
                if (taskID == null)
                    return null;
                EVTaskDependency d = new EVTaskDependency(taskID, task
                        .getFullName());
                d.setTaskListName(taskListName);
                return d;
            }
            return null;
        }
View Full Code Here

        hasMisorderedIncomplete = false;
        hasMisorderedReverse = false;

        if (dependencies != null)
            for (Iterator i = dependencies.iterator(); i.hasNext();) {
                EVTaskDependency d = (EVTaskDependency) i.next();
                hasDependency = true;
                if (d.isUnresolvable()) {
                    hasError = true;
                } else if (d.isReverse()) {
                    if (d.isIncomplete()) {
                        hasReverse = true;
                        if (d.isMisordered())
                            hasMisorderedReverse = true;
                    } else {
                        hasCompletedReverse = true;
                    }
                } else if (d.getPercentComplete() < 1.0) {
                    hasIncomplete = true;
                    if (d.isMisordered())
                        hasMisorderedIncomplete = true;
                }
            }
    }
View Full Code Here

        descr.append("<table");
        if (tableAttrs != null)
            descr.append(" ").append(tableAttrs);
        descr.append(">");
        for (Iterator i = dependencies.iterator(); i.hasNext();) {
            EVTaskDependency d = (EVTaskDependency) i.next();
            descr.append("<tr><td ");
            if (d.isUnresolvable()) {
                if (includeTooltips)
                    descr.append(getTooltip(HAS_ERROR));
                descr.append("style='text-align:center; "
                        + "color:red; font-weight:bold'>")
                        .append(resources.getHTML("Dependency.Unresolved.Text"))
                        .append("</td>");
            } else if (d.isReverse()) {
                if (d.isIncomplete() == false) {
                    if (includeTooltips)
                        descr.append(getTooltip(HAS_COMPLETED_REVERSE));
                    descr.append("style='text-align:center'><img src='")
                        .append(checkUrl).append("'></td>");
                } else if (d.isMisordered()) {
                    if (includeTooltips)
                        descr.append(getTooltip(HAS_MISORDERED_REVERSE));
                    descr.append("style='text-align:center'><img src='")
                        .append(misorderedReverseUrl).append("'></td>");
                } else {
                    if (includeTooltips)
                        descr.append(getTooltip(HAS_REVERSE));
                    descr.append("style='text-align:center'><img src='")
                        .append(reverseUrl).append("'></td>");
                }
            } else if (d.isIncomplete()) {
                if (d.isMisordered()) {
                    if (includeTooltips)
                        descr.append(getTooltip(HAS_MISORDERED_INCOMPLETE));
                    descr.append("style='text-align:center'><img src='")
                            .append(misorderedUrl).append("'></td>");
                } else {
                    if (includeTooltips)
                        descr.append(getTooltip(HAS_INCOMPLETE));
                    descr.append("style='text-align:center'><img src='")
                            .append(stopUrl).append("'></td>");
                }
            } else {
                if (includeTooltips)
                    descr.append(getTooltip(ALL_COMPLETE));
                descr.append("style='text-align:center'><img src='")
                        .append(checkUrl).append("'></td>");
            }
            descr.append("<td style='text-align:left' nowrap>");
            if (d.isReverse()) {
                String key;
                if (d.isIncomplete() == false) {
                    key = "Dependency.Reverse_Completed.Display";
                } else if (d.isMisordered()) {
                    key = "Dependency.Reverse_Misordered.Display";
                } else {
                    key = "Dependency.Reverse.Display";
                }
                descr.append(resources.getHTML(key));
            }else
                descr.append(nvl(d.getDisplayName()));
            descr.append(getBriefDetails(d, sep, hideNames));
            descr.append("</td></tr>");
        }
        descr.append("</table>");
        if (includeBodyTags)
View Full Code Here

                    return;
               
                List predIDs = new LinkedList();
                for (Iterator i = dependencies.iterator(); i.hasNext();) {
                    // find the dashboard task named by each dependency.
                    EVTaskDependency d = (EVTaskDependency) i.next();
                    String dashTaskID = d.getTaskID();
                    Object predTask = taskIDs.get(dashTaskID);
                    if (predTask == null) continue;
                    // look up the ID number we assigned to it in this CSV
                    // export file, and add that ID number to our list.
                    Object csvIdNumber = idNumbers.get(predTask);
View Full Code Here

        boolean beforeCutoff = compareDates(projDate, cutoffDate) <= 0;
        Collection deps = (Collection) tasks.getValueAt(taskRowNum,
                EVTaskList.DEPENDENCIES_COLUMN);
        if (deps != null) {
            for (Iterator j = deps.iterator(); j.hasNext();) {
                EVTaskDependency d = (EVTaskDependency) j.next();
                // skip unresolvable and reverse dependencies
                if (d.isUnresolvable() || d.isReverse())
                    continue;
                // skip dependencies that have been satisfied
                if (!(d.getPercentComplete() < 1))
                    continue;
                // don't warn an individual when he depends on himself
                if (ignoreIndividual != null
                        && ignoreIndividual.equals(d.getAssignedTo()))
                    continue;

                if (d.isMisordered() || beforeCutoff) {
                    String taskID = d.getTaskID();
                    DependencyForCoord coord = upcomingDependencies.get(taskID);
                    if (coord == null) {
                        coord = new DependencyForCoord(d);
                        upcomingDependencies.put(taskID, coord);
                    }
View Full Code Here

            Date cutoffDate, int taskRowNum) {
        Collection deps = (Collection) tasks.getValueAt(taskRowNum,
            EVTaskList.DEPENDENCIES_COLUMN);
        if (deps != null) {
            for (Iterator j = deps.iterator(); j.hasNext();) {
                EVTaskDependency d = (EVTaskDependency) j.next();
                if (!d.isReverse())
                    continue;
                if (d.isMisordered() ||
                        compareDates(d.getProjectedDate(), cutoffDate) <= 0) {
                    RevDependencyForCoord revDep = new RevDependencyForCoord(
                            taskRowNum, d);
                    reverseDependencies.add(revDep);
                }
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.ev.EVTaskDependency

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.