public class CalendarModel extends Object
DatePicker and its
subclasses.| Modifier and Type | Field and Description |
|---|---|
static int |
DAYS_IN_WEEK
Number of days normally displayed in a week.
|
static int |
WEEKS_IN_MONTH
The number of weeks normally displayed in a month.
|
| Constructor and Description |
|---|
CalendarModel()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
formatCurrentMonth()
Formats the current specified month.
|
String |
formatDayOfMonth(Date date)
Formats a date's day of month.
|
String |
formatDayOfWeek(int dayInWeek)
Format a day in the week.
|
Date |
getCurrentFirstDayOfFirstWeek()
Gets the first day of the first week in the currently specified month.
|
Date |
getCurrentMonth()
Gets the date representation of the currently specified month.
|
protected com.google.gwt.i18n.client.DateTimeFormat |
getDayOfMonthFormatter()
Gets the date of month formatter.
|
protected com.google.gwt.i18n.client.DateTimeFormat |
getDayOfWeekFormatter()
Gets the day of week formatter.
|
protected com.google.gwt.i18n.client.DateTimeFormat |
getMonthAndYearFormatter()
Gets the month and year formatter.
|
boolean |
isInCurrentMonth(Date date)
Is a date in the currently specified month?
|
protected void |
refresh()
Refresh the current model as needed.
|
void |
setCurrentMonth(Date currentDate)
Sets the currently specified date.
|
void |
shiftCurrentMonth(int deltaMonths)
Shifts the currently specified date by the given number of months.
|
public static final int WEEKS_IN_MONTH
public static final int DAYS_IN_WEEK
public String formatCurrentMonth()
public String formatDayOfMonth(Date date)
date - the datepublic String formatDayOfWeek(int dayInWeek)
dayInWeek - the day in week to formatpublic Date getCurrentFirstDayOfFirstWeek()
public Date getCurrentMonth()
public boolean isInCurrentMonth(Date date)
date - the datepublic void setCurrentMonth(Date currentDate)
currentDate - the currently specified datepublic void shiftCurrentMonth(int deltaMonths)
deltaMonths - - number of months to be added to the current dateprotected com.google.gwt.i18n.client.DateTimeFormat getDayOfMonthFormatter()
protected com.google.gwt.i18n.client.DateTimeFormat getDayOfWeekFormatter()
protected com.google.gwt.i18n.client.DateTimeFormat getMonthAndYearFormatter()
protected void refresh()
Copyright © 2014. All rights reserved.