Module ical4j.core

Class VToDo

All Implemented Interfaces:
Serializable, Comparable<Component>, AlarmsAccessor, ChangeManagementPropertyAccessor, ComponentContainer<Component>, ComponentListAccessor<Component>, DateTimePropertyAccessor, DescriptivePropertyAccessor, FluentComponent, LocationsAccessor, ParticipantsAccessor, PropertyContainer, PropertyListAccessor, Prototype<Component>, RecurrenceSupport<VToDo>, RelationshipPropertyAccessor, ResourcesAccessor

$Id$ [Apr 5, 2004] Defines an iCalendar VTODO component.
       4.6.2 To-do Component

          Component Name: VTODO

          Purpose: Provide a grouping of calendar properties that describe a
          to-do.

          Formal Definition: A "VTODO" calendar component is defined by the
          following notation:

            todoc      = "BEGIN" ":" "VTODO" CRLF
                         todoprop *alarmc
                         "END" ":" "VTODO" CRLF

            todoprop   = *(

                       ; the following are optional,
                       ; but MUST NOT occur more than once

                       class / completed / created / description / dtstamp /
                       dtstart / geo / last-mod / location / organizer /
                       percent / priority / recurid / seq / status /
                       summary / uid / url /

                       ; either 'due' or 'duration' may appear in
                       ; a 'todoprop', but 'due' and 'duration'
                       ; MUST NOT occur in the same 'todoprop'

                       due / duration /

                       ; the following are optional,
                       ; and MAY occur more than once
                       attach / attendee / categories / comment / contact /
                       exdate / exrule / rstatus / related / resources /
                       rdate / rrule / x-prop

                       )
 
Example 1 - Creating a todo of two (2) hour duration starting tomorrow:

 java.util.Calendar cal = java.util.Calendar.getInstance();
 // tomorrow..
 cal.add(java.util.Calendar.DAY_OF_MONTH, 1);
 cal.set(java.util.Calendar.HOUR_OF_DAY, 11);
 cal.set(java.util.Calendar.MINUTE, 00);

 VToDo documentation = new VEvent(cal.getTime(), 1000 * 60 * 60 * 2,
         "Document calendar component usage");

 // add timezone information..
 VTimeZone tz = VTimeZone.getDefault();
 TzId tzParam = new TzId(tz.getProperties().getProperty(Property.TZID)
         .getValue());
 documentation.getProperties().getProperty(Property.DTSTART).getParameters()
         .add(tzParam);
 
See Also: