Examples of toDuration()


Examples of com.projity.pm.graphic.timescale.CoordinatesConverter.toDuration()

    double h=node.getGanttShapeHeight();
    double delta=config.getSelectionSquare();
    if (y<y0/*-delta*/||y>y0/*+delta*/+h) return null;
    CoordinatesConverter coord=getCoord();
    double t=coord.toTime(x);
    double deltat=coord.toDuration(delta);
    if  (node.contains(t,deltat,deltat,coord)==null) return null;
    double progessH=config.getGanttProgressBarHeight();
    GraphZone zone=new GraphZone();
    zone.setObject(node);
    if (y>=y0+h/2-progessH/2&&y<y0+h/2+progessH/2) zone.setZoneId(PROGRESS_BAR_ZONE_ID);
View Full Code Here

Examples of javax.time.period.PeriodFields.toDuration()

     * @throws ArithmeticException if the calculation exceeds the capacity of {@code Instant}
     * @throws CalendricalException if the calculation exceeds the capacity of {@code ZonedDateTime}
     */
    public ZonedDateTime plusDuration(PeriodProvider periodProvider) {
        PeriodFields period = PeriodFields.from(periodProvider);
        Duration duration = period.toDuration();
        return duration.isZero() ? this : fromInstant(toInstant().plus(duration), zone);
    }

    /**
     * Returns a copy of this {@code ZonedDateTime} with the specified duration added.
View Full Code Here

Examples of javax.time.period.PeriodFields.toDuration()

     * @throws ArithmeticException if the calculation exceeds the capacity of {@code Instant}
     * @throws CalendricalException if the calculation exceeds the capacity of {@code ZonedDateTime}
     */
    public ZonedDateTime minusDuration(PeriodProvider periodProvider) {
        PeriodFields period = PeriodFields.from(periodProvider);
        Duration duration = period.toDuration();
        return duration.isZero() ? this : fromInstant(toInstant().minus(duration), zone);
    }

    /**
     * Returns a copy of this {@code ZonedDateTime} with the specified duration subtracted.
View Full Code Here

Examples of org.joda.time.Interval.toDuration()

          workingHours = workingHours.withEnd(now);
        } else if (workingHours.getEnd().isBefore(now)) {
          // leave end of working hours as is
        }
      }
      duration = duration.plus(workingHours.toDuration());
      dateBeingProcessed = dateBeingProcessed.plusDays(1);
      processingInterval = getEntireDayIntervalForDate(dateBeingProcessed);
    }
    System.out.println(duration.toPeriod());
    return duration;
View Full Code Here

Examples of org.joda.time.Interval.toDuration()

                    AggregateEvent next = iterator.next();
                    Interval gap = current.getSpan().gap(next.getSpan());

                    //if they overlap or gap is less one quarter timeUnitLength
                    //TODO: 1/4 factor is arbitrary. review! -jm
                    if (gap == null || gap.toDuration().getMillis() <= timeUnitLength.toDurationFrom(gap.getStart()).getMillis() / 4) {
                        //merge them
                        current = AggregateEvent.merge(current, next);
                    } else {
                        //done merging into current, set next as new current
                        aggEvents.add(current);
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.