package de.smartgwttest.client; import java.util.Date; import com.smartgwt.client.widgets.calendar.CalendarEvent; public class CalendarData { private static CalendarEvent[] records; private static Date today = new Date(); private static int year = today.getYear(); private static int month = today.getMonth(); private static int start = today.getDate() - today.getDay() + 1; public static CalendarEvent[] getRecords() { return new CalendarEvent[]{ new CalendarEvent(1, "Meeting", "Shareholders meeting: monthly forecast report", new Date(year, month, start + 2, 9, 0, 0), new Date(year, month, start + 2, 10, 0, 0)), new CalendarEvent(2, "Realtor", "Breakfast with realtor to discuss moving plans", new Date(year, month, start + 2, 9, 0, 0), new Date(year, month, start + 2, 10, 0, 0)), new CalendarEvent(3, "Soccer", "Little league soccer finals", new Date(year, month, start + 2, 9, 30, 0), new Date(year, month, start + 2, 10, 30, 0)), new CalendarEvent(4, "Sleep", "Catch up on sleep", new Date(year, month, start + 2, 10, 0, 0), new Date(year, month, start + 2, 11, 0, 0)), }; } }