|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.standbysoft.datepicker.DefaultMonthModel
A default implementation for a MonthModel
.
Fields inherited from interface com.standbysoft.datepicker.MonthModel |
DOW_NAMES_LONG, DOW_NAMES_SHORT, MONTH_NAMES_LONG, MONTH_NAMES_SHORT |
Constructor Summary | |
DefaultMonthModel()
|
|
DefaultMonthModel(java.util.Locale locale)
|
|
DefaultMonthModel(java.util.Locale locale,
int dowFormat,
int monthFormat)
|
|
DefaultMonthModel(java.util.Locale locale,
int dowFirst,
int dowFormat,
int monthFormat)
|
Method Summary | |
void |
addMonthModelListener(MonthModelListener listener)
Adds an object that listens to changes in this model. |
int |
getDowFirst()
Returns the first day of week. |
int |
getDowIndex(int day)
Returns the index of a specified day in a week. |
int |
getDowNamesFormat()
Returns what format the names of days of week have. |
int[] |
getDows()
Returns the days of week starting with the first day of week. |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
|
java.util.Date |
getMaximumAllowed()
Returns the maximum allowed date that can be represented by this model. |
java.util.Date |
getMinimumAllowed()
Returns the minimum allowed date that can be represented by this model. |
int |
getMonth()
Returns the month represented by this model. |
int |
getMonthNamesFormat()
Returns what format the names of months have. |
int |
getYear()
Returns the year to which the represented month belongs. |
boolean |
isMonthInRange(int month,
int year)
Determines whether a specified month is in the allowed date range. |
void |
removeMonthModelListener(MonthModelListener listener)
Removes a specified listener from the list of registered listeners. |
void |
rollMonth(boolean up)
Rolls one month up or down. |
void |
rollYear(boolean up)
Rolls one year up or down. |
void |
setDowFirst(int day)
Specifies the first day of week. |
void |
setDowFormat(int format)
|
void |
setMaximumAllowed(java.util.Date maximum)
|
void |
setMinimumAllowed(java.util.Date minimum)
|
void |
setMonth(int month)
Specifies a new month to be represented by this model. |
void |
setMonthFormat(int format)
|
void |
setYear(int year)
Specifies a new year to which the represented month belongs. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultMonthModel()
public DefaultMonthModel(java.util.Locale locale)
public DefaultMonthModel(java.util.Locale locale, int dowFormat, int monthFormat)
public DefaultMonthModel(java.util.Locale locale, int dowFirst, int dowFormat, int monthFormat)
Method Detail |
public int[] getDows()
MonthModel
getDows
in interface MonthModel
com.standbysoft.datepicker.MonthModel
Calendar.MONDAY
.MonthModel.getDowFirst()
public int getDowIndex(int day)
MonthModel
first
day of week which has the index 0.getDowIndex
in interface MonthModel
com.standbysoft.datepicker.MonthModel
day
- day of week for which the index is requested. The values are
values like Calendar.MONDAY
.0..6
.MonthModel.getDowFirst()
public void setDowFormat(int format)
public int getDowNamesFormat()
MonthModel
getDowNamesFormat
in interface MonthModel
com.standbysoft.datepicker.MonthModel
public void setMonthFormat(int format)
public int getMonthNamesFormat()
MonthModel
getMonthNamesFormat
in interface MonthModel
com.standbysoft.datepicker.MonthModel
public void setDowFirst(int day)
MonthModel
setDowFirst
in interface MonthModel
com.standbysoft.datepicker.MonthModel
day
- day of week that is a java.util.Calendar
constant like Calendar.MONDAY
public int getDowFirst()
MonthModel
getDowFirst
in interface MonthModel
com.standbysoft.datepicker.MonthModel
public void setMinimumAllowed(java.util.Date minimum)
public void setMaximumAllowed(java.util.Date maximum)
public java.util.Date getMinimumAllowed()
MonthModel
null
then there is no restriction.getMinimumAllowed
in interface MonthModel
com.standbysoft.datepicker.MonthModel
null
.public java.util.Date getMaximumAllowed()
MonthModel
null
then there is no restriction.getMaximumAllowed
in interface MonthModel
com.standbysoft.datepicker.MonthModel
null
.public void setMonth(int month)
MonthModel
setMonth
in interface MonthModel
com.standbysoft.datepicker.MonthModel
month
- new month to be used by this model. The values are
Calendar
constants like Calendar.JANUARY
.MonthModel.getYear()
public void setYear(int year)
MonthModel
setYear
in interface MonthModel
com.standbysoft.datepicker.MonthModel
year
- year to which the represented month belongs.public boolean isMonthInRange(int month, int year)
MonthModel
isMonthInRange
in interface MonthModel
com.standbysoft.datepicker.MonthModel
month
- month that is testedyear
- year to which the month belongstrue
if the secified month is in the allowed date range
or false
otherwise.public void rollMonth(boolean up)
MonthModel
rollMonth
in interface MonthModel
com.standbysoft.datepicker.MonthModel
up
- true
if the month is rolled up and false
if the month is rolled downpublic void rollYear(boolean up)
MonthModel
rollYear
in interface MonthModel
com.standbysoft.datepicker.MonthModel
up
- true
if the year is rolled up and false
if the year is rolled downpublic int getMonth()
MonthModel
getMonth
in interface MonthModel
com.standbysoft.datepicker.MonthModel
Calendar
constant
like Calendar.JANUARY
.MonthModel.getYear()
public int getYear()
MonthModel
getYear
in interface MonthModel
com.standbysoft.datepicker.MonthModel
MonthModel.getMonth()
public void addMonthModelListener(MonthModelListener listener)
MonthModel
addMonthModelListener
in interface MonthModel
com.standbysoft.datepicker.MonthModel
listener
- the listener object that is informed about changes in this modelpublic void removeMonthModelListener(MonthModelListener listener)
MonthModel
removeMonthModelListener
in interface MonthModel
com.standbysoft.datepicker.MonthModel
listener
- the listener to be removedpublic java.util.EventListener[] getListeners(java.lang.Class listenerType)
|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |