Package com.github.lgooddatepicker.components

## Class DatePickerSettings

- java.lang.Object
- - com.github.lgooddatepicker.components.DatePickerSettings

    public class DatePickerSettings
    extends java.lang.Object

DatePickerSettings, This holds all the settings that can be customized for a DatePicker (or an independent CalendarPanel). A DatePickerSettings instance may be (optionally) created, customized, and passed to the date picker constructor. If no settings instance is supplied when a date picker is constructed, then a settings instance with default settings is automatically generated and used by the date picker class. Each and all of the setting fields are set to a default value when a DatePickerSettings object is constructed. This means that the programmer does not need to overwrite all (or any) of the available settings to use this class. They only need to change any particular settings that they wish to customize.

### Nested Class Summary

Nested Classes
`static class` `DatePickerSettings.DateArea` DateArea, These enumerations represent areas of the components whose color can be changed.

### Constructor Summary

Constructors
`DatePickerSettings()` Constructor with Default Locale, This constructs a date picker settings instance using the system default locale and language.
`DatePickerSettings​(java.util.Locale pickerLocale)` Constructor with Custom Locale, This constructs a date picker settings instance using the supplied locale and language.

### Method Summary

All Methods Instance Methods Concrete Methods
`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.
`javax.swing.border.Border` `getBorderCalendarPopup()` getBorderCalendarPopup, Returns the value of this setting.
`java.util.ArrayList<CalendarBorderProperties>` `getBorderPropertiesList()` getBorderPropertiesList, Returns the value of this setting.
`java.awt.Color` `getColor​(DatePickerSettings.DateArea area)` getColor, This returns the currently set color for the specified area.
`java.awt.Color` `getColorBackgroundWeekdayLabels()` getColorBackgroundWeekdayLabels, Returns the value of this setting.
`java.awt.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.
`java.time.DayOfWeek` `getFirstDayOfWeekDisplayedOnCalendar()` getFirstDayOfWeekDisplayedOnCalendar, Returns the first day of the week as it will be displayed on the calendar.
`java.time.DayOfWeek` `getFirstDayOfWeekSetting()` getFirstDayOfWeekSetting, Returns the value of of the setting for the first day of the week.
`java.awt.Font` `getFontInvalidDate()` getFontInvalidDate, Returns the value of this setting.
`java.awt.Font` `getFontValidDate()` getFontValidDate, Returns the value of this setting.
`java.awt.Font` `getFontVetoedDate()` getFontVetoedDate, Returns the value of this setting.
`java.time.format.DateTimeFormatter` `getFormatForDatesBeforeCommonEra()` getFormatForDatesBeforeCommonEra, Returns the value of this setting.
`java.time.format.DateTimeFormatter` `getFormatForDatesCommonEra()` getFormatForDatesCommonEra, Returns the value of this setting.
`java.time.format.DateTimeFormatter` `getFormatForTodayButton()` getFormatForTodayButton, Returns the value of this setting.
`java.util.ArrayList<java.time.format.DateTimeFormatter>` `getFormatsForParsing()` getFormatsForParsing, Returns the value of this setting.
`java.lang.Integer` `getGapBeforeButtonPixels()` getGapBeforeButtonPixels, Returns the value of this setting.
`DateHighlightPolicy` `getHighlightPolicy()` getHighlightPolicy, This returns the highlight policy or null.
`java.util.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.
`java.lang.Integer` `getSizeTextFieldMinimumWidth()` getSizeTextFieldMinimumWidth, Returns the value of this setting.
`boolean` `getSizeTextFieldMinimumWidthDefaultOverride()` getSizeTextFieldMinimumWidthDefaultOverride, Returns the value of this setting.
`java.lang.String[]` `getTranslationArrayStandaloneLongMonthNames()` getTranslationArrayStandaloneLongMonthNames, Returns the value of this setting.
`java.lang.String[]` `getTranslationArrayStandaloneShortMonthNames()` getTranslationArrayStandaloneShortMonthNames, Returns the value of this setting.
`java.lang.String` `getTranslationClear()` getTranslationClear, Returns the value of this setting.
`java.lang.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.
`java.time.temporal.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​(java.time.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​(javax.swing.border.Border borderCalendarPopup)` setBorderCalendarPopup, This sets the border for the calendar popup window.
`void` `setBorderPropertiesList​(java.util.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, java.awt.Color color)` setColor, This sets a color for the specified area.
`void` `setColorBackgroundWeekdayLabels​(java.awt.Color colorBackgroundWeekdayLabels, boolean applyMatchingDefaultBorders)` setColorBackgroundWeekdayLabels, This sets the calendar background color for the weekday labels.
`void` `setColorBackgroundWeekNumberLabels​(java.awt.Color colorBackgroundWeekNumberLabels, boolean applyMatchingDefaultBorders)` setColorBackgroundWeekNumberLabels, This sets the calendar background color for the week number labels.
`boolean` `setDateRangeLimits​(java.time.LocalDate firstAllowedDate, java.time.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​(java.time.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​(java.awt.Font fontInvalidDate)` setFontInvalidDate, This sets the text field text font for invalid dates.
`void` `setFontValidDate​(java.awt.Font fontValidDate)` setFontValidDate, This sets the text field text font for valid dates.
`void` `setFontVetoedDate​(java.awt.Font fontVetoedDate)` setFontVetoedDate, This sets the text field text font for vetoed dates.
`void` `setFormatForDatesBeforeCommonEra​(java.lang.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` `setFormatForDatesBeforeCommonEra​(java.time.format.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` `setFormatForDatesCommonEra​(java.lang.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` `setFormatForDatesCommonEra​(java.time.format.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` `setFormatForTodayButton​(java.time.format.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​(java.util.ArrayList<java.time.format.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​(java.lang.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​(java.util.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String translationClear)` setTranslationClear, This sets the text of the calendars "Clear" button, as translated to the current language.
`void` `setTranslationToday​(java.lang.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​(java.time.temporal.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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DatePickerSettings

    public DatePickerSettings()

Constructor with Default Locale, This constructs a date picker settings instance using the system default locale and language. The constructor populates all the settings with default values.

#### DatePickerSettings

    public DatePickerSettings​(java.util.Locale pickerLocale)

Constructor with Custom Locale, This constructs a date picker settings instance using the supplied locale and language. The constructor populates all the settings with default values.

### Method Detail

#### copySettings

    public DatePickerSettings copySettings()

copySettings, This function creates and returns a deep copy of this DatePickerSettings instance. The new settings instance can be used with new DatePicker or CalendarPanel instances. Certain fields are not copied, which are listed below. These fields are not copied: parentDatePicker, parentCalendarPanel, borderCalendarPopup, vetoPolicy, and highlightPolicy. These fields are always set to their default value in the returned settings instance. (The default value for all of these fields is null.) If you would like to set any of the fields that are not copied, then you should set the desired fields after calling copySettings().

#### getAllowEmptyDates

    public boolean getAllowEmptyDates()

getAllowEmptyDates, Returns the value of this setting. See the "set" function for setting information.

#### getAllowKeyboardEditing

    public boolean getAllowKeyboardEditing()

getAllowKeyboardEditing, Returns the value of this setting. See the "set" function for setting information.

#### getBorderCalendarPopup

    public javax.swing.border.Border getBorderCalendarPopup()

getBorderCalendarPopup, Returns the value of this setting. See the "set" function for setting information.

#### getBorderPropertiesList

    public java.util.ArrayList<CalendarBorderProperties> getBorderPropertiesList()

getBorderPropertiesList, Returns the value of this setting. See the "set" function for setting information.

#### getColor

    public java.awt.Color getColor​(DatePickerSettings.DateArea area)

getColor, This returns the currently set color for the specified area.

#### getColorBackgroundWeekNumberLabels

    public java.awt.Color getColorBackgroundWeekNumberLabels()

getColorBackgroundWeekNumberLabels, Returns the value of this setting. See the "set" function for setting information.

#### getColorBackgroundWeekdayLabels

    public java.awt.Color getColorBackgroundWeekdayLabels()

getColorBackgroundWeekdayLabels, Returns the value of this setting. See the "set" function for setting information.

#### getDateRangeLimits

    public DateInterval getDateRangeLimits()

getDateRangeLimits, This will return a DateInterval containing any current date range limits. If no date range limits have been set, then this will return an empty DateInterval. (Both dates in the DateInterval will be null). If only one side of the date range limits was set, then the other date in the DateInterval will be null. Technical Notes: This will return any date range limits that were specifically created by calling "setDateRangeLimits()". Date range limits are internally implemented using a DateVetoPolicy. (Specifically using the class "DateVetoPolicyMinimumMaximumDate".) If setDateRangeLimits was never called, or if (for any reason) the current veto policy is not an instance of "DateVetoPolicyMinimumMaximumDate", then this will return an empty DateInterval. For additional details, see setDateRangeLimits().

#### getEnableMonthMenu

    public boolean getEnableMonthMenu()

getEnableMonthMenu, Returns the value of this setting. See the "set" function for setting information.

#### getEnableYearMenu

    public boolean getEnableYearMenu()

getEnableYearMenu, Returns the value of this setting. See the "set" function for setting information.

#### getFirstDayOfWeekDisplayedOnCalendar

    public java.time.DayOfWeek getFirstDayOfWeekDisplayedOnCalendar()

getFirstDayOfWeekDisplayedOnCalendar, Returns the first day of the week as it will be displayed on the calendar. Note that this setting may or may not match the first day of the week setting. See also: "weekNumbersDisplayed", and "weekNumbersForceFirstDayOfWeekToMatch".

#### getFirstDayOfWeekSetting

    public java.time.DayOfWeek getFirstDayOfWeekSetting()

getFirstDayOfWeekSetting, Returns the value of of the setting for the first day of the week. Note that this setting may or may not match the first day of the week that is displayed on the calendar. See also: "weekNumbersDisplayed", and "weekNumbersForceFirstDayOfWeekToMatch".

#### getFontInvalidDate

    public java.awt.Font getFontInvalidDate()

getFontInvalidDate, Returns the value of this setting. See the "set" function for setting information.

#### getFontValidDate

    public java.awt.Font getFontValidDate()

getFontValidDate, Returns the value of this setting. See the "set" function for setting information.

#### getFontVetoedDate

    public java.awt.Font getFontVetoedDate()

getFontVetoedDate, Returns the value of this setting. See the "set" function for setting information.

#### getFormatForDatesBeforeCommonEra

    public java.time.format.DateTimeFormatter getFormatForDatesBeforeCommonEra()

getFormatForDatesBeforeCommonEra, Returns the value of this setting. See the "set" function for setting information.

#### getFormatForDatesCommonEra

    public java.time.format.DateTimeFormatter getFormatForDatesCommonEra()

getFormatForDatesCommonEra, Returns the value of this setting. See the "set" function for setting information.

#### getFormatForTodayButton

    public java.time.format.DateTimeFormatter getFormatForTodayButton()

getFormatForTodayButton, Returns the value of this setting. See the "set" function for setting information.

#### getFormatsForParsing

    public java.util.ArrayList<java.time.format.DateTimeFormatter> getFormatsForParsing()

getFormatsForParsing, Returns the value of this setting. See the "set" function for setting information.

#### getGapBeforeButtonPixels

    public java.lang.Integer getGapBeforeButtonPixels()

getGapBeforeButtonPixels, Returns the value of this setting. See the "set" function for setting information.

#### getHighlightPolicy

    public DateHighlightPolicy getHighlightPolicy()

getHighlightPolicy, This returns the highlight policy or null.

#### getLocale

    public java.util.Locale getLocale()

getLocale, This returns locale setting of the date picker. The locale can only be set in the DatePickerSettings constructor.

#### getParentCalendarPanel

    public CalendarPanel getParentCalendarPanel()

getParentCalendarPanel, Returns the calendar panel that is the parent of the settings, or null if no parent calendar panel has been set.

#### getParentDatePicker

    public DatePicker getParentDatePicker()

getParentDatePicker, Returns the date picker that is the parent of the settings, or null if no parent date picker has been set.

#### getSizeDatePanelMinimumHeight

    public int getSizeDatePanelMinimumHeight()

getSizeDatePanelMinimumHeight, Returns the value of this setting. See the "set" function for setting information.

#### getSizeDatePanelMinimumWidth

    public int getSizeDatePanelMinimumWidth()

getSizeDatePanelMinimumWidth, Returns the value of this setting. See the "set" function for setting information.

#### getSizeTextFieldMinimumWidth

    public java.lang.Integer getSizeTextFieldMinimumWidth()

getSizeTextFieldMinimumWidth, Returns the value of this setting. See the "set" function for setting information.

#### getSizeTextFieldMinimumWidthDefaultOverride

    public boolean getSizeTextFieldMinimumWidthDefaultOverride()

getSizeTextFieldMinimumWidthDefaultOverride, Returns the value of this setting. See the "set" function for setting information.

#### getTranslationArrayStandaloneLongMonthNames

    public java.lang.String[] getTranslationArrayStandaloneLongMonthNames()

getTranslationArrayStandaloneLongMonthNames, Returns the value of this setting. See the "set" function for setting information.

#### getTranslationArrayStandaloneShortMonthNames

    public java.lang.String[] getTranslationArrayStandaloneShortMonthNames()

getTranslationArrayStandaloneShortMonthNames, Returns the value of this setting. See the "set" function for setting information.

#### getTranslationClear

    public java.lang.String getTranslationClear()

getTranslationClear, Returns the value of this setting. See the "set" function for setting information.

#### getTranslationToday

    public java.lang.String getTranslationToday()

getTranslationToday, Returns the value of this setting. See the "set" function for setting information.

#### getVetoPolicy

    public DateVetoPolicy getVetoPolicy()

getVetoPolicy, This returns the veto policy or null.

#### getVisibleClearButton

    public boolean getVisibleClearButton()

getVisibleClearButton, This returns the visibility state of the named component.

#### getVisibleDateTextField

    public boolean getVisibleDateTextField()

getVisibleDateTextField, This returns the visibility state of the named component.

#### getVisibleMonthMenuButton

    public boolean getVisibleMonthMenuButton()

getVisibleMonthMenuButton, This returns the visibility state of the named component.

#### getVisibleNextMonthButton

    public boolean getVisibleNextMonthButton()

getVisibleNextMonthButton, This returns the visibility state of the named component.

#### getVisibleNextYearButton

    public boolean getVisibleNextYearButton()

getVisibleNextYearButton, This returns the visibility state of the named component.

#### getVisiblePreviousMonthButton

    public boolean getVisiblePreviousMonthButton()

getVisiblePreviousMonthButton, This returns the visibility state of the named component.

#### getVisiblePreviousYearButton

    public boolean getVisiblePreviousYearButton()

getVisiblePreviousYearButton, This returns the visibility state of the named component.

#### getVisibleTodayButton

    public boolean getVisibleTodayButton()

getVisibleTodayButton, This returns the visibility state of the named component.

#### getVisibleYearMenuButton

    public boolean getVisibleYearMenuButton()

getVisibleYearMenuButton, This returns the visibility state of the named component.

#### getWeekNumberRules

    public java.time.temporal.WeekFields getWeekNumberRules()

getWeekNumberRules, Returns the value of this setting. See the "set" function for setting information.

#### getWeekNumbersDisplayed

    public boolean getWeekNumbersDisplayed()

getWeekNumbersDisplayed, Returns the value of this setting. See the "set" function for setting information.

#### getWeekNumbersWillOverrideFirstDayOfWeek

    public boolean getWeekNumbersWillOverrideFirstDayOfWeek()

getWeekNumbersWillOverrideFirstDayOfWeek, Returns the value of this setting. See the "set" function for setting information.

#### hasParent

    public boolean hasParent()

hasParent, This returns true if this settings instance has a parent, otherwise returns false. A settings instance will have a parent if the settings instance has already been used to construct a DatePicker, or to construct an independent CalendarPanel. Note that settings instances cannot be reused. They are only expected to ever have one parent.

#### isDateAllowed

    public boolean isDateAllowed​(java.time.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. If allowEmptyDates is false, and the specified date is null, then this returns false. If a veto policy exists, and the specified date is vetoed, then this returns false. If the date is not vetoed, or if empty dates are allowed and the date is null, then this returns true.

#### setAllowEmptyDates

    public void setAllowEmptyDates​(boolean allowEmptyDates)

setAllowEmptyDates, This sets whether or not empty dates (null dates) are allowed in the DatePicker or independent CalendarPanel. If this is true, then empty dates will be allowed. If this is false, then empty dates will not be allowed. If setting this function to false, it is recommended to call this function -before- setting a veto policy. This sequence will guarantee that the DatePicker.getDate() (or CalendarPanel.getSelectedDate()) functions will never return a null value, and will guarantee that the setAllowEmptyDates() function will not throw an exception. If the current date is null and you set allowEmptyDates to false, then this function will attempt to initialize the current date to today's date. This function will throw an exception if it fails to initialize a null date. An exception is only possible if a veto policy is set before calling this function, and the veto policy vetoes today's date.

#### setAllowKeyboardEditing

    public void setAllowKeyboardEditing​(boolean allowKeyboardEditing)

setAllowKeyboardEditing, This sets whether or not keyboard editing is allowed for this date picker. If this is true, then dates can be entered into the date picker either by using the keyboard or the mouse. If this is false, then dates can only be selected by using the mouse. The default value is true. It is generally recommended to leave this setting as "true". Accessibility Impact: Disallowing the use of the keyboard, and requiring the use of the mouse, could impact the accessibility of your program for disabled persons. Note: This setting does not impact the automatic enforcement of valid or vetoed dates. To learn about the automatic date validation and enforcement for keyboard entered text, see the javadocs for the DatePicker class.

#### setBorderCalendarPopup

    public void setBorderCalendarPopup​(javax.swing.border.Border borderCalendarPopup)

setBorderCalendarPopup, This sets the border for the calendar popup window. If this is null, a default border will be provided by the CustomPopup class. The default value is null. This function only applies if the parent of the settings is a DatePicker. (Not if the parent is an independent CalendarPanel.)

#### setBorderPropertiesList

    public void setBorderPropertiesList​(java.util.ArrayList<CalendarBorderProperties> borderPropertiesList)

setBorderPropertiesList, This sets the list of border properties objects that specifies the colors and thicknesses of the borders in the CalendarPanel. By default, a default set of border properties is stored in the borderPropertiesList. Passing in "null" when setting this property will restore the default border properties. If you don't want the default border properties but wish to truly "clear" the border properties list, you could pass in an empty ArrayList. To modify the calendar borders (including individual border colors, thickness, or visibility), you can supply your own ArrayList of border properties. Border properties objects are applied in the order that they appear in the ArrayList. To learn how to set the CalendarBorderProperties objects, see the CalendarBorderProperties class javadocs. The default border properties have a one pixel blue border around the date labels, and two vertical light blue borders near the weekday labels (which match the color of the weekday labels). The outer top horizontal border and the outer left vertical border are invisible by default. The default border properties also include borders above and below the "week numbers" column which match the color of the week numbers labels. (However, these borders are only displayed when the week numbers are displayed.) Whenever the border properties list is applied, the borders are first "cleared" by setting all borders to the following settings: Invisible, and black color. This is true of both the default border properties and any programmer supplied border properties. Note: If weekNumbersDisplayed is set to false, then the borders located in the week number columns (Columns 1 and 2) will always be hidden.

#### setColor

    public void setColor​(DatePickerSettings.DateArea area,
                         java.awt.Color color)

setColor, This sets a color for the specified area. Setting an area to null will restore the default color for that area.

#### setColorBackgroundWeekNumberLabels

    public void setColorBackgroundWeekNumberLabels​(java.awt.Color colorBackgroundWeekNumberLabels,
                                                   boolean applyMatchingDefaultBorders)

setColorBackgroundWeekNumberLabels, This sets the calendar background color for the week number labels. The default color is a medium sky blue.

Parameters:
  `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.

