Examples of calculateOffsets()


Examples of net.sourceforge.ganttproject.chart.OffsetCalculatorImpl.calculateOffsets()

        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
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.