Module is.codion.swing.common.ui
Interface CalendarPanel.Builder
- Enclosing class:
CalendarPanel
public static interface CalendarPanel.Builder
Builds a
CalendarPanel instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()enabled(ObservableState enabled) firstDayOfWeek(DayOfWeek firstDayOfWeek) Sets the first day of week, in case it should differ from the one specified bylocale(Locale)includeTime(boolean includeTime) includeTodayButton(boolean includeTodayButton) includeWeekNumbers(boolean includeWeekNumbers) keyStroke(ControlKey<?> controlKey, KeyStroke keyStroke) Specifies the locale, controlling the start of week day and the full date display format.minimalDaysInFirstWeek(int minimalDaysInFirstWeek) Note that calling this method also setsincludeTime(boolean)to false.value(@Nullable LocalDateTime value) Note that calling this method also setsincludeTime(boolean)to true.
-
Method Details
-
locale
Specifies the locale, controlling the start of week day and the full date display format. Note that setting the locale also setsfirstDayOfWeek(DayOfWeek)andminimalDaysInFirstWeek(int)according to the given locale.- Parameters:
locale- the locale- Returns:
- this builder instance
-
firstDayOfWeek
Sets the first day of week, in case it should differ from the one specified bylocale(Locale)- Parameters:
firstDayOfWeek- the first day of week- Returns:
- this builder instance
-
minimalDaysInFirstWeek
- Parameters:
minimalDaysInFirstWeek- the minimal number of days in the first week of the year- Returns:
- this builder instance
-
value
Note that calling this method also setsincludeTime(boolean)to false. In case of a null valueLocalDate.now()is used.- Parameters:
value- the initial value- Returns:
- this builder instance
-
value
Note that calling this method also setsincludeTime(boolean)to true. In case of a null valueLocalDateTime.now()is used.- Parameters:
value- the initial value- Returns:
- this builder instance
-
includeTime
- Parameters:
includeTime- if true then time fields are included (hours, minutes)- Returns:
- this builder instance
-
includeTodayButton
- Parameters:
includeTodayButton- true if a 'Today' button for selecting the current date should be included- Returns:
- this builder instance
-
includeWeekNumbers
- Parameters:
includeWeekNumbers- true if week numbers should be displayed- Returns:
- this builder instance
-
keyStroke
- Parameters:
controlKey- the control keykeyStroke- the keyStroke to assign to the given control- Returns:
- this builder instance
-
enabled
- Parameters:
enabled- the state controlling the component enabled status- Returns:
- this builder instance
-
build
CalendarPanel build()- Returns:
- a new
CalendarPanelbased on this builder
-