Examples of TimeDuration


Examples of gov.nasa.arc.mct.fastplot.view.TimeDuration

    JLabel max = (JLabel) axisGroup.getControl(true , BoundOption.AUTO, true);
   
    TimeSpanTextField span =  (TimeSpanTextField) axisGroup.getSpanControl(true);
   
    ((JRadioButton) axisGroup.getControl(false, BoundOption.CURRENT, false)).doClick();
    span.setTime(new TimeDuration(15000l));
    ((JRadioButton) axisGroup.getControl(true , BoundOption.AUTO, false)).doClick();     
    Assert.assertEquals(max.getText().replaceAll("[\\(\\)]", ""), "001/00:00:16 1969");
  }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static Duration getDaylightSavingsOffset(Date self) {
        TimeZone timeZone = getTimeZone(self);
        int millis = (timeZone.useDaylightTime() && timeZone.inDaylightTime(self))
                ? timeZone.getDSTSavings() : 0;
        return new TimeDuration(0, 0, 0, millis);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    }

    public static Duration getRelativeDaylightSavingsOffset(Date self, Date other) {
        Duration d1 = getDaylightSavingsOffset(self);
        Duration d2 = getDaylightSavingsOffset(other);
        return new TimeDuration(0, 0, 0, (int) (d2.toMilliseconds() - d1.toMilliseconds()));
    }
View Full Code Here

Examples of groovy.time.TimeDuration

        int minutes = (int) (milliseconds / (60 * 1000));
        milliseconds -= minutes * 60 * 1000;
        int seconds = (int) (milliseconds / 1000);
        milliseconds -= seconds * 1000;

        return new TimeDuration((int) days, hours, minutes, seconds, (int) milliseconds);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static Duration getDay(final Integer self) {
        return getDays(self);
    }

    public static TimeDuration getHours(final Integer self) {
        return new TimeDuration(0, self.intValue(), 0, 0, 0);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static TimeDuration getHour(final Integer self) {
        return getHours(self);
    }

    public static TimeDuration getMinutes(final Integer self) {
        return new TimeDuration(0, 0, self.intValue(), 0, 0);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static TimeDuration getMinute(final Integer self) {
        return getMinutes(self);
    }

    public static TimeDuration getSeconds(final Integer self) {
        return new TimeDuration(0, 0, 0, self.intValue(), 0);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static TimeDuration getSecond(final Integer self) {
        return getSeconds(self);
    }

    public static TimeDuration getMilliseconds(final Integer self) {
        return new TimeDuration(0, 0, 0, 0, self.intValue());
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    public static Duration getDaylightSavingsOffset(Date self) {
        TimeZone timeZone = getTimeZone(self);
        int millis = (timeZone.useDaylightTime() && timeZone.inDaylightTime(self))
                ? timeZone.getDSTSavings() : 0;
        return new TimeDuration(0, 0, 0, millis);
    }
View Full Code Here

Examples of groovy.time.TimeDuration

    }

    public static Duration getRelativeDaylightSavingsOffset(Date self, Date other) {
        Duration d1 = getDaylightSavingsOffset(self);
        Duration d2 = getDaylightSavingsOffset(other);
        return new TimeDuration(0, 0, 0, (int) (d2.toMilliseconds() - d1.toMilliseconds()));
    }
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.