Interface ICalendarProvider

All Superinterfaces:
IContentProvider, ITableContentProvider
All Known Implementing Classes:
DefaultCalendarProvider

public interface ICalendarProvider extends ITableContentProvider
Interface definition for a provider that supplies calendar unit and day to a CalendarTable control
See Also:
  • DefaultCalendarProvider
  • Method Details

    • isInitialized

      boolean isInitialized()
      Determine if method initialize has been called.
      Returns:
      boolean true if method initialize has been called, otherwise false.
    • initialize

      void initialize(String units, Date startDate, Date endDate, Date initialDate, int numDisplayUnits)
      Common method to set the content of the calendar provider.
      Parameters:
      units - The unit of measurement. (Example: day, week, month, year )
      startDate - The start date for the date range of events in this calendar provider.
      endDate - The end date for the date range of events in this calendar provider.
      initialDate - An initial start date within the date range of events in this calendar provider.
      numDisplayUnits - The number of calendar units displays by the provider.
    • getStartDate

      Date getStartDate()
      Get the start date of the date range for this provider. Must return a valid Date.
      Returns:
      The end date for the date range of this provider.
    • setStartDate

      void setStartDate(Date date)
      Set the start date of the date range for this provider.
      Parameters:
      startDate - The end date for the date range of this provider.
    • getEndDate

      Date getEndDate()
      Get the end date of the date range for this provider. Must return a valid Date.
      Returns:
      The end date for the date range of this provider.
    • setEndDate

      void setEndDate(Date date)
      Set the end date for the date range for this provider
      Parameters:
      endDate - The end date for the date range of this provider.
    • getInitialDate

      Date getInitialDate()
      Get the initial date to display. Use the start date if not set.
      Returns:
      The initial date this provider will display.
    • setInitialDate

      void setInitialDate(Date initialDate)
      Set the initial date to display.
      Parameters:
      initialDate - The initial date this provider will display.
    • getUnits

      String getUnits()
      Get the calendar unit of measure for this provider. ( Example: day, week, month, year )
      Returns:
      The unit of measure.
      See Also:
      • DefaultCalendarProvider
    • setUnits

      void setUnits(String numUnits)
      Set the calendar unit of measure for this provider. ( Example: day, week, month, year )
      Parameters:
      numUnits - The unit of measure.
      See Also:
      • DefaultCalendarProvider
    • getNumUnits

      int getNumUnits()
      Get the number of calendar units in this provider. For displaying multiple CalendarUnit's in day mode, the end date for each CalendarUnit will have to be set or calculated to display properly.
      Returns:
      The number of calendar units
      See Also:
    • setNumUnits

      void setNumUnits(int numUnits)
      Set the the number of calendar units
      Parameters:
      numUnits -
    • setUnitIndex

      void setUnitIndex(int unitIndex)
      Set the current aligned calendar unit index, expressed as the number of calendar units from the provider start date
      Parameters:
      unitIndex - The index for the current calendar unit.
      See Also:
    • getCurrentUnit

      CalendarUnit getCurrentUnit()
      Get the current aligned calendar unit index, expressed as the number of calendar units from the provider start date
      Returns:
      The current calendar unit.
      See Also:
    • getUnitVariable

      String getUnitVariable()
      Get the name of the request variable that current CalendarUnit will be exposed as. Used in binding expressions.
      Returns:
      The name of the provider variable.
    • setUnitVariable

      void setUnitVariable(String var)
      Set the name of the request variable that current Calendar Unit will be exposed as. Used in binding expressions.
      Parameters:
      var - The name of the provider variable.
    • getUnitCount

      int getUnitCount()
      Get the number of calendar units in this provider.
      Returns:
      The number of calendar units.
    • getUnitStartDate

      Date getUnitStartDate()
      Get the first day date in the current calendar unit (e.g. first of month)
      Returns:
      The start date for the calendar unit.
    • getUnitEndDate

      Date getUnitEndDate()
      Get the last day date in the current calendar unit (e.g. last of month)
      Returns:
      The end date for the calendar unit.
    • setDayIndex

      void setDayIndex(int dayIndex)
      Set the index of the day within the current calendar unit.
      Parameters:
      dayIndex - The number of days, staring at one.
    • getDayCount

      int getDayCount()
      Get the number of days within the current calendar unit.
      Returns:
      The number of days, staring at one.
    • getCurrentDay

      ICalendarDay getCurrentDay()
      Get the day at the current day index within the current calendar unit.
      Returns:
      The current calendar day.
    • isDayAvailable

      boolean isDayAvailable()
      Is the day selected by setDayIndex within the start and end dates of the current calendar unit.
      Returns:
      True if between the start and end dates of the current calendar unit.