Package de.timefinder.data

Examples of de.timefinder.data.IntervalLongImpl


        super.setUp();
        instance = new IntervalStepFunction();
    }

    IntervalLong newIntervalLong(long start, long duration) {
        return new IntervalLongImpl(start, duration);
    }
View Full Code Here


                settings.setStartDate(new DateTime(2009, 4, 6, 8, 0, 0, 0));
                TimeFinderPlanner planner = new TimeFinderPlanner(settings);

                // monday
                planner.addInterval(new IntervalLongImpl("Interval 1", 2009, 4, 6, 8, 30, 60));
                planner.addInterval(new IntervalLongImpl("Interval 2", 2009, 4, 6, 9, 0, 60));

                planner.addInterval(new IntervalLongImpl("Interval A", 2009, 4, 6, 10, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval B", 2009, 4, 6, 10, 0, 180));
                planner.addInterval(new IntervalLongImpl("Interval C", 2009, 4, 6, 11, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval D", 2009, 4, 6, 13, 0, 180));
                planner.addInterval(new IntervalLongImpl("Interval E", 2009, 4, 6, 14, 0, 120));

                // tuesday
                planner.addInterval(new IntervalLongImpl("Interval 3", 2009, 4, 7, 8, 30, 30));
                planner.addInterval(new IntervalLongImpl("Interval 3", 2009, 4, 7, 9, 0, 60));
                planner.addInterval(new IntervalLongImpl("Interval 4a", 2009, 4, 7, 10, 0, 120));

                planner.addInterval(new IntervalLongImpl("Interval 4b", 2009, 4, 7, 13, 0, 180));
                planner.addInterval(new IntervalLongImpl("Interval 4c", 2009, 4, 7, 14, 0, 60));

                // wednesday
                planner.addInterval(new IntervalLongImpl("Interval 5", 2009, 4, 8, 9, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval 6 more description "
                        + "to show line breaking", 2009, 4, 8, 10, 0, 120));

                // explicit line breaking
                planner.addInterval(new IntervalLongImpl("brok\nken", 2009, 4, 9, 15, 0, 30));
                // implicit
                planner.addInterval(new IntervalLongImpl("Interval 7 show line breaking and "
                        + "clipping not shown ? 123 ********", 2009, 4, 9, 9, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval 8", 2009, 4, 9, 11, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval 9", 2009, 4, 9, 10, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval 10", 2009, 4, 9, 11, 0, 120));
                planner.addInterval(new IntervalLongImpl("Interval 11", 2009, 4, 9, 13, 0, 120));

                planner.addInterval(new IntervalLongImpl("Interval 12", 2009, 4, 10, 8, 30, 60));
                planner.addInterval(new IntervalLongImpl("Interval 13 smaller than one hour", 2009, 4, 10, 9, 30, 30));

                frame.setContentPane(planner);
                frame.setSize(1000, 640);
                frame.setVisible(true);
            }
View Full Code Here

            pcl.propertyChange(new PropertyChangeEvent(this, ICalendarSettings.CHANGE_ALL, null, null));
        }
    }

    public IntervalLong toInterval(IntervalInt simpleInt) {
        IntervalLong tf = new IntervalLongImpl(toDateTime(simpleInt.getStart()),
                (int) (simpleInt.getDuration()
                * settings.getMillisPerTimeslot() / ICalendarSettings.MINUTE));
        tf.setDescription(simpleInt.getDetails());
        return tf;
    }
View Full Code Here

    @Test
    public void testEventUI() {
        int slots = 8;
        settings.setTimeslotsPerDay(slots);
        settings.setMillisPerTimeslot(ICalendarSettings.HOUR);
        IntervalLong evUI = new IntervalLongImpl(settings.getStartDate().plusHours(slots - 1), 60);

        assertEquals(settings.getStartDate().plusHours(slots - 1),
                evUI.getStartDateTime());
        // should be on the same day
        assertEquals(evUI.getEndDateTime().getDayOfMonth(),
                evUI.getStartDateTime().getDayOfMonth());
    }
View Full Code Here

TOP

Related Classes of de.timefinder.data.IntervalLongImpl

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.