T - denotes the calendar system to be usedpublic class CalendarPicker<T extends CalendarDate>
extends javafx.scene.layout.HBox
Represents a combination of a text editor and a button which can open a calendar view for picking any arbitrary calendar date.
General customization can be done via adding style sheets this way:
private CalendarPicker<PersianCalendar> myDatePicker = CalendarPicker.persianWithSystemDefaults();
myDatePicker.getStylesheets().add("/myCSS-Style.css");
The customization of the style of single cells can be done by a CellCustomizer:
myDatePicker.setCellCustomizer(
(cell, column, row, model, date) -> {
cell.setStyle("-fx-font-family: myFont;");
}
);
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ObjectProperty<CellCustomizer<T>> |
cellCustomizerProperty()
Allows user-defined customizations of date cells in the month view.
|
static CalendarPicker<CopticCalendar> |
coptic(Locale locale,
Supplier<CopticCalendar> todaySupplier)
Creates a new
CalendarPicker for the coptic calendar system. |
static CalendarPicker<CopticCalendar> |
copticWithSystemDefaults()
Creates a new
CalendarPicker for the coptic calendar system using system defaults
for the locale and the current local time. |
javafx.beans.property.ReadOnlyObjectProperty<ChronoFormatter<T>> |
dateFormatProperty()
The customized editor date format.
|
javafx.beans.property.ReadOnlyStringProperty |
errorProperty()
The current error information associated with this component.
|
static CalendarPicker<EthiopianCalendar> |
ethiopian(Locale locale,
Supplier<EthiopianCalendar> todaySupplier)
Creates a new
CalendarPicker for the ethiopian calendar system. |
static CalendarPicker<EthiopianCalendar> |
ethiopianWithSystemDefaults()
Creates a new
CalendarPicker for the ethiopian calendar system using system defaults
for the locale and the current local time. |
static CalendarPicker<PlainDate> |
gregorian(Locale locale,
Supplier<PlainDate> todaySupplier)
Creates a new
CalendarPicker for the gregorian calendar system. |
static CalendarPicker<PlainDate> |
gregorianWithSystemDefaults()
Creates a new
CalendarPicker for the gregorian calendar system using system defaults
for the locale and the current local time. |
static CalendarPicker<HebrewCalendar> |
hebrew(Locale locale,
Supplier<HebrewCalendar> todaySupplier)
Creates a new
CalendarPicker for the hebrew calendar system (jewish calendar). |
static CalendarPicker<HebrewCalendar> |
hebrewWithSystemDefaults()
Creates a new
CalendarPicker for the hebrew calendar system (jewish calendar) using system defaults
for the locale and the current local time. |
static CalendarPicker<HijriCalendar> |
hijri(VariantSource variantSource,
Locale locale,
Supplier<HijriCalendar> todaySupplier)
Creates a new
CalendarPicker for the islamic calendar. |
static CalendarPicker<HijriCalendar> |
hijriWithSystemDefaults(VariantSource variantSource)
Creates a new
CalendarPicker for the islamic calendar using system defaults
for the locale and the current local time. |
static CalendarPicker<JulianCalendar> |
julian(Locale locale,
Supplier<JulianCalendar> todaySupplier)
Creates a new
CalendarPicker for the Julian calendar system. |
static CalendarPicker<JulianCalendar> |
julianWithSystemDefaults()
Creates a new
CalendarPicker for the Julian calendar system using system defaults
for the locale and the current local time. |
javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> |
lengthOfAnimationsProperty()
Determines if and how long any animations will happen.
|
javafx.beans.property.ObjectProperty<Locale> |
localeProperty()
The current format locale.
|
javafx.beans.property.ReadOnlyObjectProperty<T> |
maxDateProperty()
The maximum value which can be selected.
|
javafx.beans.property.ReadOnlyObjectProperty<T> |
minDateProperty()
The minimum value which can be selected.
|
static CalendarPicker<MinguoCalendar> |
minguo(Locale locale,
Supplier<MinguoCalendar> todaySupplier)
Creates a new
CalendarPicker for the calendar system used in Taiwan. |
static CalendarPicker<MinguoCalendar> |
minguoWithSystemDefaults()
Creates a new
CalendarPicker for the calendar system of Taiwan using system defaults
for the locale and the current local time. |
static CalendarPicker<PersianCalendar> |
persian(Locale locale,
Supplier<PersianCalendar> todaySupplier)
Creates a new
CalendarPicker for the persian calendar system (jalali). |
static CalendarPicker<PersianCalendar> |
persianWithSystemDefaults()
Creates a new
CalendarPicker for the persian calendar system using system defaults
for the locale and the current local time. |
javafx.beans.property.ReadOnlyStringProperty |
promptTextProperty()
The customized editor prompt text.
|
void |
setCellCustomizer(CellCustomizer<T> customizer) |
void |
setDateFormat(ChronoFormatter<T> dateFormat) |
void |
setLengthOfAnimations(javafx.util.Duration duration) |
void |
setLocale(Locale locale) |
void |
setMaxDate(T maximum) |
void |
setMinDate(T minimum) |
void |
setPromptText(String promptText) |
void |
setShowInfoLabel(boolean showInfoLabel) |
void |
setShowWeeks(boolean showWeeks) |
void |
setValue(T value) |
javafx.beans.property.BooleanProperty |
showInfoLabelProperty()
Determines if the header shows the chosen calendar range.
|
javafx.beans.property.BooleanProperty |
showWeeksProperty()
Determines if the calendar shows week numbers.
|
static CalendarPicker<ThaiSolarCalendar> |
thai(Locale locale,
Supplier<ThaiSolarCalendar> todaySupplier)
Creates a new
CalendarPicker for the buddhist calendar system used in Thailand. |
static CalendarPicker<ThaiSolarCalendar> |
thaiWithSystemDefaults()
Creates a new
CalendarPicker for the buddhist calendar system in Thailand using system defaults
for the locale and the current local time. |
javafx.beans.property.ObjectProperty<T> |
valueProperty()
The current calendar date value associated with this component.
|
alignmentProperty, clearConstraints, fillHeightProperty, getAlignment, getBaselineOffset, getClassCssMetaData, getContentBias, getCssMetaData, getHgrow, getMargin, getSpacing, isFillHeight, requestLayout, setAlignment, setFillHeight, setHgrow, setMargin, setSpacing, spacingPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeGeomBounds, impl_createPeer, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapToPixelProperty, widthPropertygetChildrenUnmodifiable, getImpl_traversalEngine, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, setImpl_traversalEngineaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_findStyles, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_isShowMnemonics, impl_isTreeVisible, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic static CalendarPicker<PlainDate> gregorianWithSystemDefaults()
Creates a new CalendarPicker for the gregorian calendar system using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.today()public static CalendarPicker<PlainDate> gregorian(Locale locale, Supplier<PlainDate> todaySupplier)
Creates a new CalendarPicker for the gregorian calendar system.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<CopticCalendar> copticWithSystemDefaults()
Creates a new CalendarPicker for the coptic calendar system using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<CopticCalendar> coptic(Locale locale, Supplier<CopticCalendar> todaySupplier)
Creates a new CalendarPicker for the coptic calendar system.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<EthiopianCalendar> ethiopianWithSystemDefaults()
Creates a new CalendarPicker for the ethiopian calendar system using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<EthiopianCalendar> ethiopian(Locale locale, Supplier<EthiopianCalendar> todaySupplier)
Creates a new CalendarPicker for the ethiopian calendar system.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<HebrewCalendar> hebrewWithSystemDefaults()
Creates a new CalendarPicker for the hebrew calendar system (jewish calendar) using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<HebrewCalendar> hebrew(Locale locale, Supplier<HebrewCalendar> todaySupplier)
Creates a new CalendarPicker for the hebrew calendar system (jewish calendar).
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<HijriCalendar> hijriWithSystemDefaults(VariantSource variantSource)
Creates a new CalendarPicker for the islamic calendar using system defaults
for the locale and the current local time.
Following code selects the Umalqura variant of Saudi-Arabia:
CalendarPicker<HijriCalendar> picker =
CalendarPicker.hijriWithSystemDefaults(() -> HijriCalendar.VARIANT_UMALQURA);
variantSource - the variant of the underlying islamic calendarLocale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(CalendarFamily, VariantSource, StartOfDay),
HijriCalendar.VARIANT_UMALQURA,
HijriAlgorithmpublic static CalendarPicker<HijriCalendar> hijri(VariantSource variantSource, Locale locale, Supplier<HijriCalendar> todaySupplier)
Creates a new CalendarPicker for the islamic calendar.
variantSource - the variant of the underlying islamic calendarlocale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<JulianCalendar> julianWithSystemDefaults()
Creates a new CalendarPicker for the Julian calendar system using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<JulianCalendar> julian(Locale locale, Supplier<JulianCalendar> todaySupplier)
Creates a new CalendarPicker for the Julian calendar system.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<MinguoCalendar> minguoWithSystemDefaults()
Creates a new CalendarPicker for the calendar system of Taiwan using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<MinguoCalendar> minguo(Locale locale, Supplier<MinguoCalendar> todaySupplier)
Creates a new CalendarPicker for the calendar system used in Taiwan.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<PersianCalendar> persianWithSystemDefaults()
Creates a new CalendarPicker for the persian calendar system using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<PersianCalendar> persian(Locale locale, Supplier<PersianCalendar> todaySupplier)
Creates a new CalendarPicker for the persian calendar system (jalali).
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic static CalendarPicker<ThaiSolarCalendar> thaiWithSystemDefaults()
Creates a new CalendarPicker for the buddhist calendar system in Thailand using system defaults
for the locale and the current local time.
Locale.getDefault(Locale.Category.FORMAT),
SystemClock.inLocalView(),
ZonalClock.now(Chronology)public static CalendarPicker<ThaiSolarCalendar> thai(Locale locale, Supplier<ThaiSolarCalendar> todaySupplier)
Creates a new CalendarPicker for the buddhist calendar system used in Thailand.
locale - the language and country configurationtodaySupplier - determines the current calendar datepublic javafx.beans.property.ObjectProperty<Locale> localeProperty()
null (not recommended) then the locale in effect is Locale.ROOT.setLocale(Locale)public javafx.beans.property.ObjectProperty<T> valueProperty()
setValue(T)public javafx.beans.property.ReadOnlyStringProperty errorProperty()
public javafx.beans.property.ReadOnlyObjectProperty<ChronoFormatter<T>> dateFormatProperty()
setDateFormat(ChronoFormatter)public javafx.beans.property.ReadOnlyStringProperty promptTextProperty()
setPromptText(String)public javafx.beans.property.ReadOnlyObjectProperty<T> minDateProperty()
setMinDate(T)public javafx.beans.property.ReadOnlyObjectProperty<T> maxDateProperty()
setMaxDate(T)public javafx.beans.property.BooleanProperty showWeeksProperty()
setShowWeeks(boolean)public javafx.beans.property.BooleanProperty showInfoLabelProperty()
setShowInfoLabel(boolean)public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> lengthOfAnimationsProperty()
setLengthOfAnimations(Duration)public javafx.beans.property.ObjectProperty<CellCustomizer<T>> cellCustomizerProperty()
Allows user-defined customizations of date cells in the month view.
setCellCustomizer(CellCustomizer)public void setLocale(Locale locale)
public void setValue(T value)
public void setDateFormat(ChronoFormatter<T> dateFormat)
public void setPromptText(String promptText)
public void setMinDate(T minimum)
public void setMaxDate(T maximum)
public void setShowWeeks(boolean showWeeks)
public void setShowInfoLabel(boolean showInfoLabel)
public void setLengthOfAnimations(javafx.util.Duration duration)
public void setCellCustomizer(CellCustomizer<T> customizer)
Copyright © 2014–2021. All rights reserved.