Show TOC

Syntax documentationDateNavigatorModel Locate this document in the navigation structure

public interface DateNavigatorModel
Constructor detail

public DateNavigatorModel()

Create DateNavigatorModel.

public DateNavigatorModel(IPageContext pc)

Create DateNavigatorModel with the page context. Whenever initial settings are made to the DateNavigatorModel (for example, on first display of the datenavigator control the year 1910 should be displayed as centered year and not the actual year) the DateNavigatorModel has to be defined with the page context. Otherwise the initial settings get lost.

The dateNavigator control is displayed according to the locale settings of the portal or the web client. For more information about locale settings of the portal and the web client, see documentation regarding Internationalization".

Base data model for the dateNavigator.

Method

Description

Argument

Return value

getCalendar

Returns the calendar instance used by the DateNavigatorModel.

()

java.util.Calendar

getCenteredMonth

Returns the month that is displayed in the center position of all the month displayed.

()

java.lang.Integer

getCenteredYear

Returns the calendar year of the month displayed in the center position.

()

java.lang.Integer

getLocale

Returns the locale (country) code. It takes the locale from the IPageContext.

()

java.util.Locale

getSelectedDays

Returns the the DayRange instance.

()

DayRanges

getToday

Returns the date that should be rendered as the current date.

()

java.util.Date

isLocaleUnknown

Returns a boolean value indicating if the locale has been set.

()

Boolean

setCenteredMonth

Sets the month that should be displayed in the center position of all the month displayed.

(int centerMo)

void

setCenteredYear

Sets the calendar year of the month displayed in the center position.

(int centerYr)

void

setLocale

Sets the locale (country) code that should be used for date calculation and presentation.

(java.util.Locale l)

void

setLocaleUnknown

If set to true the locale setting of the browser is used for date calculation and presentation.

(boolean locale)

void

setSelectedDays

Sets the DayRanges instance.

(DayRanges selDay)

void

setToday

Sets the day that should be displayed as the current date.

(java.util.Date today)

void

class DayRanges

The DayRanges class specifies any number of days that should be displayed in the selected state. Every day can have a tooltip.

Note Note

The month values used in DayRanges correspond with java.util.Calendar. According to that the months start with 0 (for January).

End of the note.

Method

Description

Argument

Return value

add

Adds a date to this instance of DayRanges.

(java.util.Date day)

void

add

Adds a date range to this instance of DayRanges.

(java.util.Date begin, java.util.Date end)

void

add

Adds a date range to this instance of DayRanges that will be displayed as selected.

(java.util.Date begin, java.util.Date end, int selection)

void

add

Adds a date range with a tooltip to this instance of DayRanges.

(java.util.Date begin, java.util.Date end, java.lang.String tooltip)

void

add

Adds a date range with a tooltip to this instance of DayRanges that will be displayed as selected.

(java.util.Date begin, java.util.Date end, java.lang.String tooltip, int selection)

void

add

Adds a date to this instance of DayRanges that will be displayed as selected.

(java.util.Date day, int selection)

void

add

Adds a date to this instance of DayRanges that will be displayed as selected.

(java.util.Date day, java.lang.String tooltip)

void

add

Adds a date with a tooltip to this instance of DayRanges that will be displayed as selected.

(java.util.Date day, java.lang.String tooltip, int selection)

void

addMonth

Adds all days of the specified month to this instance of DayRanges

(int month, int year)

void

addMonth

Adds all days of the specified month to this instance of DayRanges that will be displayed as selected.

(int month, int year, int selection)

void

addMonth

Adds all days of the specified month with a tooltip to this instance of DayRanges.

(int month, int year, java.lang.String tooltip)

void

addMonth

Adds all days of the specified month with a tooltip to this instance of DayRanges that will be displayed as selected..

(int month, int year, java.lang.String tooltip, int selection)

void

addWeek

Adds all days of the specified week to this instance of DayRanges.

(int week, int year)

void

addWeek

Adds all days of the specified week to this instance of DayRanges that will be displayed as selected.

(int week, int year, int selection)

void

addWeek

Adds all days of the specified week with a tooltip to this instance of DayRanges.

(int week, int year, java.lang.String tooltip)

void

addWeek

Adds all days of the specified week with a tooltip to this instance of DayRanges that will be displayed as selected.

(int week, int year, java.lang.String tooltip, int selection)

void

deleteTimeInfo

Deletes the time information in the specified calendar.

(java.util.Calendar cal)

void

getCalendar

Returns the Calendar instance associated with this DayRanges instance.

()

java.util.Calendar

getDate

Returns a java.util.Date construct out of the specified day, month and year.

(int day, int month, int year)

java.util.Date

getSelectionMode

Returns the selection mode for the specified date.

(java.util.Date date)

int

getTooltip

Returns the tooltip for the specified date.

(java.util.Date date)

java.lang.String

isInRange

Returns a boolean value indicating if the specified date has been added to this instance of DayRanges.

(java.util.Date date)

boolean

isInRange

Returns a boolean value indicating if the specified date has been added to this instance of DayRanges.

(int day, int month, int year)

boolean

isLocaleUnknown

Returns a boolean value indicating if the locale has been set.

()

boolean

normalizeDate

Method to delete all time info in a Date. The given calendar is used to safely convert the given Date to a Date with the same day/month/year but with all time fields zeroed. The calendar instance will not be modified by this method (for example, the inherent time info inside the calendar will be preserved).

(java.util.Calendar cal, java.util.Date date)

java.util.Date

setLocale

Sets the locale (country) code that should be used for date calculation and presentation.

(java.util.Locale l)

void

setLocaleUnknown

If set to true the locale setting of the browser is used for date calculation and presentation.

(boolean localeUnknown)

void

Related Topics

Using beans and models