net.sf.borg.ui.popup
Class ApptReminderInstance

java.lang.Object
  extended by net.sf.borg.ui.popup.ReminderInstance
      extended by net.sf.borg.ui.popup.ApptReminderInstance

public class ApptReminderInstance
extends ReminderInstance

holds an instance of a reminder message. Keeps track of which reminder times have been shown for this reminder message. Is not aware of the actual UI used to display the reminder.


Constructor Summary
ApptReminderInstance(Appointment appt, Date instanceTime)
          constructor
 
Method Summary
 void do_todo(boolean delete)
          if the reminder instance is a todo, then mark it as done/complete
 boolean equals(Object obj)
           
 int getCurrentReminder()
          get the index of the active reminder for this instance - i.e.
 String getText()
          get the text for the reminder
 int hashCode()
           
 boolean isNote()
          return true if the reminder is a note (is untimed)
 boolean isTodo()
          return true if the reminder is a todo - either an appointment todo or another type of todo, such as a task
 boolean reloadAndCheckForChanges()
          reload the model entity from the db and check if it has changed.
 boolean shouldBeShown()
          determine if an appointment popup should be shown for an appointment that doesn't yet have a popup associated with it
 
Methods inherited from class net.sf.borg.ui.popup.ReminderInstance
calculateToGoMessage, dueForPopup, getInstanceTime, getRemindersShown, isHidden, markAsShown, minutesToGo, setHidden, setInstanceTime, setRemindersShown, setShown, wasEverShown
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApptReminderInstance

public ApptReminderInstance(Appointment appt,
                            Date instanceTime)
constructor

Parameters:
appt - the appointment
instanceTime - the instance time.
Method Detail

do_todo

public void do_todo(boolean delete)
if the reminder instance is a todo, then mark it as done/complete

Specified by:
do_todo in class ReminderInstance

equals

public boolean equals(Object obj)
Specified by:
equals in class ReminderInstance

getCurrentReminder

public int getCurrentReminder()
get the index of the active reminder for this instance - i.e. latest one passed

Specified by:
getCurrentReminder in class ReminderInstance
Returns:
index of reminder or -1 if none

getText

public String getText()
get the text for the reminder

Specified by:
getText in class ReminderInstance
Returns:
the reminder text

hashCode

public int hashCode()
Specified by:
hashCode in class ReminderInstance

isNote

public boolean isNote()
return true if the reminder is a note (is untimed)

Specified by:
isNote in class ReminderInstance

isTodo

public boolean isTodo()
return true if the reminder is a todo - either an appointment todo or another type of todo, such as a task

Specified by:
isTodo in class ReminderInstance

reloadAndCheckForChanges

public boolean reloadAndCheckForChanges()
reload the model entity from the db and check if it has changed.

Specified by:
reloadAndCheckForChanges in class ReminderInstance
Returns:
true if the entity has changed in a way that affects reminders

shouldBeShown

public boolean shouldBeShown()
determine if an appointment popup should be shown for an appointment that doesn't yet have a popup associated with it

Specified by:
shouldBeShown in class ReminderInstance
Returns:
true, if successful


Generated December 30 2011 by mbb using Apache Ant(TM) version 1.8.2 compiled on December 20 2010 and Java version 1.6.0_30 from Sun Microsystems Inc. on Linux i386 3.0.0-14-generic-pae