Package org.wicketstuff.calendarviews.model

Examples of org.wicketstuff.calendarviews.model.TimePeriod


  public static TimePeriod createWeeksViewDates(int weeks) {
    // TODO add a similar method that allows an offset of weeks (i.e. 3 weeks, starting two weeks past today)
    Date start = new Date();
    Date end = new DateTime(start).plusWeeks(weeks - 1).toDate();
    return new TimePeriod(start, end);
  }
View Full Code Here


  }

  public static TimePeriod createMonthViewDates() {
    Date start = new DateTime().dayOfMonth().setCopy(1).toDate();
    Date end = new DateTime(start).plusMonths(1).minusDays(1).toDate();
    return new TimePeriod(start, end);
  }
View Full Code Here

  }

  public static TimePeriod createMonthViewDates(int month, int year) {
    Date start = new DateTime().dayOfMonth().setCopy(1).monthOfYear().setCopy(month).year().setCopy(year).toDate();
    Date end = new DateTime(start).plusMonths(1).minusDays(1).toDate();
    return new TimePeriod(start, end);
  }
View Full Code Here

  public HomePage(PageParameters params) {
    this(params.getInt(KEY_WEEKS));
  }
 
  public HomePage(int weeks) {
    TimePeriod tp = LargeView.createMonthViewDates();
    if (weeks != 0) {
      tp = LargeView.createWeeksViewDates(weeks);
    }
    add(new LargeView("large", tp, new PersistentRandomTestEventProvider()) {
      private static final long serialVersionUID = 1L;
View Full Code Here

TOP

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

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.