class CalendarPopup.CalendarMonthModel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<java.lang.String> |
daysOfWeek
The list of days of a week
|
private java.time.LocalDate |
endFirstTrailingDay
The end day of the trailing days before the current calendar month
|
private java.time.LocalDate |
endLastTrailingDay
The end day of the trailing days after the current calendar month
|
private java.time.LocalDate |
endMonthDay
The last day of the current calendar month
|
private int |
month
The current calendar month represented by [1..12]
|
private java.time.format.DateTimeFormatter |
monthYearFormatter
The special formatter for the calendar title
|
private java.time.LocalDate |
selected
The selected day of the current calendar month
|
private java.time.LocalDate |
startFirstTrailingDay
The beginning day of the trailing days before the current calendar month
|
private java.time.LocalDate |
startLastTrailingDay
The beginning day of the trailing days after the current calendar month
|
private java.time.LocalDate |
startMonthDay
The beginning day of the current calendar month
|
private java.time.format.DateTimeFormatter |
todayFormatter
The special formatter for the calendar footer
|
private int |
year
The current calendar year
|
Constructor and Description |
---|
CalendarMonthModel(java.time.chrono.Chronology chrono,
java.util.Locale locale,
java.time.LocalDate selected)
Represents the month model for the calendar popup.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getDaysOfWeek()
Gets the list of days of a week.
|
java.time.LocalDate |
getFirstVisibleDate()
Returns the date of the day beginning this calendar.
|
java.lang.String |
getMonthAndYear()
Gets the current calendar month and year as a title for this calendar.
|
java.lang.String |
getToday()
Gets the today date formatted according to the today formatter style.
|
CalendarPopup.CalendarMonthModel |
selectNextDay()
Sets the following day after the selected date to be a new selected one and updates
this model.
|
CalendarPopup.CalendarMonthModel |
selectNextMonth()
Sets the day of the following month after the selected date to be a new selected one and
updates this model.
|
CalendarPopup.CalendarMonthModel |
selectNextWeekDay()
Sets the day of the following week after the selected date to be a new selected one and
updates this model.
|
CalendarPopup.CalendarMonthModel |
selectPreviousDay()
Sets the previous day before the selected date to be a new selected one and updates
this model.
|
CalendarPopup.CalendarMonthModel |
selectPreviousMonth()
Sets the day of the previous month before the selected date to be a new selected one and
updates this model.
|
CalendarPopup.CalendarMonthModel |
selectPreviousWeekDay()
Sets the day of the previous week before the selected date to be a new selected one and
updates this model.
|
private void |
set(java.time.LocalDate selected)
Updates the current month model for the calendar popup with the given date.
|
private java.time.LocalDate startFirstTrailingDay
private java.time.LocalDate endFirstTrailingDay
private int month
private int year
private java.time.LocalDate startMonthDay
private java.time.LocalDate endMonthDay
private java.time.LocalDate startLastTrailingDay
private java.time.LocalDate endLastTrailingDay
private java.time.LocalDate selected
private final java.time.format.DateTimeFormatter monthYearFormatter
private final java.time.format.DateTimeFormatter todayFormatter
private final java.util.ArrayList<java.lang.String> daysOfWeek
public CalendarMonthModel(java.time.chrono.Chronology chrono, java.util.Locale locale, java.time.LocalDate selected)
chrono
- The given chronologylocale
- The given localeselected
- The given dateprivate void set(java.time.LocalDate selected)
selected
- The given datepublic CalendarPopup.CalendarMonthModel selectNextDay()
public CalendarPopup.CalendarMonthModel selectPreviousDay()
public CalendarPopup.CalendarMonthModel selectNextWeekDay()
public CalendarPopup.CalendarMonthModel selectPreviousWeekDay()
public CalendarPopup.CalendarMonthModel selectNextMonth()
public CalendarPopup.CalendarMonthModel selectPreviousMonth()
public java.lang.String getMonthAndYear()
public java.util.List<java.lang.String> getDaysOfWeek()
public java.lang.String getToday()
public java.time.LocalDate getFirstVisibleDate()