Package net.sourceforge.ganttproject.chart

Examples of net.sourceforge.ganttproject.chart.OffsetCalculatorImpl


        Task task = getTaskManager().createTask();
        GanttCalendar monday = new GanttCalendar(2000, 0, 3);
        GanttCalendar friday = new GanttCalendar(2000, 0, 7);
        task.setStart(friday);
        task.setDuration(getTaskManager().createLength(2));
        OffsetCalculatorImpl offsetCalculator = new OffsetCalculatorImpl(myStack);
        TimeUnitFunctionOfDate monthUnit = (TimeUnitFunctionOfDate) myStack.MONTH;
        TimeFrame weekTimeFrame = myStack.createTimeFrame(monday.getTime(), monthUnit.createTimeUnit(monday.getTime()), myStack.WEEK_AS_BOTTOM_UNIT);
        Offset[] offsets = offsetCalculator.calculateOffsets(weekTimeFrame, myStack.WEEK_AS_BOTTOM_UNIT, monday.getTime(), myStack.getDefaultTimeUnit(), 70);
        assertEquals("Unexpected offsets count", 7, offsets.length);
        TaskActivity fridayActivity = task.getActivities()[0];
        int pixelOffset = 0;
        for (int i=0; i<offsets.length; i++) {
            Offset next = offsets[i];
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.chart.OffsetCalculatorImpl

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.