#### setColorBackgroundWeekdayLabels

    public void setColorBackgroundWeekdayLabels​(java.awt.Color colorBackgroundWeekdayLabels,
                                                boolean applyMatchingDefaultBorders)

setColorBackgroundWeekdayLabels, This sets the calendar background color for the weekday labels. The default color is a medium sky blue.

Parameters:
  `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.

#### setDateRangeLimits

    public boolean setDateRangeLimits​(java.time.LocalDate firstAllowedDate,
                                      java.time.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. Calling this function will always replace any existing DateVetoPolicy. If you only want to limit one side of the date range, then you can pass in "null" for the other date variable. If you pass in null for both values, then the current veto policy will be cleared. Important Note: The DatePicker or independent CalendarPanel associated with this settings instance is known as the "parent component". This function can only be called after the parent component is constructed with this settings instance. If this is called before the parent is constructed, then an exception will be thrown. For more details, see: "DatePickerSettings.setVetoPolicy()". Return value: It's possible to set a veto policy that vetoes the currently selected date. This function returns true if the selected date is allowed by the new veto policy and the other current settings, or false if the selected date is vetoed or disallowed. Setting a new veto policy does not modify the selected date. Is up to the programmer to resolve any potential conflict between a new veto policy, and the currently selected date.

#### setEnableMonthMenu

    public void setEnableMonthMenu​(boolean enableMonthMenu)

setEnableMonthMenu, This sets the month popup menu to be enabled or disabled. (Note: The month label is located in the header area of the calendar panel.) If this is true, then the month label will give a visual indication of any "mouse over" events, and the month menu will open when the month label is clicked. If this is false, then the month label will not indicate mouse over events, and the month menu can not be opened. The default value for this setting is true. Note: It is generally recommended to leave the month menu enabled. Disabling this menu can negatively impact calendar usability. When the month menu is disabled, the user may have to press the month navigation button many times to reach a desired month.

#### setEnableYearMenu

    public void setEnableYearMenu​(boolean enableYearMenu)

setEnableYearMenu, This sets the year popup menu to be enabled or disabled. (Note: The year label is located in the header area of the calendar panel.) If this is true, then the year label will give a visual indication of any "mouse over" events, and the year menu will open when the year label is clicked. If this is false, then the year label will not indicate mouse over events, and the year menu can not be opened. The default value for this setting is true. Note: It is generally recommended to leave the year menu enabled. Disabling this menu can negatively impact calendar usability. When the year menu is disabled, it may become difficult or effectively impossible for the user to navigate to years that are far into the past or the future.

#### setFirstDayOfWeek

    public void setFirstDayOfWeek​(java.time.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". The default value is generated using the locale of the settings instance. By default, If weekNumbersDisplayed is set to true, then the first day of the week will not match the setting. (weekNumbersDisplayed is false by default.) For additional details, see the javadocs for the following settings: "weekNumbersDisplayed", and "weekNumbersForceFirstDayOfWeekToMatch".

#### setFontInvalidDate

    public void setFontInvalidDate​(java.awt.Font fontInvalidDate)

setFontInvalidDate, This sets the text field text font for invalid dates. The default font is a normal undecorated font. (Note: The color for invalid dates defaults to Color.red. See also: "colorTextInvalidDate".)

#### setFontValidDate

    public void setFontValidDate​(java.awt.Font fontValidDate)

setFontValidDate, This sets the text field text font for valid dates. The default font is a normal undecorated font. Note: Changing the font for valid dates may also change the default minimum size for the date picker. This will not affect the minimum size if it has been overridden by the programmer.

#### setFontVetoedDate

    public void setFontVetoedDate​(java.awt.Font fontVetoedDate)

setFontVetoedDate, This sets the text field text font for vetoed dates. The default font crosses out the vetoed date. (Has a strikethrough font attribute.)

#### setFormatForDatesBeforeCommonEra

    public void setFormatForDatesBeforeCommonEra​(java.time.format.DateTimeFormatter formatForDatesBeforeCommonEra)

setFormatForDatesBeforeCommonEra, This sets the format that is used to display or parse BCE dates in the date picker, from a DateTimeFormatter instance. The default value for the date format is generated using the locale of the settings instance. For most desired date formats, it would probably be easier to use the other "pattern string" version of this function. (which accepts a date pattern string instead of a DateTimeFormatter instance.) Note: It is important to use the letter "u" (astronomical year) instead of "y" (year of era) when creating pattern strings for BCE dates. This is because the DatePicker uses ISO 8601, which specifies "Astronomical year numbering". (Additional details: The astronomical year "-1" and "1 BC" are not the same thing. Astronomical years are zero-based, and BC dates are one-based. Astronomical year "0", is the same year as "1 BC", and astronomical year "-1" is the same year as "2 BC", and so forth.) The various codes for the date pattern string are described at this link: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html If the date picker has already been constructed, then calling this function will cause immediate validation of the text field text.

#### setFormatForDatesBeforeCommonEra

    public void setFormatForDatesBeforeCommonEra​(java.lang.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. The default value for the date format is generated using the locale of the settings instance. Note: It is important to use the letter "u" (astronomical year) instead of "y" (year of era) when creating pattern strings for BCE dates. This is because the DatePicker uses ISO 8601, which specifies "Astronomical year numbering". (Additional details: The astronomical year "-1" and "1 BC" are not the same thing. Astronomical years are zero-based, and BC dates are one-based. Astronomical year "0", is the same year as "1 BC", and astronomical year "-1" is the same year as "2 BC", and so forth.) The various codes for the date pattern string are described at this link: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html If the date picker has already been constructed, then calling this function will cause immediate validation of the text field text.

#### setFormatForDatesCommonEra

    public void setFormatForDatesCommonEra​(java.time.format.DateTimeFormatter formatForDatesCommonEra)

setFormatForDatesCommonEra, This sets the format that is used to display or parse CE dates in the date picker, from a DateTimeFormatter instance. The default value for the date format is generated using the locale of the settings instance. For most desired date formats, it would probably be easier to use the other "pattern string" version of this function. (which accepts a date pattern string instead of a DateTimeFormatter instance.) The various codes for the date pattern string are described at this link: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html If the date picker has already been constructed, then calling this function will cause immediate validation of the text field text. Note: Changing the format for CE dates may also change the default minimum width of the date picker text field.

#### setFormatForDatesCommonEra

    public void setFormatForDatesCommonEra​(java.lang.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. The default value for the date format is generated using the locale of the settings instance. The various codes for the date pattern string are described at this link: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html If the date picker has already been constructed, then calling this function will cause immediate validation of the text field text. Note: Changing the format for CE dates may also change the default minimum width of the date picker text field.

#### setFormatForTodayButton

    public void setFormatForTodayButton​(java.time.format.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. The default value is generated using the locale of the settings instance.

#### setFormatsForParsing

    public void setFormatsForParsing​(java.util.ArrayList<java.time.format.DateTimeFormatter> formatsForParsing)

setFormatsForParsing, This holds a list of formats that are used to attempt to parse dates that are typed by the user. When parsing a date, these formats are tried in the order that they appear in this list. Note that the formatForDatesCommonEra and formatForDatesBeforeCommonEra are always tried (in that order) before any other parsing formats. The default values for the formatsForParsing are generated using the pickerLocale, using the enum constants in java.time.format.FormatStyle.

#### setGapBeforeButtonPixels

    public void setGapBeforeButtonPixels​(java.lang.Integer gapBeforeButtonPixels)

setGapBeforeButtonPixels, This specifies the desired width for the gap between the date picker and the toggle calendar button (in pixels). The default value is null. If this is left at null, then the default value is 3 pixels.

#### setHighlightPolicy

    public void setHighlightPolicy​(DateHighlightPolicy highlightPolicy)

setHighlightPolicy, This sets a highlight policy for the parent DatePicker or parent independent CalendarPanel. If a highlight policy is supplied, it will be used to determine which dates should be highlighted in the calendar panel. The highlight policy can also supply tooltip text for any highlighted dates. See the demo class for an example of constructing a highlight policy. By default, there is no highlight policy. (The default value is null.)

#### setLocale

    public void setLocale​(java.util.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. Warning: Every setting whose default value depends on the locale, will be overwritten whenever this function is called. This is a list of all the settings which are overwritten by this function: locale, translationArrayStandaloneLongMonthNames, translationArrayStandaloneShortMonthNames, translationToday, translationClear, formatForTodayButton, formatForDatesCommonEra, formatForDatesBeforeCommonEra, formatsForParsing, firstDayOfWeek, weekNumberRules. For most applications, it is generally recommended to only set the locale from the DatePickerSettings constructor. If you use setLocale() to change the locale after construction, then you will overwrite any previously customized locale-specific settings. Passing in "null" will apply the default locale for the current Java Virtual Machine.

#### setSizeDatePanelMinimumHeight

    public void setSizeDatePanelMinimumHeight​(int sizeDatePanelMinimumHeight)

setSizeDatePanelMinimumHeight, This sets the minimum height, in pixels, of the date label area. The date label area is the part of the calendar panel that holds (only) the date labels. The remainder of the calendar panel is automatically resized to encompass the date label area. The default value for this variable is (6 * 18). If the default value is modified, the programmer may also wish to adjust sizeDatePanelPixelsExtraHeight.

#### setSizeDatePanelMinimumWidth

    public void setSizeDatePanelMinimumWidth​(int sizeDatePanelMinimumWidth)

setSizeDatePanelMinimumWidth, This sets the minimum width, in pixels, of the date label area. The date label area is the part of the calendar panel that holds (only) the date labels. The remainder of the calendar panel is automatically resized to encompass the date label area. The default value for this variable is (7 * 30). If the default value is modified, the programmer may also wish to adjust sizeDatePanelPixelsExtraWidth.

#### setSizeTextFieldMinimumWidth

    public void setSizeTextFieldMinimumWidth​(java.lang.Integer minimumWidthInPixels)

setSizeTextFieldMinimumWidth, This sets the minimum width in pixels, of the DatePicker text field. (The text field is located to the left of the date picker "popup calendar" button, and displays the currently selected date.) The default value for this setting is null. When this is set to null, a default width for the date picker text field will be automatically calculated and applied to fit "the largest possible date" (with a four digit year) that can be displayed with the current date picker settings. The settings used to calculate the default text field width include the locale (the language), the fontValidDate, and the formatForDatesCommonEra.

#### setSizeTextFieldMinimumWidthDefaultOverride

    public void setSizeTextFieldMinimumWidthDefaultOverride​(boolean defaultShouldOverrideIfNeeded)

setSizeTextFieldMinimumWidthDefaultOverride, This specifies how the date picker should choose the appropriate minimum width for the date picker text field. (As described below.) If this is true, then the applied minimum width will be the largest of either the default, or any programmer supplied, minimum widths. If this is false, then any programmer supplied minimum width will always override the default minimum width. (Even if the programmer supplied width is too small to fit the dates that can be displayed in the DatePicker). The default value for this setting is true. This setting only has an effect if (sizeTextFieldMinimumWidth != null). See also: "setSizeTextFieldMinimumWidth()".

#### setTranslationArrayStandaloneLongMonthNames

    public void setTranslationArrayStandaloneLongMonthNames​(java.lang.String[] newTranslationArray)

setTranslationArrayStandaloneLongMonthNames, This sets an array of month names to use for the calendar panel header, as translated to the current language. It is not expected that this variable will need to be changed by the programmer. The default values are generated using the locale of the settings instance, by retrieving the translated text for the current language from the class called java.text.DateFormatSymbols. This array is indexed with January = 0. The Calendar class month name constants can also be used for indexing. (Calendar.JANUARY, etc). Setting this to null will restore the default values. Expected array contents: The array should always have a length of 12. Each element should always contain a string that is not null and not empty.

#### setTranslationArrayStandaloneShortMonthNames

    public void setTranslationArrayStandaloneShortMonthNames​(java.lang.String[] newTranslationArray)

setTranslationArrayStandaloneShortMonthNames, This sets an array of short month names to use for the calendar panel header, as translated to the current language. It is not expected that this variable will need to be changed by the programmer. The default values are generated using the locale of the settings instance, by retrieving the translated text for the current language from the class called java.text.DateFormatSymbols. This array is indexed with January = 0. The Calendar class month name constants can also be used for indexing. (Calendar.JANUARY, etc). Setting this to null will restore the default values. Expected array contents: The array should always have a length of 12. Each element should always contain a string that is not null and not empty.

#### setTranslationClear

    public void setTranslationClear​(java.lang.String translationClear)

setTranslationClear, This sets the text of the calendars "Clear" button, as translated to the current language. It is not expected that this variable will need to be changed by the programmer. If you wish to supply a new translation for the date picker, it would generally be better to add (or edit) your translation in the "TranslationResources.properties" file. The default value is generated using the locale of the settings instance, by retrieving the translated text for the current language from the properties file.

#### setTranslationToday

    public void setTranslationToday​(java.lang.String translationToday)

setTranslationToday, This sets the text of the calendars "Today" button, as translated to the current language. It is not expected that this variable will need to be changed by the programmer. If you wish to supply a new translation for the date picker, it would generally be better to add (or edit) your translation in the "TranslationResources.properties" file. The default value is generated from the locale of the settings instance, by retrieving the translated text for the current language from the properties file.

#### setVetoPolicy

    public boolean setVetoPolicy​(DateVetoPolicy vetoPolicy)

setVetoPolicy, This sets a veto policy for the parent DatePicker or parent independent CalendarPanel. Important Note: The DatePicker or independent CalendarPanel associated with this settings instance is known as the "parent component". This function can only be called after the parent component is constructed with this settings instance. If this is called before the parent is constructed, then an exception will be thrown. When a veto policy is supplied, it will be used to determine which dates can or can not be selected in the calendar panel. (Vetoed dates are also not accepted into the date picker text field). See the demo class for an example of constructing a veto policy. By default, there is no veto policy. Setting this function to null will clear any veto policy that has been set. Return value: It's possible to set a veto policy that vetoes the currently selected date. This function returns true if the selected date is allowed by the new veto policy and the other current settings, or false if the selected date is vetoed or disallowed. Setting a new veto policy does not modify the selected date. Is up to the programmer to resolve any potential conflict between a new veto policy, and the currently selected date.

#### setVisibleDateTextField

    public void setVisibleDateTextField​(boolean isVisible)

setVisibleDateTextField, This sets the visibility of the DatePicker text field. This can be used in conjunction with "setGapBeforeButtonPixels(0)" to create an instance of the date picker that only displays the toggle calendar button. One reason a developer might want to do this, is if they wished to provide their own component to display any selected date.

#### setVisibleClearButton

    public void setVisibleClearButton​(boolean isVisible)

setVisibleClearButton, This sets the visibility of the named component.

#### setVisibleMonthMenuButton

    public void setVisibleMonthMenuButton​(boolean isVisible)

setVisibleMonthMenuButton, This sets the visibility of the named component.

#### setVisibleNextMonthButton

    public void setVisibleNextMonthButton​(boolean isVisible)

setVisibleNextMonthButton, This sets the visibility of the named component.

#### setVisibleNextYearButton

    public void setVisibleNextYearButton​(boolean isVisible)

setVisibleNextYearButton, This sets the visibility of the named component.

#### setVisiblePreviousMonthButton

    public void setVisiblePreviousMonthButton​(boolean isVisible)

setVisiblePreviousMonthButton, This sets the visibility of the named component.

#### setVisiblePreviousYearButton

    public void setVisiblePreviousYearButton​(boolean isVisible)

setVisiblePreviousYearButton, This sets the visibility of the named component.

#### setVisibleTodayButton

    public void setVisibleTodayButton​(boolean isVisible)

setVisibleTodayButton, This sets the visibility of the named component.

#### setVisibleYearMenuButton

    public void setVisibleYearMenuButton​(boolean isVisible)

setVisibleYearMenuButton, This sets the visibility of the named component.

#### setWeekNumberRules

    public void setWeekNumberRules​(java.time.temporal.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. The definitions for the first day of the week, and for the minimum number of days that constitutes the first week of the year, varies between locales. The Java time WeekFields class specifies those rules. If you set this setting to null, then the weekNumberRules will be set to match the DatePickerSettings locale. By default, the week number rules will match the DatePickerSettings locale. If you would like the week number rules to be the same for all calendars (regardless of the locale), then you should consider setting the weekNumberRules to one of these two widely used rule sets: WeekFields.ISO or WeekFields.SUNDAY_START.

#### setWeekNumbersDisplayed

    public 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. The week numbers will be shown if this is true, or they will not be shown if this is false. This is false by default. The week numbers are locale sensitive, because the definition of the first day of the week, and the definition for the minimum number of days in the first week of the year, varies between locales. By default, when "weekNumbersDisplayed" is true, the first day of the week used by the calendar will always match the weekNumberRules definition for first day of the week. This behavior can be changed by modifying the setting "weekNumbersForceFirstDayOfWeekToMatch".

Parameters:
  `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 false
  `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 "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.

#### setWeekNumbersWillOverrideFirstDayOfWeek

    public void setWeekNumbersWillOverrideFirstDayOfWeek​(boolean weekNumbersWillOverrideFirstDayOfWeek)

setWeekNumbersWillOverrideFirstDayOfWeek, This setting determines how to resolve any conflict between the "weekNumberRules" setting and the "firstDayOfWeek" setting. Note: This setting only has an effect when "weekNumbersDisplayed" is true. 1) If this setting is true (Default): Whenever the week numbers are displayed, then the first day of the week that is displayed on the calendar will always match the currently set "weekNumberRules". This enforces a strict and consistent definition for the week numbers. Specifically, this guarantees that all seven dates in each calendar row will belong to a single week number. Note: The WeekNumberRules are an instance of the java.time.temporal "WeekFields" class. For more information about how week numbers are defined, see the WeekFields javadocs. 2) If this setting is false: The first day of the week that is displayed on the calendar will always match the "firstDayOfWeek" setting, and a more "flexible" definition of week numbers will be applied. Using a firstDayOfWeek that does not match the week number rules will cause each calendar row to contain dates that fall inside two different week numbers. (As defined by the weekNumberRules.) In this circumstance, the displayed week numbers will be determined by a "majority rules" system, which is defined below. The "majority rules" system: Under the majority rule system, the calendar will count the number of days in each row that belong to each week number. In a single row, four (or more) days will match one week number, and three (or less) days will match a different week number. The most commonly occurring week number will be displayed next to each row. To summarize: If your program needs to implement a strict week number definition, then it is recommended to leave this setting at its default value (of true). If it is more important to have a flexible first day of the week, then you could set this value to false. When this setting is false, the displayed week numbers will follow a "majority rules" system, and will not exactly match the week number rules.