Package net.sourceforge.processdash.ev

Examples of net.sourceforge.processdash.ev.EVTaskList$MergedTreeModel


    private Set<String> getRepeatedPersonNames() {
        Set<String> namesSeen = new HashSet<String>();
        Set<String> repeatedNames = new HashSet<String>();
        for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
            EVTaskList tl = rollup.getSubSchedule(i);
            String personName = extractPersonName(tl.getDisplayName());
            if (namesSeen.contains(personName))
                repeatedNames.add(personName);
            else
                namesSeen.add(personName);
        }
View Full Code Here


            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;
        }
       
View Full Code Here

        if (tl.getRoot() == possibleRoot)
            return tl;
        if (tl instanceof EVTaskListRollup) {
            EVTaskListRollup rtl = (EVTaskListRollup) tl;
            for (int i = ((EVTask) rtl.getRoot()).getNumChildren(); i-- > 0; ) {
                EVTaskList result = findTaskListWithRoot(rtl.getSubSchedule(i),
                        possibleRoot);
                if (result != null)
                    return result;
            }
        }
View Full Code Here

        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;

        String option;
        if (task == root) {
            // The selected node happens to be the root of some subschedule. No
            // filtering is needed;  just display the chart for that schedule.
            option = null;
        } else {
            // if the task isn't the schedule root, send subpath to the report
            option = EVReportSettings.PATH_FILTER_PARAM + "="
                    + HTMLUtils.urlEncode(subPath);
        }
        showReport(subSchedule.getTaskListName(), option, REPORT_URL);
    }
View Full Code Here

        private EVTaskDependency chooseTask(String taskListName) {
            if (taskListName == null)
                return null;

            EVTaskList tl = EVTaskList.openExisting(taskListName,
                    dashboardContext.getData(),
                    dashboardContext.getHierarchy(), dashboardContext
                            .getCache(), false);
            if (tl == null)
                return null;

            JTree tree = new JTree(tl);
            tree.expandRow(0);
            for (int i = tree.getRowCount(); i-- > 0;)
                tree.expandRow(i);
            tree.setRootVisible(false);
            tree.setToggleClickCount(3);
            new JOptionPaneClickHandler().install(tree);
            tree.getSelectionModel().setSelectionMode(
                    TreeSelectionModel.SINGLE_TREE_SELECTION);

            JScrollPane scrollPane = new JScrollPane(tree);
            scrollPane.setPreferredSize(new Dimension(200, 200));
            Object message = new Object[] {
                    resources.getString("Add.Select_Task_Instructions"),
                    scrollPane };
            int userReponse = JOptionPane.showConfirmDialog(dependencyTable,
                    message, resources.getString("Add.Window_Title"),
                    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());
View Full Code Here

            (dialog, resources.getString("Rename_Window.Title"),
             resources.format("Rename_Window.Prompt_FMT", taskListName),
             false);

        if (newName != null) {
            EVTaskList taskList = EVTaskList.openExisting
                (taskListName, dash.getData(), dash.getHierarchy(),
                 dash.getCache(), false);
            if (taskList != null)
                taskList.save(newName);
            refreshList();
            dialog.toFront();
        }
    }
View Full Code Here

        if (JOptionPane.showConfirmDialog
            (dialog, message, resources.getString("Delete_Window.Title"),
             JOptionPane.YES_NO_OPTION,
             JOptionPane.QUESTION_MESSAGE)
            == JOptionPane.YES_OPTION) {
            EVTaskList taskList = EVTaskList.openExisting
                (taskListName, dash.getData(), dash.getHierarchy(),
                 dash.getCache(), false);
            if (taskList != null)
                taskList.save(null);
            refreshList();
            dialog.toFront();
        }
    }
View Full Code Here

        if (taskListName == null)
            throw new IOException("No EV task list specified.");
       

        // Load and recalculate the named earned value model.
        EVTaskList evModel = EVTaskList.openExisting
            (taskListName,
             getDataRepository(),
             getPSPProperties(),
             getObjectCache(),
             false); // change notification not required
        if (evModel == null)
            throw new TinyCGIException(404, "Not Found",
                                       "No such task/schedule");
       
        EVTaskFilter taskFilter = settings.getEffectiveFilter(evModel);
       
        EVDependencyCalculator depCalc = new EVDependencyCalculator(
                getDataRepository(), getPSPProperties(), getObjectCache());
        evModel.setDependencyCalculator(depCalc);
        evModel.setTaskLabeler(new DefaultTaskLabeler(getDashboardContext()));
       
        evModel.recalc();
        EVSchedule schedule = evModel.getSchedule();

        String effDateParam = getParameter(EFF_DATE_PARAM);
        Date effDate = null;
        if (effDateParam != null) try {
            effDate = new Date(Long.parseLong(effDateParam));
View Full Code Here

            }
            out.print("</div>\n");
        } else {
            EVTaskListRollup parentEVModel = (EVTaskListRollup) evModel;
            for (int i = 0;  i < parentEVModel.getSubScheduleCount();  i++) {
                EVTaskList childModel = parentEVModel.getSubSchedule(i);
                String childName = EVTaskList.cleanupName(childModel
                        .getTaskListName());
                int childPurpose = (childModel instanceof EVTaskListRollup
                        ? SUB_REPORT : LEAF_REPORT);
                writeReport(childName, childModel, effDate, settings,
                    taskFilter, childPurpose);
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.ev.EVTaskList$MergedTreeModel

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.