Examples of EVTask


Examples of net.sourceforge.processdash.ev.EVTask

        }
    }

    private void setSelectedTasksTreeView(List<EVTask> tasks) {
        treeTable.clearSelection();
        EVTask t = tasks.get(0);
        TreePath path = new TreePath(t.getPath());
        treeTable.getTree().makeVisible(path);
        int row = treeTable.getTree().getRowForPath(path);
        if (row != -1) {
            treeTable.getSelectionModel().addSelectionInterval(row, row);
            scrollToRow(row);
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

        TreePath selectionPath = treeTable.getTree().getSelectionPath();
        if (selectionPath == null) return;
       
        // If the user has selected a node in the tree that has no siblings,
        // we can move up a generation and start the filtering there.
        EVTask task = (EVTask) selectionPath.getLastPathComponent();
        EVTask parent = task.getParent();
        while (parent != null && parent.getNumChildren() == 1) {
            task = parent;
            parent = task.getParent();
        }

        // The "filtered" node selected was really a sole descendant of the
        // main task list.  We can just display the regular, unfiltered chart.
        if (parent == null) {
            showChart();
            return;
        }
       
        // The selected node happens to be the root of some subschedule. No
        // filtering is needed;  just display the chart for that schedule.
        EVTaskList subSchedule = findTaskListWithRoot(model, task);
        if (subSchedule != null) {
            new TaskScheduleChart(subSchedule, null, dash);
            return;
        }
       
        // Construct a string describing the filtered path
        StringBuffer filteredPath = new StringBuffer();
        for (int i = 1;  i < selectionPath.getPathCount();  i++) {
            EVTask t = (EVTask) selectionPath.getPathComponent(i);
            filteredPath.append("/").append(t.getName());
            if (t == task) break;
        }
       
        // Build an appropriate filter, and use it to launch a chart window
        TaskFilter filter = new TaskFilter(filteredPath.substring(1),
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

        if (!saveOrCancel(true))
            return;
       
        // If the user has selected a node in the tree that has no siblings,
        // we can move up a generation and start the filtering there.
        EVTask task = (EVTask) selectionPath.getLastPathComponent();
        EVTask parent = task.getParent();
        while (parent != null && parent.getNumChildren() == 1) {
            task = parent;
            parent = task.getParent();
        }

        // The "filtered" node selected was really a sole descendant of the
        // main task list.  We can just display the regular, unfiltered chart.
        if (parent == null) {
            showReport(taskListName);
            return;
        }

        // In merged view, calculate the report parameters for the selected
        // node and launch the report.
        if (isMergedView()) {
            String option = EVReportSettings.MERGED_PATH_FILTER_PARAM + "="
                    + HTMLUtils.urlEncode(getMergedPathFilterParam(task));
            showReport(taskListName, option, REPORT_URL);
            return;
        }

        // find the root of the task list containing the selected node.
        EVTask root = task;
        String subPath = null;
        while (root != null && root.getFlag() == null) {
            subPath = root.getName() + (subPath == null ? "" : "/" + subPath);
            root = root.getParent();
        }
        EVTaskList subSchedule = findTaskListWithRoot(model, root);
        if (subSchedule == null)
            return;
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

        this.madeChange = false;

        JTreeTable jTreeTable = (JTreeTable) table;
        JTree jTree = jTreeTable.getTree();
        TreePath path = jTree.getPathForRow(row);
        EVTask node = null;
        if (path != null) {
            if (path.getLastPathComponent() instanceof EVTask)
                node = (EVTask) path.getLastPathComponent();
            this.taskName = node.getFullName();
        }

        if (value instanceof Collection) {
            for (Iterator i = ((Collection) value).iterator(); i.hasNext();) {
                Object obj = i.next();
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

                    JOptionPane.OK_CANCEL_OPTION);
            if (userReponse == JOptionPane.OK_OPTION) {
                TreePath path = tree.getSelectionPath();
                if (path == null)
                    return null;
                EVTask task = (EVTask) path.getLastPathComponent();
                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

Examples of net.sourceforge.processdash.ev.EVTask

            } else {
                taskKey = task.getFullName();
            }
            String keyToUse = taskKey;

            EVTask other = tasksByKey.get(taskKey);
            if (other != null) {
                shouldRegisterTaskIDs = false;
                if (other == task.getParent()) {
                    String who = task.getAssignedToText();
                    int personId = personUidMapper.getIdNoCreate(who);
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

            columns = createCsvColumns();
            writeCsvColumnHeaders(columns);
        }
       
        TreeTableModel merged = evModel.getMergedModel(false, false, null);
        EVTask root = (EVTask) merged.getRoot();
        prepCsvColumns(columns, root, root, 1);
        writeCsvRows(columns, root, 1);
    }
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

    private Set<Integer> getProjectKeys(TableModel tasks, ProjectLocator loc) {
        // scan the tasks in the plan and make a list of the IDs for the
        // team projects they come from
        Set<String> projectIDs = new HashSet();
        for (int i = tasks.getRowCount(); i-- > 0;) {
            EVTask task = (EVTask) tasks.getValueAt(i,
                EVTaskList.EVTASK_NODE_COLUMN);
            List<String> taskIds = task.getInheritedTaskIDs();
            if (!taskIds.isEmpty()) {
                // only use the first task ID.  Subsequent IDs will be for
                // master projects, which have no database representation.
                String taskId = taskIds.get(0);
                int colonPos = taskId.indexOf(':');
View Full Code Here

Examples of net.sourceforge.processdash.ev.EVTask

                Double timeFromPath = timeForPerson.remove(taskPath);
                if (timeFromPath != null)
                    return timeFromPath;
            }

            EVTask task = (EVTask) tasks.getValueAt(i,
                EVTaskList.EVTASK_NODE_COLUMN);
            String taskId = task.getFullTaskID();
            Double timeFromId = timeForPerson.remove(taskId);
            return (timeFromId == null ? 0 : timeFromId);

        } finally {
            if (timeForPerson.isEmpty())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.