Package net.sourceforge.ganttproject

Examples of net.sourceforge.ganttproject.GanttCalendar


        supertask.setCompletionPercentage(50);
        Task task1 = taskManager.createTask();
        Task task2 = taskManager.createTask();
        Task task3 = taskManager.createTask();
        //
        GanttCalendar commonStart = new GanttCalendar(2000, 01, 01);
        GanttCalendar commonEnd = new GanttCalendar(2000, 01, 05);
        task1.setStart(commonStart);
        task1.setEnd(commonEnd);
        task2.setStart(commonStart);
        task2.setEnd(commonEnd);
        task3.setStart(commonStart);
View Full Code Here


    protected void tearDown() throws Exception {
        super.tearDown();
        myTaskManager = null;
    }
    protected GanttCalendar newFriday() {
        return new GanttCalendar(2004, 9, 15);
    }
View Full Code Here

    protected GanttCalendar newFriday() {
        return new GanttCalendar(2004, 9, 15);
    }

    protected GanttCalendar newSaturday() {
        return new GanttCalendar(2004, 9, 16);
    }
View Full Code Here

    protected GanttCalendar newSaturday() {
        return new GanttCalendar(2004, 9, 16);
    }

    protected GanttCalendar newSunday() {
        return new GanttCalendar(2004, 9, 17);
    }
View Full Code Here

    protected GanttCalendar newSunday() {
        return new GanttCalendar(2004, 9, 17);
    }

    protected GanttCalendar newTuesday() {
        return new GanttCalendar(2004, 9, 19);
    }
View Full Code Here

    protected GanttCalendar newTuesday() {
        return new GanttCalendar(2004, 9, 19);
    }

    protected GanttCalendar newMonday() {
        return new GanttCalendar(2004, 9, 18);
    }
View Full Code Here

    protected GanttCalendar newMonday() {
        return new GanttCalendar(2004, 9, 18);
    }

    protected GanttCalendar newWendesday() {
        return new GanttCalendar(2004, 9, 20);
    }
View Full Code Here

*/
public class TestTaskActivitiesRecalculation extends TaskTestCase {
    public void testRecalculateOnChangingDurationByMutator() {
        Task task = getTaskManager().createTask();
        {
            task.setStart(new GanttCalendar(2000, 0, 3));
            task.setDuration(getTaskManager().createLength(1));
            TaskActivity[] activities = task.getActivities();
            assertEquals("Unexpected length of activities", 1,
                    activities.length);
            assertEquals("Unexpected end of the las activity",
                    new GanttCalendar(2000, 0, 4).getTime(), activities[0]
                            .getEnd());
        }
        //
        {
            TaskMutator mutator = task.createMutator();
            mutator.setDuration(getTaskManager().createLength(2));
            TaskActivity[] activities = task.getActivities();
            assertEquals("Unexpected length of activities", 1,
                    activities.length);
            assertEquals("Unexpected end of the last activity",
                    new GanttCalendar(2000, 0, 5).getTime(), activities[0]
                            .getEnd());
        }
    }
View Full Code Here

    }
   
    public void testRecalculateOnChangingStartByFixingDurationMutator() {
        Task task = getTaskManager().createTask();
        {
            task.setStart(new GanttCalendar(2000, 0, 3));
            task.setDuration(getTaskManager().createLength(3));
        }
        {
            TaskMutator mutator = task.createMutatorFixingDuration();
            mutator.setStart(new GanttCalendar(2000, 0, 4));
            mutator.commit();
            TaskActivity[] activities = task.getActivities();
            assertEquals("Unexpected length of activities", 1,
                    activities.length);
            assertEquals("Unexpected end of the last activity",
                    new GanttCalendar(2000, 0, 7).getTime(), activities[0]
                            .getEnd());
        }
    }
View Full Code Here

    public void testTaskScheduleEventIsSendOnTaskEndChange() {
        TaskManager taskManager = getTaskManager();
        Task task1 = taskManager.createTask();
        TaskListenerImpl listener = new TaskListenerImpl(taskManager);
        taskManager.addTaskListener(listener);
        GanttCalendar taskEnd = task1.getEnd().Clone();
        taskEnd.add(1);
        TaskMutator mutator = task1.createMutator();
        mutator.setEnd(taskEnd);
        mutator.commit();
        assertTrue("Listener has not been called on task end change", listener
                .hasBeenCalled());
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.GanttCalendar

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.