Search in sources :

Example 6 with EVTaskDependency

use of net.sourceforge.processdash.ev.EVTaskDependency in project processdash by dtuma.

the class EVWeekReport method printUpcomingDependencies.

protected void printUpcomingDependencies(DependencyForCoord coord, TableModel tasks, boolean showAssignedTo, boolean hideNames, boolean showMilestones, boolean showLabels, int pos) {
    boolean isExcel = isExportingToExcel();
    EVTaskDependency d = coord.d.clone();
    out.print("<div class='expanded'>");
    printExpansionIcon();
    out.println(encodeHTML(d.getDisplayName()));
    if (!isExcel) {
        out.print("<span class='hideIfExpanded'>");
        out.print(TaskDependencyAnalyzer.getBriefDetails(d, TaskDependencyAnalyzer.HTML_SEP, hideNames));
        out.println("</span>");
    }
    out.println("<div class='dependDetail hideIfCollapsed'>");
    interpOut("<b>${Columns.Percent_Complete_Tooltip}:</b> ");
    out.println(formatPercent(d.getPercentComplete()));
    interpOut("<br><b>${Columns.Projected_Date}:</b> ");
    out.println(encodeHTML(d.getProjectedDate()));
    if (!hideNames) {
        interpOut("<br><b>${Columns.Assigned_To}:</b> ");
        out.println(encodeHTML(d.getAssignedTo()));
    }
    // Now, print a table of the dependent tasks.
    interpOut("<table border=1 class='sortable' id='$$$_dep_" + pos + "'><tr>" + "<td class=header>${Columns.Needed_For}</td>" + "<td class=header>${Columns.Projected_Date}</td>");
    if (showMilestones)
        interpOut("<td class=header>${Columns.Milestone}</td>");
    if (showLabels)
        interpOut("<td class=header>${Columns.Labels}</td>");
    if (showAssignedTo)
        interpOut("<td class=header>${Columns.Needed_By}</td>");
    out.println("</tr>");
    Collections.sort(coord.matchingTasks);
    for (RowNumWithDate taskMatch : coord.matchingTasks) {
        int i = taskMatch.rowNumber;
        out.print("<tr><td class='left'>");
        out.print(encodeHTML(tasks.getValueAt(i, EVTaskList.TASK_COLUMN)));
        out.print("</td>");
        d.loadParentDate(tasks.getValueAt(i, EVTaskList.EVTASK_NODE_COLUMN));
        printDateCell(d.getParentDate(), TaskDependencyAnalyzer.HTML_INCOMPLETE_MISORD_IND, d.isMisordered());
        if (showMilestones) {
            out.print("<td class='left'>");
            out.print(encodeHTML(tasks.getValueAt(i, EVTaskList.MILESTONE_COLUMN)));
            out.print("</td>");
        }
        if (showLabels) {
            out.print("<td class='left'>");
            out.print(encodeHTML(tasks.getValueAt(i, EVTaskList.LABELS_COLUMN)));
            out.print("</td>");
        }
        if (showAssignedTo) {
            out.print("<td class='left'>");
            out.print(encodeHTML(tasks.getValueAt(i, EVTaskList.ASSIGNED_TO_COLUMN)));
            out.print("</td>");
        }
        out.println("</tr>");
    }
    out.println("</table></div></div>");
    out.println("<br>");
}
Also used : EVTaskDependency(net.sourceforge.processdash.ev.EVTaskDependency)

Aggregations

EVTaskDependency (net.sourceforge.processdash.ev.EVTaskDependency)6 Iterator (java.util.Iterator)5 Collection (java.util.Collection)3 ArrayList (java.util.ArrayList)2 EVTask (net.sourceforge.processdash.ev.EVTask)2 EnumerIterator (net.sourceforge.processdash.util.EnumerIterator)2 Component (java.awt.Component)1 Date (java.util.Date)1 EventObject (java.util.EventObject)1 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 JLabel (javax.swing.JLabel)1 JTree (javax.swing.JTree)1 TreePath (javax.swing.tree.TreePath)1 EVTaskList (net.sourceforge.processdash.ev.EVTaskList)1 MilestoneList (net.sourceforge.processdash.ev.MilestoneList)1 CachedURLObject (net.sourceforge.processdash.net.cache.CachedURLObject)1