T
- the owning buttonpublic abstract class JDateBaseConfig<T extends JDateBaseButton> extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_DATE
Name of the Date property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowNullDateSelection()
Allow Null Date selection.
|
String |
capitaliseString(String pValue)
Capitalise first letter of string.
|
LocalDate |
currentDate()
Obtain current date.
|
String |
formatDate(LocalDate pDate)
Format a date according to configured rules.
|
int |
getCurrentDay()
Obtain current day of month or zero if not current month.
|
LocalDate |
getCurrentMonth()
Get the current month.
|
LocalDate |
getEarliestDate()
Get the earliest select-able date.
|
int |
getEarliestDay()
Obtain Earliest day of month or zero if not current month.
|
LocalDate |
getLatestDate()
Get the latest select-able date.
|
int |
getLatestDay()
Obtain Latest day of month or zero if not current month.
|
Locale |
getLocale()
Get the locale.
|
T |
getOwner()
Get the owner.
|
abstract LocalDate |
getSelectedDate()
Get the selected date.
|
int |
getSelectedDay()
Obtain Selected day of month or zero if not current month.
|
void |
initialiseCurrent()
Initialise the current month.
|
static boolean |
isDateChanged(LocalDate pFirst,
LocalDate pSecond)
Has the date changed?
|
static boolean |
isSameMonth(LocalDate pFirst,
LocalDate pSecond)
Are the dates in the same month.
|
static boolean |
isSameYear(LocalDate pFirst,
LocalDate pSecond)
Are the dates in the same year.
|
void |
nextMonth()
Adjust current month to next month.
|
void |
nextYear()
Adjust current month to next year.
|
void |
previousMonth()
Adjust current month to previous month.
|
void |
previousYear()
Adjust current month to previous year.
|
void |
setAllowNullDateSelection(boolean pAllowNullDateSelection)
Allow null date selection.
|
void |
setEarliestDate(LocalDate pEarliest)
Set the earliest date.
|
void |
setFormat(String pFormat)
Set the date format.
|
void |
setFormatter(JDateFormatter pFormatter)
Set the date formatter.
|
void |
setLatestDate(LocalDate pLatest)
Set the latest date.
|
void |
setLocale(Locale pLocale)
Set Locale.
|
void |
setOwner(T pOwner)
Set the Button owner.
|
void |
setSelectedDate(LocalDate pDate)
Set the selected date.
|
void |
setSelectedDay(int pDay)
Set selected day in current month (called from dialog).
|
void |
setShowNarrowDays(boolean pShowNarrowDays)
Show Narrow Days.
|
void |
setTheLocale(Locale pLocale)
Set the Locale.
|
boolean |
showNarrowDays()
Show Narrow Days.
|
public static final String PROPERTY_DATE
public Locale getLocale()
public T getOwner()
public abstract LocalDate getSelectedDate()
public LocalDate getEarliestDate()
public LocalDate getLatestDate()
public LocalDate getCurrentMonth()
public boolean allowNullDateSelection()
public boolean showNarrowDays()
public final void setLocale(Locale pLocale)
pLocale
- the Localepublic void setTheLocale(Locale pLocale)
pLocale
- the Localepublic final void setFormat(String pFormat)
pFormat
- the format stringpublic final void setFormatter(JDateFormatter pFormatter)
pFormatter
- the formatterpublic void setAllowNullDateSelection(boolean pAllowNullDateSelection)
pAllowNullDateSelection
- true/falsepublic void setShowNarrowDays(boolean pShowNarrowDays)
pShowNarrowDays
- true/falsepublic void setOwner(T pOwner)
pOwner
- the owning buttonpublic final void setEarliestDate(LocalDate pEarliest)
pEarliest
- the Earliest select-able date (or null if unlimited)public final void setLatestDate(LocalDate pLatest)
pLatest
- the Latest select-able date (or null if unlimited)public String formatDate(LocalDate pDate)
pDate
- the date to formatpublic String capitaliseString(String pValue)
pValue
- the string to capitalise the first letter ofpublic LocalDate currentDate()
public int getCurrentDay()
public int getSelectedDay()
public int getEarliestDay()
public int getLatestDay()
public void previousMonth()
public void nextMonth()
public void previousYear()
public void nextYear()
public final void setSelectedDate(LocalDate pDate)
pDate
- the Selected datepublic void setSelectedDay(int pDay)
pDay
- the selected daypublic void initialiseCurrent()
public static boolean isDateChanged(LocalDate pFirst, LocalDate pSecond)
pFirst
- the first datepSecond
- the second datetrue/false
public static boolean isSameMonth(LocalDate pFirst, LocalDate pSecond)
pFirst
- the first date (maybe null)pSecond
- the second dateCopyright © 2012–2016. All rights reserved.