Package org.wicketstuff.calendarviews.model

Examples of org.wicketstuff.calendarviews.model.BasicCategorizedEvent


    Date end = new DateTime(start).plusHours(durationHours).plusMinutes(durationMinutes).toDate();
    return createEvent(id, false, start, end);
  }

  private BasicEvent createEvent(int id, boolean allDay, Date start, Date end) {
    BasicCategorizedEvent event = new BasicCategorizedEvent();
    StringBuffer title = new StringBuffer();
    //title.append("Event");
    title.append(" #").append(id);
    if (allDay) {
      title.append(" [").append(DATE_FORMAT.format(start));
      if (end != null) {
        title.append(" - ").append(DATE_FORMAT.format(end));
      }
    } else {
      title.append(" [").append(TIME_FORMAT.format(start));
      if (end != null) {
        title.append(" - ").append(TIME_FORMAT.format(end));
      }
    }
    title.append("]");
    event.setTitle(title.toString());
    event.setAllDayEvent(allDay);
    event.setStartTime(start);
    event.setEndTime(end);
    event.setCssClassForCategory("cat" + ((mRandom.nextInt(3)) + 1));
    return event;
  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.calendarviews.model.BasicCategorizedEvent

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.