|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
com.google.gwt.widgetideas.datepicker.client.impl.DatePickerDate
com.google.gwt.widgetideas.datepicker.client.impl.LocaleCalendarUtils
public class LocaleCalendarUtils
LocaleCalendarUtils public class provides all the tables required to display the calendar grid for a month with respect to a locale. It also provides methods to obtain following data:
Field Summary | |
---|---|
static int |
SELECTED
Constant SELECTED represents the user selected date in the grid. |
static int |
TODAY
Constant TODAY represents today's date in the grid. |
static int |
TYPE_CONTROL
Constant TYPE_CONTROL represents the grid cell representing a control. |
static int |
TYPE_CURR_MONTH
Constant TYPE_CURR_MONTH represents the grid cells for currently displayed month. |
static int |
TYPE_NEXT_MONTH
Constant TYPE_NEXT_MONTH represents the grid cells for the month next to currently displayed one. |
static int |
TYPE_PREV_MONTH
Constant TYPE_PREV_MONTH represents the grid cells for the month previous to currently displayed one. |
Constructor Summary | |
---|---|
LocaleCalendarUtils(boolean adjacentMonths)
Public constructor for LocaleCalendarUtils class. |
Method Summary | |
---|---|
boolean |
addMonths(int delta)
Public method addMonths() add a positive or negative number to the date. |
DatePickerDate |
addSpecialDay(java.util.Date date)
Public method addSpecialDay() add a date to the list of special dates that require special formatting. |
DatePickerCell[] |
dayOfMonthNames()
Public method dayOfMonthNames() returns an array of labels for days of a month in the default locale. |
DatePickerCell[] |
dayOfMonthNamesNext()
Public method dayOfMonthNamesNext() returns an array of labels for days of the next month in the default locale. |
DatePickerCell[] |
dayOfMonthNamesPrev()
Public method dayOfMonthNamesPrev() returns an array of labels for days of the previous month in the default locale. |
static java.lang.String[] |
dayOfWeekNames()
Public method dayOfWeekNames() returns an array of the names for days of a week in the default locale. |
void |
enableAdjacentMonths(boolean adjacentMonths)
Public method enableAdjacentMonths() enables or disables the display of trailing and leading dates from previous and next months. |
int |
gridStart()
Public method gridStart() returns the column number in the grid for the month start. |
boolean |
isYearBeforeMonth()
Public method isYearBeforeMonth() returns whether the year is before month in the current locale or not. |
com.google.gwt.user.client.ui.Label |
monthName()
Public method monthName() returns the name of the current month in the default locale. |
com.google.gwt.user.client.ui.ListBox |
monthNames()
Public method monthNames() returns a ListBox containing the 12 month names in the default locale. |
int |
nextMonthDays()
Public method nextMonthDays() returns number of days in the next month. |
int |
numSpecialDays()
Public method numSpecialDays() returns number of dates for which special formatting is set. |
int |
prevMonthDays()
Public method prevMonthDays() returns number of days in the previous month. |
void |
selectedDate(int monthType,
int dayOfMonth)
Public method selectedDate() sets the date user selected. |
void |
setFullDate(java.util.Date date)
Public method selectedDate() sets to the given date. |
void |
setMonth(int month)
Public method setMonth() sets to the given month. |
boolean |
setToday()
Public method setToday() sets date to today's date. |
void |
setYear(int year)
Public method setYear() sets to the given year. |
DatePickerDate |
specialDate(int i)
Public method specialDate() returns a date from the list of dates that require special formatting. |
DatePickerCell |
todayCell()
Public method todayCell() returns the Label for the cell displaying today's date. |
int |
weekendEnd()
Public method weekendEnd() returns the day of the week on which weekend ends. |
int |
weekendStart()
Public method weekendStart() returns the day of the week on which weekend starts. |
java.lang.String[] |
weekOfYear()
Public method weekOfYear() returns a list of strings for week number of the year for the weeks displayed as per the locale set. |
int |
weekStart()
Public method weekStart() returns the day of the week on which week starts as per the locale. |
com.google.gwt.user.client.ui.Label |
yearName()
Public method yearName() returns the name of the current year in the default locale. |
com.google.gwt.user.client.ui.ListBox |
yearNames()
Public method yearNames() returns a ListBox containing the 120 year names in the default locale. |
Methods inherited from class com.google.gwt.widgetideas.datepicker.client.impl.DatePickerDate |
---|
currMonthSize, dayDiff, getDateAtDayStart, getDateAtMonthStart, prevMonthSize, setDate, setDayDiff, setTag, tag |
Methods inherited from class java.util.Date |
---|
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setHours, setMinutes, setSeconds, setTime, toGMTString, toLocaleString, toString, UTC |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SELECTED
public static final int TODAY
public static final int TYPE_PREV_MONTH
public static final int TYPE_CURR_MONTH
public static final int TYPE_NEXT_MONTH
public static final int TYPE_CONTROL
Constructor Detail |
---|
public LocaleCalendarUtils(boolean adjacentMonths)
Method Detail |
---|
public static java.lang.String[] dayOfWeekNames()
public boolean addMonths(int delta)
addMonths
in class DatePickerDate
delta
- - number of months to be added to the current date
public DatePickerDate addSpecialDay(java.util.Date date)
date
- - date that require special formattingpublic DatePickerCell[] dayOfMonthNames()
public DatePickerCell[] dayOfMonthNamesNext()
public DatePickerCell[] dayOfMonthNamesPrev()
public void enableAdjacentMonths(boolean adjacentMonths)
adjacentMonths
- - A boolean indicating whether display of trailing
and leading dates from previous and next months.public int gridStart()
public boolean isYearBeforeMonth()
public com.google.gwt.user.client.ui.Label monthName()
public com.google.gwt.user.client.ui.ListBox monthNames()
public int nextMonthDays()
public int numSpecialDays()
public int prevMonthDays()
public void selectedDate(int monthType, int dayOfMonth)
monthType
- - Month type of the cell in which user clicked. Type can
be current, previous or next month.dayOfMonth
- - Selected day of the monthpublic void setFullDate(java.util.Date date)
setFullDate
in class DatePickerDate
date
- - Date to be set.public void setMonth(int month)
setMonth
in class DatePickerDate
month
- - Month to be set.public boolean setToday()
setToday
in class DatePickerDate
public void setYear(int year)
setYear
in class DatePickerDate
year
- - Year to be set.public DatePickerDate specialDate(int i)
i
- - position of the date entry in the special date list.public DatePickerCell todayCell()
public int weekendEnd()
public int weekendStart()
public java.lang.String[] weekOfYear()
public int weekStart()
public com.google.gwt.user.client.ui.Label yearName()
public com.google.gwt.user.client.ui.ListBox yearNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |