psdi.webclient.controls

Class Calendar

  • All Implemented Interfaces:
    java.lang.Cloneable, DataBeanListener


    public class Calendar
    extends DatasrcInstance
    implements DataBeanListener
    This class represents the controller for WallCalandar and Calendar controls. and WallCalendar control
    • Constructor Detail

      • Calendar

        public Calendar()
    • Method Detail

      • initialize

        public void initialize()
        Description copied from class: BaseInstance
        should be extended to do any setup required by the instance. for example, the DatasrcInstance will call initialize to create data sources found in the bind list.
        Overrides:
        initialize in class ControlInstance
      • thisdayworkperiods

        public int thisdayworkperiods()
        Partially handles "thisdayworkperiods" event to prepare the gregorian calendar to pass on to the dialog.
        Returns:
        WebClientBean.EVENT_HANDLED;
      • changedate

        public int changedate()
        Handles the change of date when user scroll month, year or current date. Also updates current calendar details and properties
        Returns:
        WebClientBean.EVENT_HANDLED;
      • changedate

        public void changedate(java.lang.String type,
                               java.lang.String valueTyped)
        Handles the change of date when user types time parts in the fields Also updates current calendar details and properties. Can be extended later to include month and year, if these fields are not readonly.
      • spintime

        public void spintime(java.lang.String type,
                             boolean increment)
        Handles the change of date when user types time parts in the fields Also updates current calendar details and properties. Can be extended later to include month and year, if these fields are not readonly.
      • invalidyear

        public int invalidyear()
        Handles the invalid year event
        Returns:
      • getCurrentDateString

        public java.lang.String getCurrentDateString()
        Prepares and returns the current date string viz. "Today is :..."
        Returns:
        currentDateString String
      • render

        public int render()
                   throws java.lang.NoSuchMethodException,
                          java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
        Overridden to refresh variables and properties on control of render
        Overrides:
        render in class DatasrcInstance
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        See Also:
        ControlInstance.render()
      • getHTMLNotes

        public java.lang.String getHTMLNotes(int dayNum)
        Returns HTML notes for a given day for the current month
        Parameters:
        dayNum - int
        Returns:
        notes String
      • getHours

        public java.lang.String getHours(int dayNum)
        Returns Hours (HH:MM) for a given day for the current month
        Parameters:
        dayNum - int
        Returns:
        hours String
      • getToday

        public com.ibm.icu.util.Calendar getToday()
        Returns Calendar object for current date
        Returns:
        today Calendar
      • isCurrent

        public boolean isCurrent()
        Returns true if the calendar is current (month and year)
        Returns:
        curent boolean
      • getDaysInMonth

        public int getDaysInMonth()
        Return number of days in months
        Returns:
        daysInMonth int
      • getFirstDayOfWeek

        public int getFirstDayOfWeek()
        Returns first week of the day
        Returns:
        firstDayOfWeek int
      • getTodaysMonth

        public int getTodaysMonth()
        Returns month number of the current date
        Returns:
        todaysMonth int
      • getTodaysYear

        public int getTodaysYear()
        Returns year of the current date
        Returns:
        todaysYear int
      • getTodaysDay

        public int getTodaysDay()
        Returns day number of the current date
        Returns:
        todaysDay int
      • getStartDay

        public int getStartDay()
        Returns start day of the current calendar
        Returns:
        startDay int
      • getMonth

        public int getMonth()
        Returns month of the current calendar
        Returns:
        month int
      • getYear

        public int getYear()
        Returns year of the current calendar
        Returns:
        year int
      • getDay

        public int getDay()
        Returns day of the current calendar
        Returns:
        day int
      • getDays

        public java.lang.String[] getDays()
        Returns names of days
        Returns:
        days String[]
      • getMonths

        public java.lang.String[] getMonths()
        Returns names of months
        Returns:
        months String[]
      • getStartDateAttribute

        public java.lang.String getStartDateAttribute()
        Returns start date attribute property
        Returns:
        String
      • getEndDateAttribute

        public java.lang.String getEndDateAttribute()
        Returns end date attribute property
        Returns:
        String
      • getCurrentMonth

        public java.lang.String getCurrentMonth()
        Returns current month name
        Returns:
        String