|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.widgets.calendar.UICCalendarModel
public class UICCalendarModel
The model that holds the internal representation for the UICCalendar.
Field Summary | |
---|---|
static String |
PROPERTY_CHANGE_BOUNDS
|
static String |
PROPERTY_CHANGE_CALENDAR
|
static String |
PROPERTY_CHANGE_DATE
|
static String |
PROPERTY_CHANGE_MONTH
|
static String |
PROPERTY_CHANGE_WEEK
|
static String |
PROPERTY_CHANGE_YEAR
|
Constructor Summary | |
---|---|
UICCalendarModel()
Constructs a UICCalendarModel with the default Locale and today as the current date. |
|
UICCalendarModel(Locale locale)
Constructs a UICCalendarModel with the specified Locale and today as the current date. |
|
UICCalendarModel(Locale locale,
Calendar calendar)
Constructs a UICCalendarModel with the specified locale and date. |
|
UICCalendarModel(Locale locale,
Calendar calendar,
Calendar min,
Calendar max)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
Calendar |
getCalendar()
Returns the model's calendar. |
int |
getDate()
Returns the current date. |
int |
getDaysInMonth()
Returns the number of days in the current month. |
int |
getDaysInNextMonth()
Returns the number of days in the next month. |
int |
getDaysInPrevMonth()
Returns the number of days in the previous month. |
int |
getFirstDayOfWeek()
Returns the first day of the week. |
Locale |
getLocale()
Returns the model's Locale. |
Calendar |
getMaxAllowedDate()
|
Calendar |
getMinAllowedDate()
|
int |
getMonth()
Returns the current month. |
int |
getWeek()
Returns the current week. |
int |
getYear()
Returns the current year. |
void |
parse(String date)
Parses the specified string as the new calendar data. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
void |
restoreBookmark()
Restores the bookmark. |
void |
rollMonth(boolean up)
Rolls the month one up or down. |
void |
rollYear(boolean up)
Rolls the year one up or down. |
void |
setBookmark()
Sets the bookmark to the current date. |
void |
setCalendar(Calendar calendar)
Sets the specified calendar as the model's date. |
void |
setDate(int date)
Changes the model to the specified date. |
void |
setMaxAllowedDate(Calendar maxAllowedDate)
|
void |
setMinAllowedDate(Calendar minAllowedDate)
|
void |
setMonth(int month)
Changes the model to the specified month. |
void |
setWeek(int week)
Changes the model to the specified week. |
void |
setYear(int year)
Changes the model to the specified year. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_CHANGE_CALENDAR
public static final String PROPERTY_CHANGE_YEAR
public static final String PROPERTY_CHANGE_MONTH
public static final String PROPERTY_CHANGE_DATE
public static final String PROPERTY_CHANGE_WEEK
public static final String PROPERTY_CHANGE_BOUNDS
Constructor Detail |
---|
public UICCalendarModel()
public UICCalendarModel(Locale locale)
locale
- the locale to use for this model.public UICCalendarModel(Locale locale, Calendar calendar)
locale
- the locale to use for this model.calendar
- the Calendar to use as the initial date.public UICCalendarModel(Locale locale, Calendar calendar, Calendar min, Calendar max)
Method Detail |
---|
public Calendar getMaxAllowedDate()
public void setMaxAllowedDate(Calendar maxAllowedDate)
maxAllowedDate
- the value to set.public Calendar getMinAllowedDate()
public void setMinAllowedDate(Calendar minAllowedDate)
minAllowedDate
- the value to set.public Locale getLocale()
public void setBookmark()
public void restoreBookmark()
public void parse(String date) throws ParseException
date
- the String to parse.
ParseException
- if the String could not be parsed
against the current locale.public void setCalendar(Calendar calendar)
calendar
- the Calendar to use as the current date.public Calendar getCalendar()
public void setDate(int date)
date
- the date (day in month) to set.public int getDate()
public void rollMonth(boolean up)
up
- if true the the month is changed to the next month,
if false to the previous.public void setMonth(int month)
month
- the month to set.public int getMonth()
public void rollYear(boolean up)
up
- if true the the year is changed to the next year,
if false to the previous.public void setYear(int year)
year
- the year to set.public int getYear()
public void setWeek(int week)
week
- the week to set.public int getWeek()
public int getFirstDayOfWeek()
public int getDaysInMonth()
public int getDaysInPrevMonth()
public int getDaysInNextMonth()
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangedAction.PropertyChangeCreator
public void removePropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangedAction.PropertyChangeCreator
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |