Examples of Calendars


Examples of org.zkoss.calendar.Calendars

  public CaleventCreateCommand(String id, int flags) {
    super(id, flags);
  }

  protected void process(AuRequest request) {
    final Calendars cmp = (Calendars)request.getComponent();
    if (cmp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, this);

    final String[] data = request.getData();
    if (data == null || data.length != 6)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {
          Objects.toString(data), this });
   
    TimeZone tz = cmp.getDefaultTimeZone();
    Date eventBegin = new Date(Long.parseLong(data[0]));
    Date eventEnd = new Date(Long.parseLong(data[1]));
   
    if (tz.inDaylightTime(eventBegin))
      eventBegin = new Date(eventBegin.getTime() - tz.getDSTSavings());
View Full Code Here

Examples of org.zkoss.calendar.Calendars

  public DayClickCommand(String id, int flags) {
    super(id, flags);
  }
  @Override
  protected void process(AuRequest request) {
    final Calendars cmp = (Calendars)request.getComponent();
    if (cmp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, this);

    final String[] data = request.getData();
    if (data == null || data.length != 1)
View Full Code Here

Examples of org.zkoss.calendar.Calendars

  public CaleventUpdateCommand(String id, int flags) {
    super(id, flags);
  }

  protected void process(AuRequest request) {
    final Calendars cmp = (Calendars) request.getComponent();
    if (cmp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, this);

    final String[] data = request.getData();
    if (data == null || data.length != 7)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {
          Objects.toString(data), this });
    CalendarEvent ce = cmp.getCalendarEventById(data[0]);
    TimeZone tz = cmp.getDefaultTimeZone();
    Date eventBegin = new Date(Long.parseLong(data[1]));
    Date eventEnd = new Date(Long.parseLong(data[2]));
    if (tz.inDaylightTime(eventBegin))
      eventBegin = new Date(eventBegin.getTime() - tz.getDSTSavings());
    if (tz.inDaylightTime(eventEnd))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.