Examples of GPCalendar


Examples of net.sourceforge.ganttproject.calendar.GPCalendar

                    .getVisibleTasks();

            for (int i = 0; i < visibleTasks.size(); i++) {
                Task task = (Task) visibleTasks.get(i);
                int index = getPreviousStateTaskIndex(task);
                GPCalendar calendar = myModel.getTaskManager().getCalendar();
                if (index != -1) {
                    GanttPreviousStateTask previousStateTask = (GanttPreviousStateTask) myPreviousStateTasks
                            .get(index);
                    previousStateTask.setState(task, calendar);
                    if (previousStateTask.getStart().after(unitFinish)) {
                        myPreviousStateCurrentlyProcessed.add(null);
                    } else if (previousStateTask.getStart().getTime()
                            .compareTo(unitStart) >= 0
                            && previousStateTask.getStart().getTime()
                                    .compareTo(unitFinish) < 0)
                    // )|| previousStateTask.getEnd(
                    // calendar)
                    // .getTime().compareTo(unitStart) > 0
                    // && previousStateTask.getEnd(
                    // calendar)
                    // .getTime().compareTo(unitFinish) < 0)
                    {
                        myPreviousStateCurrentlyProcessed
                                .add(previousStateTask);
                        myPreviousStateTasks.remove(index);
                    }
                    // if just a part of the previous task is visible
                    else if (previousStateTask.getStart().getTime().compareTo(
                            unitStart) < 0
                            && (previousStateTask.getEnd(calendar).getTime()
                                    .compareTo(unitStart) > 0)) {
                        GanttCalendar newStart = new GanttCalendar(unitStart);
                        int id = previousStateTask.getId();
                        int duration = previousStateTask.getDuration()
                                - newStart.diff(previousStateTask.getStart());
                        int diff = newStart.diff(previousStateTask.getStart());
                        for (int j = 0; j < diff; j++) {
                            if (calendar.isNonWorkingDay(previousStateTask
                                    .getStart().newAdd(j).getTime())) {
                                duration++;
                            }
                        }
                        boolean isMilestone = previousStateTask.isMilestone();
View Full Code Here

Examples of net.sourceforge.ganttproject.calendar.GPCalendar

        }
        myLength = getManager().createLength(myLength.getTimeUnit(), length);
    }

    private void recalculateActivities(List output, Date startDate, Date endDate) {
        GPCalendar calendar = myManager.getConfig().getCalendar();
        List activities = calendar.getActivities(startDate, endDate);
        output.clear();
        for (int i = 0; i < activities.size(); i++) {
            GPCalendarActivity nextCalendarActivity = (GPCalendarActivity) activities
                    .get(i);
            TaskActivityImpl nextTaskActivity;
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.