Пример #1
0
 public String getHtmlValue(AppointmentBlock block) {
   RaplaLocale raplaLocale = getRaplaLocale();
   final Date date = new Date(block.getEnd());
   if (block.getAppointment().isWholeDaysSet()) {
     String dateString = raplaLocale.formatDateLong(DateTools.addDays(date, -1));
     return dateString;
   } else {
     String dateString = raplaLocale.formatDateLong(date) + " " + raplaLocale.formatTime(date);
     return dateString;
   }
 }
Пример #2
0
 private int getAppointmentNumber(AppointmentBlock appointmentBlock) {
   final long blockStart = appointmentBlock.getEnd();
   final Date end = new Date(blockStart);
   final Appointment appointment = appointmentBlock.getAppointment();
   final Reservation reservation = appointment.getReservation();
   final Date start = reservation.getFirstDate();
   SortedSet<AppointmentBlock> blocks = new TreeSet<AppointmentBlock>();
   for (Appointment app : reservation.getAppointments()) {
     app.createBlocks(start, end, blocks);
   }
   final SortedSet<AppointmentBlock> headSet = blocks.headSet(appointmentBlock);
   final int size = headSet.size();
   //                final long appoimtmentStart = reservation.getFirstDate().getTime();
   //                if (appoimtmentStart ==  start)
   //                {
   //                    return 1;
   //                }
   return size + 1;
 }
Пример #3
0
 public Object getValue(AppointmentBlock block) {
   return new Date(block.getEnd());
 }