From: <flo...@us...> - 2009-03-01 19:17:34
|
Revision: 4226 http://j-wings.svn.sourceforge.net/j-wings/?rev=4226&view=rev Author: florianroks Date: 2009-03-01 19:17:30 +0000 (Sun, 01 Mar 2009) Log Message: ----------- o fixes to calendar Modified Paths: -------------- wings3/trunk/demo-calendar/src/java/calendar/AppointmentCalendar.java wings3/trunk/demo-calendar/src/java/calendar/DefaultCalendarModel.java wings3/trunk/demo-calendar/src/java/calendar/UniqueAppointment.java Modified: wings3/trunk/demo-calendar/src/java/calendar/AppointmentCalendar.java =================================================================== --- wings3/trunk/demo-calendar/src/java/calendar/AppointmentCalendar.java 2009-02-13 08:01:51 UTC (rev 4225) +++ wings3/trunk/demo-calendar/src/java/calendar/AppointmentCalendar.java 2009-03-01 19:17:30 UTC (rev 4226) @@ -416,6 +416,11 @@ cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); + } else { + cal.set(Calendar.HOUR_OF_DAY, 12); + cal.set(Calendar.MINUTE, 0); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MILLISECOND, 1); // to indicate it wasn't directly user input } this.getSelectionModel().doubleClickDate(new java.sql.Date(cal.getTimeInMillis()), modifierKeyStatus); Modified: wings3/trunk/demo-calendar/src/java/calendar/DefaultCalendarModel.java =================================================================== --- wings3/trunk/demo-calendar/src/java/calendar/DefaultCalendarModel.java 2009-02-13 08:01:51 UTC (rev 4225) +++ wings3/trunk/demo-calendar/src/java/calendar/DefaultCalendarModel.java 2009-03-01 19:17:30 UTC (rev 4226) @@ -34,11 +34,17 @@ */ public DefaultCalendarModel() { + setLocale(Locale.getDefault()); setDate(new java.sql.Date(Calendar.getInstance().getTimeInMillis())); - setLocale(Locale.getDefault()); setView(CalendarView.MONTH); } + public DefaultCalendarModel(Locale locale) { + setLocale(locale); + setDate(new java.sql.Date(Calendar.getInstance().getTimeInMillis())); + setView(CalendarView.MONTH); + } + public CalendarView getView() { return view; } @@ -120,7 +126,7 @@ end.set(Calendar.SECOND, 0); end.set(Calendar.MILLISECOND, 0); - if(Locale.US.equals(getLocale()) || Locale.GERMANY.equals(getLocale())) { + if(Locale.US.equals(getLocale())) { if(begin.get(Calendar.DAY_OF_MONTH) == 1 && begin.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) { } else { Modified: wings3/trunk/demo-calendar/src/java/calendar/UniqueAppointment.java =================================================================== --- wings3/trunk/demo-calendar/src/java/calendar/UniqueAppointment.java 2009-02-13 08:01:51 UTC (rev 4225) +++ wings3/trunk/demo-calendar/src/java/calendar/UniqueAppointment.java 2009-03-01 19:17:30 UTC (rev 4226) @@ -67,7 +67,7 @@ if(cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR)) { - if(cmp.getAppointment().equals(this.getAppointment())) + if(cmp.getAppointment() != null && cmp.getAppointment().equals(this.getAppointment())) { return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |