public class DatePickerSettings extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DatePickerSettings.DateArea
DateArea, These enumerations represent areas of the components whose color can be changed.
|
Constructor and Description |
---|
DatePickerSettings()
Constructor with Default Locale, This constructs a date picker settings instance using the
system default locale and language.
|
DatePickerSettings(Locale pickerLocale)
Constructor with Custom Locale, This constructs a date picker settings instance using the
supplied locale and language.
|
Modifier and Type | Method and Description |
---|---|
DatePickerSettings |
copySettings()
copySettings, This function creates and returns a deep copy of this DatePickerSettings
instance.
|
boolean |
getAllowEmptyDates()
getAllowEmptyDates, Returns the value of this setting.
|
boolean |
getAllowKeyboardEditing()
getAllowKeyboardEditing, Returns the value of this setting.
|
Border |
getBorderCalendarPopup()
getBorderCalendarPopup, Returns the value of this setting.
|
ArrayList<CalendarBorderProperties> |
getBorderPropertiesList()
getBorderPropertiesList, Returns the value of this setting.
|
Color |
getColor(DatePickerSettings.DateArea area)
getColor, This returns the currently set color for the specified area.
|
Color |
getColorBackgroundWeekdayLabels()
getColorBackgroundWeekdayLabels, Returns the value of this setting.
|
Color |
getColorBackgroundWeekNumberLabels()
getColorBackgroundWeekNumberLabels, Returns the value of this setting.
|
DateInterval |
getDateRangeLimits()
getDateRangeLimits, This will return a DateInterval containing any current date range limits.
|
boolean |
getEnableMonthMenu()
getEnableMonthMenu, Returns the value of this setting.
|
boolean |
getEnableYearMenu()
getEnableYearMenu, Returns the value of this setting.
|
DayOfWeek |
getFirstDayOfWeekDisplayedOnCalendar()
getFirstDayOfWeekDisplayedOnCalendar, Returns the first day of the week as it will be
displayed on the calendar.
|
DayOfWeek |
getFirstDayOfWeekSetting()
getFirstDayOfWeekSetting, Returns the value of of the setting for the first day of the week.
|
Font |
getFontInvalidDate()
getFontInvalidDate, Returns the value of this setting.
|
Font |
getFontValidDate()
getFontValidDate, Returns the value of this setting.
|
Font |
getFontVetoedDate()
getFontVetoedDate, Returns the value of this setting.
|
DateTimeFormatter |
getFormatForDatesBeforeCommonEra()
getFormatForDatesBeforeCommonEra, Returns the value of this setting.
|
DateTimeFormatter |
getFormatForDatesCommonEra()
getFormatForDatesCommonEra, Returns the value of this setting.
|
DateTimeFormatter |
getFormatForTodayButton()
getFormatForTodayButton, Returns the value of this setting.
|
ArrayList<DateTimeFormatter> |
getFormatsForParsing()
getFormatsForParsing, Returns the value of this setting.
|
Integer |
getGapBeforeButtonPixels()
getGapBeforeButtonPixels, Returns the value of this setting.
|
DateHighlightPolicy |
getHighlightPolicy()
getHighlightPolicy, This returns the highlight policy or null.
|
Locale |
getLocale()
getLocale, This returns locale setting of the date picker.
|
CalendarPanel |
getParentCalendarPanel()
getParentCalendarPanel, Returns the calendar panel that is the parent of the settings, or
null if no parent calendar panel has been set.
|
DatePicker |
getParentDatePicker()
getParentDatePicker, Returns the date picker that is the parent of the settings, or null if
no parent date picker has been set.
|
int |
getSizeDatePanelMinimumHeight()
getSizeDatePanelMinimumHeight, Returns the value of this setting.
|
int |
getSizeDatePanelMinimumWidth()
getSizeDatePanelMinimumWidth, Returns the value of this setting.
|
Integer |
getSizeTextFieldMinimumWidth()
getSizeTextFieldMinimumWidth, Returns the value of this setting.
|
boolean |
getSizeTextFieldMinimumWidthDefaultOverride()
getSizeTextFieldMinimumWidthDefaultOverride, Returns the value of this setting.
|
String[] |
getTranslationArrayStandaloneLongMonthNames()
getTranslationArrayStandaloneLongMonthNames, Returns the value of this setting.
|
String[] |
getTranslationArrayStandaloneShortMonthNames()
getTranslationArrayStandaloneShortMonthNames, Returns the value of this setting.
|
String |
getTranslationClear()
getTranslationClear, Returns the value of this setting.
|
String |
getTranslationToday()
getTranslationToday, Returns the value of this setting.
|
DateVetoPolicy |
getVetoPolicy()
getVetoPolicy, This returns the veto policy or null.
|
boolean |
getVisibleClearButton()
getVisibleClearButton, This returns the visibility state of the named component.
|
boolean |
getVisibleDateTextField()
getVisibleDateTextField, This returns the visibility state of the named component.
|
boolean |
getVisibleMonthMenuButton()
getVisibleMonthMenuButton, This returns the visibility state of the named component.
|
boolean |
getVisibleNextMonthButton()
getVisibleNextMonthButton, This returns the visibility state of the named component.
|
boolean |
getVisibleNextYearButton()
getVisibleNextYearButton, This returns the visibility state of the named component.
|
boolean |
getVisiblePreviousMonthButton()
getVisiblePreviousMonthButton, This returns the visibility state of the named component.
|
boolean |
getVisiblePreviousYearButton()
getVisiblePreviousYearButton, This returns the visibility state of the named component.
|
boolean |
getVisibleTodayButton()
getVisibleTodayButton, This returns the visibility state of the named component.
|
boolean |
getVisibleYearMenuButton()
getVisibleYearMenuButton, This returns the visibility state of the named component.
|
WeekFields |
getWeekNumberRules()
getWeekNumberRules, Returns the value of this setting.
|
boolean |
getWeekNumbersDisplayed()
getWeekNumbersDisplayed, Returns the value of this setting.
|
boolean |
getWeekNumbersWillOverrideFirstDayOfWeek()
getWeekNumbersWillOverrideFirstDayOfWeek, Returns the value of this setting.
|
boolean |
hasParent()
hasParent, This returns true if this settings instance has a parent, otherwise returns false.
|
boolean |
isDateAllowed(LocalDate date)
isDateAllowed, This checks to see if the specified date is allowed by any currently set veto
policy, and allowed by the current setting of allowEmptyDates.
|
void |
setAllowEmptyDates(boolean allowEmptyDates)
setAllowEmptyDates, This sets whether or not empty dates (null dates) are allowed in the
DatePicker or independent CalendarPanel.
|
void |
setAllowKeyboardEditing(boolean allowKeyboardEditing)
setAllowKeyboardEditing, This sets whether or not keyboard editing is allowed for this date
picker.
|
void |
setBorderCalendarPopup(Border borderCalendarPopup)
setBorderCalendarPopup, This sets the border for the calendar popup window.
|
void |
setBorderPropertiesList(ArrayList<CalendarBorderProperties> borderPropertiesList)
setBorderPropertiesList, This sets the list of border properties objects that specifies the
colors and thicknesses of the borders in the CalendarPanel.
|
void |
setColor(DatePickerSettings.DateArea area,
Color color)
setColor, This sets a color for the specified area.
|
void |
setColorBackgroundWeekdayLabels(Color colorBackgroundWeekdayLabels,
boolean applyMatchingDefaultBorders)
setColorBackgroundWeekdayLabels, This sets the calendar background color for the weekday
labels.
|
void |
setColorBackgroundWeekNumberLabels(Color colorBackgroundWeekNumberLabels,
boolean applyMatchingDefaultBorders)
setColorBackgroundWeekNumberLabels, This sets the calendar background color for the week
number labels.
|
boolean |
setDateRangeLimits(LocalDate firstAllowedDate,
LocalDate lastAllowedDate)
setDateRangeLimits, This is a convenience function, for setting a DateVetoPolicy that will
limit the allowed dates in the parent object to a specified minimum and maximum date value.
|
void |
setEnableMonthMenu(boolean enableMonthMenu)
setEnableMonthMenu, This sets the month popup menu to be enabled or disabled.
|
void |
setEnableYearMenu(boolean enableYearMenu)
setEnableYearMenu, This sets the year popup menu to be enabled or disabled.
|
void |
setFirstDayOfWeek(DayOfWeek firstDayOfWeek)
setFirstDayOfWeek, This sets the day of the week that will be displayed in the far left
column of the CalendarPanel, as the "first day of the week".
|
void |
setFontInvalidDate(Font fontInvalidDate)
setFontInvalidDate, This sets the text field text font for invalid dates.
|
void |
setFontValidDate(Font fontValidDate)
setFontValidDate, This sets the text field text font for valid dates.
|
void |
setFontVetoedDate(Font fontVetoedDate)
setFontVetoedDate, This sets the text field text font for vetoed dates.
|
void |
setFormatForDatesBeforeCommonEra(DateTimeFormatter formatForDatesBeforeCommonEra)
setFormatForDatesBeforeCommonEra, This sets the format that is used to display or parse BCE
dates in the date picker, from a DateTimeFormatter instance.
|
void |
setFormatForDatesBeforeCommonEra(String patternString)
setFormatForDatesBeforeCommonEra, This sets the format that is used to display or parse BCE
dates in the date picker, from a DateTimeFormatter pattern string.
|
void |
setFormatForDatesCommonEra(DateTimeFormatter formatForDatesCommonEra)
setFormatForDatesCommonEra, This sets the format that is used to display or parse CE dates in
the date picker, from a DateTimeFormatter instance.
|
void |
setFormatForDatesCommonEra(String patternString)
setFormatForDatesCommonEra, This sets the format that is used to display or parse CE dates in
the date picker, from a DateTimeFormatter pattern string.
|
void |
setFormatForTodayButton(DateTimeFormatter formatForTodayButton)
setFormatForTodayButton, This sets the format that is used to format today's date into a date
string, which is displayed on the today button.
|
void |
setFormatsForParsing(ArrayList<DateTimeFormatter> formatsForParsing)
setFormatsForParsing, This holds a list of formats that are used to attempt to parse dates
that are typed by the user.
|
void |
setGapBeforeButtonPixels(Integer gapBeforeButtonPixels)
setGapBeforeButtonPixels, This specifies the desired width for the gap between the date
picker and the toggle calendar button (in pixels).
|
void |
setHighlightPolicy(DateHighlightPolicy highlightPolicy)
setHighlightPolicy,
This sets a highlight policy for the parent DatePicker or parent independent CalendarPanel.
|
void |
setLocale(Locale locale)
setLocale, This will set the locale for this DatePickerSettings instance, and will set all
other settings that depend on the locale to their default values.
|
void |
setSizeDatePanelMinimumHeight(int sizeDatePanelMinimumHeight)
setSizeDatePanelMinimumHeight, This sets the minimum height, in pixels, of the date label
area.
|
void |
setSizeDatePanelMinimumWidth(int sizeDatePanelMinimumWidth)
setSizeDatePanelMinimumWidth, This sets the minimum width, in pixels, of the date label area.
|
void |
setSizeTextFieldMinimumWidth(Integer minimumWidthInPixels)
setSizeTextFieldMinimumWidth, This sets the minimum width in pixels, of the DatePicker text
field.
|
void |
setSizeTextFieldMinimumWidthDefaultOverride(boolean defaultShouldOverrideIfNeeded)
setSizeTextFieldMinimumWidthDefaultOverride, This specifies how the date picker should choose
the appropriate minimum width for the date picker text field.
|
void |
setTranslationArrayStandaloneLongMonthNames(String[] newTranslationArray)
setTranslationArrayStandaloneLongMonthNames, This sets an array of month names to use for the
calendar panel header, as translated to the current language.
|
void |
setTranslationArrayStandaloneShortMonthNames(String[] newTranslationArray)
setTranslationArrayStandaloneShortMonthNames, This sets an array of short month names to use
for the calendar panel header, as translated to the current language.
|
void |
setTranslationClear(String translationClear)
setTranslationClear, This sets the text of the calendars "Clear" button, as translated to the
current language.
|
void |
setTranslationToday(String translationToday)
setTranslationToday, This sets the text of the calendars "Today" button, as translated to the
current language.
|
boolean |
setVetoPolicy(DateVetoPolicy vetoPolicy)
setVetoPolicy,
This sets a veto policy for the parent DatePicker or parent independent CalendarPanel.
|
void |
setVisibleClearButton(boolean isVisible)
setVisibleClearButton, This sets the visibility of the named component.
|
void |
setVisibleDateTextField(boolean isVisible)
setVisibleDateTextField, This sets the visibility of the DatePicker text field.
|
void |
setVisibleMonthMenuButton(boolean isVisible)
setVisibleMonthMenuButton, This sets the visibility of the named component.
|
void |
setVisibleNextMonthButton(boolean isVisible)
setVisibleNextMonthButton, This sets the visibility of the named component.
|
void |
setVisibleNextYearButton(boolean isVisible)
setVisibleNextYearButton, This sets the visibility of the named component.
|
void |
setVisiblePreviousMonthButton(boolean isVisible)
setVisiblePreviousMonthButton, This sets the visibility of the named component.
|
void |
setVisiblePreviousYearButton(boolean isVisible)
setVisiblePreviousYearButton, This sets the visibility of the named component.
|
void |
setVisibleTodayButton(boolean isVisible)
setVisibleTodayButton, This sets the visibility of the named component.
|
void |
setVisibleYearMenuButton(boolean isVisible)
setVisibleYearMenuButton, This sets the visibility of the named component.
|
void |
setWeekNumberRules(WeekFields weekNumberRules)
setWeekNumberRules, This sets the week number rules that will be used to show the week
numbers (the weeks of the year), whenever the week numbers are displayed on this calendar.
|
void |
setWeekNumbersDisplayed(boolean weekNumbersDisplayed,
boolean applyMatchingDefaultBorders)
setWeekNumbersDisplayed, This specifies whether or not numbers for the "week of the year"
should be displayed on the calendar panel.
|
void |
setWeekNumbersWillOverrideFirstDayOfWeek(boolean weekNumbersWillOverrideFirstDayOfWeek)
setWeekNumbersWillOverrideFirstDayOfWeek, This setting determines how to resolve any conflict
between the "weekNumberRules" setting and the "firstDayOfWeek" setting.
|
public DatePickerSettings()
public DatePickerSettings(Locale pickerLocale)
public DatePickerSettings copySettings()
public boolean getAllowEmptyDates()
public boolean getAllowKeyboardEditing()
public Border getBorderCalendarPopup()
public ArrayList<CalendarBorderProperties> getBorderPropertiesList()
public Color getColor(DatePickerSettings.DateArea area)
public Color getColorBackgroundWeekNumberLabels()
public Color getColorBackgroundWeekdayLabels()
public DateInterval getDateRangeLimits()
public boolean getEnableMonthMenu()
public boolean getEnableYearMenu()
public DayOfWeek getFirstDayOfWeekDisplayedOnCalendar()
public DayOfWeek getFirstDayOfWeekSetting()
public Font getFontInvalidDate()
public Font getFontValidDate()
public Font getFontVetoedDate()
public DateTimeFormatter getFormatForDatesBeforeCommonEra()
public DateTimeFormatter getFormatForDatesCommonEra()
public DateTimeFormatter getFormatForTodayButton()
public ArrayList<DateTimeFormatter> getFormatsForParsing()
public Integer getGapBeforeButtonPixels()
public DateHighlightPolicy getHighlightPolicy()
public Locale getLocale()
public CalendarPanel getParentCalendarPanel()
public DatePicker getParentDatePicker()
public int getSizeDatePanelMinimumHeight()
public int getSizeDatePanelMinimumWidth()
public Integer getSizeTextFieldMinimumWidth()
public boolean getSizeTextFieldMinimumWidthDefaultOverride()
public String[] getTranslationArrayStandaloneLongMonthNames()
public String[] getTranslationArrayStandaloneShortMonthNames()
public String getTranslationClear()
public String getTranslationToday()
public DateVetoPolicy getVetoPolicy()
public boolean getVisibleClearButton()
public boolean getVisibleDateTextField()
public boolean getVisibleMonthMenuButton()
public boolean getVisibleNextMonthButton()
public boolean getVisibleNextYearButton()
public boolean getVisiblePreviousMonthButton()
public boolean getVisiblePreviousYearButton()
public boolean getVisibleTodayButton()
public boolean getVisibleYearMenuButton()
public WeekFields getWeekNumberRules()
public boolean getWeekNumbersDisplayed()
public boolean getWeekNumbersWillOverrideFirstDayOfWeek()
public boolean hasParent()
public boolean isDateAllowed(LocalDate date)
public void setAllowEmptyDates(boolean allowEmptyDates)
public void setAllowKeyboardEditing(boolean allowKeyboardEditing)
public void setBorderCalendarPopup(Border borderCalendarPopup)
public void setBorderPropertiesList(ArrayList<CalendarBorderProperties> borderPropertiesList)
public void setColor(DatePickerSettings.DateArea area, Color color)
public void setColorBackgroundWeekNumberLabels(Color colorBackgroundWeekNumberLabels, boolean applyMatchingDefaultBorders)
applyMatchingDefaultBorders
- This determines if this function will update the border
label properties to show the appropriate default borders. The default border label settings
are different, depending on the "colorBackgroundWeekNumberLabels". If you have not customized
the border label properties, then it is recommended that you always set the
"applyMatchingDefaultBorders" parameter to true. This will ensure that the calendar borders
will always use the correct default settings. If you set this parameter to false, than the
current border settings will not be changed by this function.public void setColorBackgroundWeekdayLabels(Color colorBackgroundWeekdayLabels, boolean applyMatchingDefaultBorders)
applyMatchingDefaultBorders
- This determines if this function will update the border
label properties to show the appropriate default borders. The default border label settings
are different, depending on the "colorBackgroundWeekdayLabels". If you have not customized
the border label properties, then it is recommended that you always set the
"applyMatchingDefaultBorders" parameter to true. This will ensure that the calendar borders
will always use the correct default settings. If you set this parameter to false, than the
current border settings will not be changed by this function.public boolean setDateRangeLimits(LocalDate firstAllowedDate, LocalDate lastAllowedDate)
public void setEnableMonthMenu(boolean enableMonthMenu)
public void setEnableYearMenu(boolean enableYearMenu)
public void setFirstDayOfWeek(DayOfWeek firstDayOfWeek)
public void setFontInvalidDate(Font fontInvalidDate)
public void setFontValidDate(Font fontValidDate)
public void setFontVetoedDate(Font fontVetoedDate)
public void setFormatForDatesBeforeCommonEra(DateTimeFormatter formatForDatesBeforeCommonEra)
public void setFormatForDatesBeforeCommonEra(String patternString)
public void setFormatForDatesCommonEra(DateTimeFormatter formatForDatesCommonEra)
public void setFormatForDatesCommonEra(String patternString)
public void setFormatForTodayButton(DateTimeFormatter formatForTodayButton)
public void setFormatsForParsing(ArrayList<DateTimeFormatter> formatsForParsing)
public void setGapBeforeButtonPixels(Integer gapBeforeButtonPixels)
public void setHighlightPolicy(DateHighlightPolicy highlightPolicy)
public void setLocale(Locale locale)
public void setSizeDatePanelMinimumHeight(int sizeDatePanelMinimumHeight)
public void setSizeDatePanelMinimumWidth(int sizeDatePanelMinimumWidth)
public void setSizeTextFieldMinimumWidth(Integer minimumWidthInPixels)
public void setSizeTextFieldMinimumWidthDefaultOverride(boolean defaultShouldOverrideIfNeeded)
public void setTranslationArrayStandaloneLongMonthNames(String[] newTranslationArray)
public void setTranslationArrayStandaloneShortMonthNames(String[] newTranslationArray)
public void setTranslationClear(String translationClear)
public void setTranslationToday(String translationToday)
public boolean setVetoPolicy(DateVetoPolicy vetoPolicy)
public void setVisibleDateTextField(boolean isVisible)
public void setVisibleClearButton(boolean isVisible)
public void setVisibleMonthMenuButton(boolean isVisible)
public void setVisibleNextMonthButton(boolean isVisible)
public void setVisibleNextYearButton(boolean isVisible)
public void setVisiblePreviousMonthButton(boolean isVisible)
public void setVisiblePreviousYearButton(boolean isVisible)
public void setVisibleTodayButton(boolean isVisible)
public void setVisibleYearMenuButton(boolean isVisible)
public void setWeekNumberRules(WeekFields weekNumberRules)
public void setWeekNumbersDisplayed(boolean weekNumbersDisplayed, boolean applyMatchingDefaultBorders)
weekNumbersDisplayed
- This determines whether the week numbers should be displayed on
the calendar. They will be shown if this is true, or not shown that this is falseapplyMatchingDefaultBorders
- This determines if this function will update the border
label properties to show the appropriate default borders. The default border label settings
are different, depending on "showWeekNumbers". If you have not customized the border label
properties, then it is recommended that you always set the "applyMatchingDefaultBorders"
parameter to true. This will ensure that the calendar borders will always use the correct
default settings. If you set this parameter to false, than the current border settings will
not be changed by this function.public void setWeekNumbersWillOverrideFirstDayOfWeek(boolean weekNumbersWillOverrideFirstDayOfWeek)
Copyright © 2018. All rights reserved.