Package net.sourceforge.ganttproject.time

Examples of net.sourceforge.ganttproject.time.TimeUnit


    protected TimeUnit getTopUnit() {
        return getTopUnit(myStartDate);
    }

    private TimeUnit getTopUnit(Date startDate) {
        TimeUnit result = myTopUnit;
        if (myTopUnit instanceof TimeUnitFunctionOfDate) {
            if (startDate == null) {
                throw new RuntimeException("No date is set");
            } else {
                result = ((TimeUnitFunctionOfDate) myTopUnit)
View Full Code Here


        // }
        return date;
    }

    private LineHeader calculateLines(LineHeader lastHeader) {
        TimeUnit curUnit = lastHeader == null ? myTopUnit : lastHeader.myUnit
                .getDirectAtomUnit();
        LineHeader curHeader = createHeader(curUnit);
        fillLine(lastHeader, curHeader);
        if (lastHeader != null) {
            lastHeader.append(curHeader);
View Full Code Here

    }

    private int getUnitCount(LineHeader higherHeader, LineHeader header,
            LineItem higherItem) {
        TimeUnit higherUnit = higherHeader.myUnit instanceof TimeUnitFunctionOfDate ? ((TimeUnitFunctionOfDate) higherHeader.myUnit)
                .createTimeUnit(higherItem.myStartDate)
                : higherHeader.myUnit;
        TimeUnit lowerUnit = header.myUnit;
        int result = higherUnit.getAtomCount(lowerUnit);
        return result;
    }
View Full Code Here

    /**
     *
     */
    public GPTimeUnitStack(GanttLanguage i18n) {
        TimeUnit atom = ourGraph.createAtomTimeUnit("atom");
        DAY = ourGraph.createDateFrameableTimeUnit("day", atom, 1,
                new FramerImpl(Calendar.DATE));
        DAY.setTextFormatter(new DayTextFormatter());
        MONTH = ourGraph.createTimeUnitFunctionOfDate("month", DAY,
                new FramerImpl(Calendar.MONTH));
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.time.TimeUnit

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.