|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the methods components like JMonth
use to
display the days of a month. The model can be used to find things like:
Field Summary | |
static int |
DOW_NAMES_LONG
Type value indicating that the days of week names are long. |
static int |
DOW_NAMES_SHORT
Type value indicating that the days of week names are short. |
static int |
MONTH_NAMES_LONG
Type value indicating that the months' names are long. |
static int |
MONTH_NAMES_SHORT
Type value indicating that the months' names are short. |
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.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 |
setMonth(int month)
Specifies a new month to be represented by this model. |
void |
setYear(int year)
Specifies a new year to which the represented month belongs. |
Field Detail |
public static final int DOW_NAMES_SHORT
public static final int DOW_NAMES_LONG
public static final int MONTH_NAMES_SHORT
public static final int MONTH_NAMES_LONG
Method Detail |
public void addMonthModelListener(MonthModelListener listener)
listener
- the listener object that is informed about changes in this modelpublic void removeMonthModelListener(MonthModelListener listener)
listener
- the listener to be removedpublic int getDowNamesFormat()
public int getMonthNamesFormat()
public int getDowFirst()
public void setDowFirst(int day)
day
- day of week that is a java.util.Calendar
constant like Calendar.MONDAY
public int[] getDows()
Calendar.MONDAY
.getDowFirst()
public int getDowIndex(int day)
first
day of week which has the index 0.day
- day of week for which the index is requested. The values are
values like Calendar.MONDAY
.0..6
.getDowFirst()
public java.util.Date getMinimumAllowed()
null
then there is no restriction.null
.public java.util.Date getMaximumAllowed()
null
then there is no restriction.null
.public boolean isMonthInRange(int month, int year)
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 int getMonth()
Calendar
constant
like Calendar.JANUARY
.getYear()
public int getYear()
getMonth()
public void setMonth(int month)
month
- new month to be used by this model. The values are
Calendar
constants like Calendar.JANUARY
.getYear()
public void setYear(int year)
year
- year to which the represented month belongs.public void rollMonth(boolean up)
up
- true
if the month is rolled up and false
if the month is rolled downpublic void rollYear(boolean up)
up
- true
if the year is rolled up and false
if the year is rolled down
|
Java Date Picker v2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |