caltool.schedule
Class Event

java.lang.Object
  extended by java.util.Observable
      extended by mvp.Model
          extended by caltool.schedule.ScheduledItem
              extended by caltool.schedule.Event
All Implemented Interfaces:
java.io.Serializable

public class Event
extends ScheduledItem

An Event is the simplest type of ScheduledItem. The only component it adds to a ScheduledItem is simple security.

See Also:
Serialized Form

Field Summary
protected  ItemKey itemKey
          The uniqe key for storing this in the UserCalendar items list
protected  SimpleSecurity security
          Whether the event is public or private.
 
Fields inherited from class caltool.schedule.ScheduledItem
category, endDate, startOrDueDate, title
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
Event()
          Construct an empty event.
Event(java.lang.String title, Date startOrDueDate, Date endDate, Category category, SimpleSecurity security)
          Construct an event with the given field values.
 
Method Summary
 Date getEndDate()
          Return the end date.
 ItemKey getKey()
          Return the unique key for this, consisting of date and title.
 Date getStartDate()
          Return the start date.
 java.lang.String getTitle()
          Return the title.
 java.lang.String toString()
          Convert this to a string.
 
Methods inherited from class caltool.schedule.ScheduledItem
getCategory, getDate
 
Methods inherited from class mvp.Model
dump, exit, getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

security

protected SimpleSecurity security
Whether the event is public or private.


itemKey

protected ItemKey itemKey
The uniqe key for storing this in the UserCalendar items list

Constructor Detail

Event

public Event()
Construct an empty event.


Event

public Event(java.lang.String title,
             Date startOrDueDate,
             Date endDate,
             Category category,
             SimpleSecurity security)
Construct an event with the given field values. Generate and store the unique key for this event.

Method Detail

getTitle

public java.lang.String getTitle()
Return the title.

Overrides:
getTitle in class ScheduledItem

getStartDate

public Date getStartDate()
Return the start date.


getEndDate

public Date getEndDate()
Return the end date.

Overrides:
getEndDate in class ScheduledItem

getKey

public ItemKey getKey()
Return the unique key for this, consisting of date and title. Time, duration, and priority are unused.

Specified by:
getKey in class ScheduledItem

toString

public java.lang.String toString()
Convert this to a string.

Overrides:
toString in class java.lang.Object