public abstract class DateControl extends CalendarFXControl
CalendarView
. When date controls are bound to each
other via the bind(DateControl, boolean)
method then most of their
properties will be bound to each other. This not only includes date and time
zone properties but also all the factory and detail callbacks. This allows an
application to create a complex calendar control and to configure only that
control without worrying about the date controls that are nested inside of
it. The children will all "inherit" their settings from the parent control.
dateProperty()
is used to store the date that the control has to display. For the
DayView
this would mean that it has to show exactly that date. The
DetailedWeekView
would only have to guarantee that it shows the week that
contains this date. For this the DetailedWeekView
uses the
getFirstDayOfWeek()
method that looks up its value from the week
fields stored in the weekFieldsProperty()
. The
todayProperty()
is mainly used for highlighting today's date in the
view (e.g. a red background).
Callback
interface. The factories will be invoked when
the application calls createCalendarSource()
or
createEntryAt(ZonedDateTime)
.
Control.setContextMenu(ContextMenu)
or by providing a callback that gets
invoked every time the context menu event is received (see
setContextMenuCallback(Callback)
). If a context menu has been set
explicitly then the callback will never be called again.
setEntryDetailsCallback(Callback)
and
setDateDetailsCallback(Callback)
. The callbacks can decide which
kind of user interface they want to show to the user. The default
implementation for both callbacks is a PopOver
control from the
ControlsFX project.
getSelections()
). The controls support single and multiple
selections (see setSelectionMode(SelectionMode)
). Due to the binding
approach it does not matter in which child date control an entry gets
selected. All controls will always know which entries are selected.
Type | Property and Description |
---|---|
ObjectProperty<Callback<DateControl.CreateCalendarSourceParameter,CalendarSource>> |
calendarSourceFactory
A factory for creating a new calendar source, e.g.
|
ReadOnlyListProperty<Calendar> |
calendars
A list that contains all calendars found in all calendar sources
currently attached to this date control.
|
ObjectProperty<Callback<DateControl.ContextMenuParameter,ContextMenu>> |
contextMenuCallback
The context menu callback that will be invoked when the user triggers the
context menu by clicking in an area without an entry view.
|
ObjectProperty<Callback<DateControl.DateDetailsParameter,Boolean>> |
dateDetailsCallback
A callback used for showing the details of a given date.
|
ObjectProperty<LocalDate> |
date
The date that needs to be shown by the date control.
|
ObjectProperty<Callback<DateControl,Calendar>> |
defaultCalendarProvider
The default calendar provider is responsible for returning a calendar
that can be used to add a new entry.
|
ObjectProperty<DraggedEntry> |
draggedEntry
Stores a
DraggedEntry instance, which serves as a wrapper around
the actual entry that is currently being edited by the user. |
BooleanProperty |
enableHyperlinks
A property used to control whether the control allows the user to click on it or an element
inside of it in order to "jump" to another screen with more detail.
|
ObjectProperty<LocalTime> |
endTime
An end time used to limit the time interval shown by the control.
|
ObjectProperty<Callback<DateControl.EntryContextMenuParameter,ContextMenu>> |
entryContextMenuCallback
A callback used for dynamically creating a context menu for a given
entry view.
|
ObjectProperty<Callback<DateControl.EntryDetailsParameter,Boolean>> |
entryDetailsCallback
A callback used for showing the details of a given entry.
|
ObjectProperty<Callback<DateControl.EntryDetailsPopOverContentParameter,Node>> |
entryDetailsPopOverContentCallback
Stores a callback for creating the content of the popover.
|
ObjectProperty<Callback<DateControl.CreateEntryParameter,Entry<?>>> |
entryFactory
A factory for creating new entries when the user double clicks inside the
date control or when the application calls
createEntryAt(ZonedDateTime) . |
ObjectProperty<DateControl.Layout> |
layout
Stores the strategy used by the view to layout the entries of several
calendars at once.
|
ObjectProperty<LocalTime> |
requestedTime
Stores the time that the application wants to show in its date controls
when the UI opens up.
|
ObjectProperty<SelectionMode> |
selectionMode
Stores the selection mode.
|
BooleanProperty |
showToday
A flag used to indicate that the view will mark the area that represents
the value of
todayProperty() . |
ObjectProperty<LocalTime> |
startTime
A start time used to limit the time interval shown by the control.
|
BooleanProperty |
suspendUpdates
A property that will suspend all updates to the view based on model changes.
|
ObjectProperty<LocalTime> |
time
Stores a time that can be visualized, e.g.
|
ObjectProperty<LocalDate> |
today
Stores the date that is considered to represent "today".
|
ObjectProperty<Callback<Integer,DateControl.Usage>> |
usagePolicy
A property used to store a policy that will be used to determine if a given number of entries
indicates a low or high usage of that day.
|
ObjectProperty<VirtualGrid> |
virtualGrid
A virtual grid used for snapping to invisible grid lines while editing
calendar entries.
|
ObjectProperty<WeekFields> |
weekFields
Week fields are used to determine the first day of a week (e.g.
|
ObjectProperty<ZoneId> |
zoneId
The time zone used by the date control.
|
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | Class and Description |
---|---|
static class |
DateControl.ContextMenuParameter
The parameter object passed to the context menu callback.
|
static class |
DateControl.CreateCalendarSourceParameter
The parameter object passed to the calendar source factory.
|
static class |
DateControl.CreateEntryParameter
The parameter object passed to the entry factory.
|
static class |
DateControl.DateDetailsParameter
The parameter object passed to the date details callback.
|
static class |
DateControl.EntryContextMenuParameter
The parameter object passed to the context menu callback for entries.
|
static class |
DateControl.EntryDetailsParameter
The parameter object passed to the entry details callback.
|
static class |
DateControl.EntryDetailsPopOverContentParameter
The parameter object passed to the entry details popover content
callback.
|
static class |
DateControl.Layout
Supported layout strategies by the
DayView . |
static class |
DateControl.Usage |
Modifier and Type | Field and Description |
---|---|
ObjectProperty<Callback<Integer,DateControl.Usage>> |
usagePolicy |
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Modifier | Constructor and Description |
---|---|
protected |
DateControl()
Constructs a new date control and initializes all factories and callbacks
with default implementations.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(DateControl otherControl,
boolean bindDate)
Binds several properties of the given date control to the same properties
of this control.
|
ObjectProperty<Callback<DateControl.CreateCalendarSourceParameter,CalendarSource>> |
calendarSourceFactoryProperty()
A factory for creating a new calendar source, e.g.
|
ReadOnlyListProperty<Calendar> |
calendarsProperty()
A list that contains all calendars found in all calendar sources
currently attached to this date control.
|
void |
clearSelection()
Clears the current selection of entries.
|
ObjectProperty<Callback<DateControl.ContextMenuParameter,ContextMenu>> |
contextMenuCallbackProperty()
The context menu callback that will be invoked when the user triggers the
context menu by clicking in an area without an entry view.
|
void |
createCalendarSource()
Creates a new calendar source that will be added to the list of calendar
sources of this date control.
|
Entry<?> |
createEntryAt(ZonedDateTime time)
Creates a new entry at the given time.
|
Entry<?> |
createEntryAt(ZonedDateTime time,
Calendar calendar)
Creates a new entry at the given time.
|
ObjectProperty<Callback<DateControl.DateDetailsParameter,Boolean>> |
dateDetailsCallbackProperty()
A callback used for showing the details of a given date.
|
ObjectProperty<LocalDate> |
dateProperty()
The date that needs to be shown by the date control.
|
ObjectProperty<Callback<DateControl,Calendar>> |
defaultCalendarProviderProperty()
The default calendar provider is responsible for returning a calendar
that can be used to add a new entry.
|
void |
deselect(Entry<?> entry)
Removes the given entry from the set of currently selected entries.
|
ObjectProperty<DraggedEntry> |
draggedEntryProperty()
Stores a
DraggedEntry instance, which serves as a wrapper around
the actual entry that is currently being edited by the user. |
void |
editEntry(Entry<?> entry)
Adjusts the current view / page in such a way that the given entry
becomes visible and brings up the details editor / UI for the entry
(default is a popover).
|
BooleanProperty |
enableHyperlinksProperty()
A property used to control whether the control allows the user to click on it or an element
inside of it in order to "jump" to another screen with more detail.
|
ObjectProperty<LocalTime> |
endTimeProperty()
An end time used to limit the time interval shown by the control.
|
ObjectProperty<Callback<DateControl.EntryContextMenuParameter,ContextMenu>> |
entryContextMenuCallbackProperty()
A callback used for dynamically creating a context menu for a given
entry view.
|
ObjectProperty<Callback<DateControl.EntryDetailsParameter,Boolean>> |
entryDetailsCallbackProperty()
A callback used for showing the details of a given entry.
|
ObjectProperty<Callback<DateControl.EntryDetailsPopOverContentParameter,Node>> |
entryDetailsPopOverContentCallbackProperty()
Stores a callback for creating the content of the popover.
|
ObjectProperty<Callback<DateControl.CreateEntryParameter,Entry<?>>> |
entryFactoryProperty()
A factory for creating new entries when the user double clicks inside the
date control or when the application calls
createEntryAt(ZonedDateTime) . |
EntryViewBase<?> |
findEntryView(Entry<?> entry)
Finds the first view that represents the given entry.
|
List<DateControl> |
getBoundDateControls()
Returns all data controls that are bound to this control.
|
Optional<Calendar> |
getCalendarAt(double x,
double y)
Returns the calendar shown at the given location.
|
ObservableList<Calendar> |
getCalendars()
Returns the value of
calendarsProperty() . |
Callback<DateControl.CreateCalendarSourceParameter,CalendarSource> |
getCalendarSourceFactory()
Returns the value of
calendarSourceFactoryProperty() . |
ObservableList<CalendarSource> |
getCalendarSources()
The list of all calendar sources attached to this control.
|
ObservableMap<Calendar,BooleanProperty> |
getCalendarVisibilityMap() |
BooleanProperty |
getCalendarVisibilityProperty(Calendar calendar) |
Callback<DateControl.ContextMenuParameter,ContextMenu> |
getContextMenuCallback()
Returns the value of
contextMenuCallbackProperty() . |
LocalDate |
getDate()
Returns the value of
dateProperty() . |
Callback<DateControl.DateDetailsParameter,Boolean> |
getDateDetailsCallback()
Returns the value of
dateDetailsCallbackProperty() . |
Callback<DateControl,Calendar> |
getDefaultCalendarProvider()
Returns the value of
defaultCalendarProviderProperty() . |
DraggedEntry |
getDraggedEntry()
Returns the value of
draggedEntryProperty() . |
LocalTime |
getEndTime()
Returns the value of
endTimeProperty() . |
Callback<DateControl.EntryContextMenuParameter,ContextMenu> |
getEntryContextMenuCallback()
Returns the value of
entryContextMenuCallbackProperty() . |
Callback<DateControl.EntryDetailsParameter,Boolean> |
getEntryDetailsCallback()
Returns the value of
entryDetailsCallbackProperty() . |
Callback<DateControl.EntryDetailsPopOverContentParameter,Node> |
getEntryDetailsPopOverContentCallback()
Returns the value of
entryDetailsPopOverContentCallbackProperty() . |
Callback<DateControl.CreateEntryParameter,Entry<?>> |
getEntryFactory()
Returns the value of
entryFactoryProperty() . |
DayOfWeek |
getFirstDayOfWeek()
A convenience method to lookup the first day of the week ("Monday" in
Germany, "Sunday" in the US).
|
DateControl.Layout |
getLayout()
Returns the value of
layoutProperty() . |
ObservableList<org.controlsfx.control.PropertySheet.Item> |
getPropertySheetItems()
Returns a list of property items that can be shown by the
PropertySheet of ControlsFX. |
LocalTime |
getRequestedTime()
Returns the value of
requestedTimeProperty() . |
SelectionMode |
getSelectionMode()
Returns the value of
selectionModeProperty() . |
ObservableSet<Entry<?>> |
getSelections()
Stores the currently selected entries.
|
LocalTime |
getStartTime()
Returns the value of
startTimeProperty() . |
LocalTime |
getTime()
Returns the value of
timeProperty() . |
LocalDate |
getToday()
Returns the value of
todayProperty() . |
Callback<Integer,DateControl.Usage> |
getUsagePolicy()
Returns the value of
usagePolicyProperty() . |
VirtualGrid |
getVirtualGrid()
Returns the value of
virtualGridProperty() . |
ObservableSet<DayOfWeek> |
getWeekendDays()
Returns the days of the week that are considered to be weekend days, for
example Saturday and Sunday, or Friday and Saturday.
|
WeekFields |
getWeekFields()
Returns the value of
weekFieldsProperty() . |
ZoneId |
getZoneId()
Returns the value of
zoneIdProperty() . |
void |
goBack()
Makes the control go forward in time by removing one or more days from
the current date.
|
void |
goForward()
Makes the control go forward in time by adding one or more days to the
current date.
|
void |
goToday()
Makes the control go to "today".
|
boolean |
isCalendarVisible(Calendar calendar) |
boolean |
isEnableHyperlinks()
Returns the value of the
enableHyperlinksProperty() . |
boolean |
isShowToday()
Returns the value of
showTodayProperty() . |
boolean |
isSuspendUpdates()
Returns the value of
suspendUpdatesProperty() . |
ObjectProperty<DateControl.Layout> |
layoutProperty()
Stores the strategy used by the view to layout the entries of several
calendars at once.
|
void |
refreshData()
Requests that the date control should reload its data and recreate its
entry views.
|
ObjectProperty<LocalTime> |
requestedTimeProperty()
Stores the time that the application wants to show in its date controls
when the UI opens up.
|
void |
select(Entry<?> entry)
Adds the given entry to the set of currently selected entries.
|
ObjectProperty<SelectionMode> |
selectionModeProperty()
Stores the selection mode.
|
void |
setCalendarSourceFactory(Callback<DateControl.CreateCalendarSourceParameter,CalendarSource> callback)
Sets the value of
calendarSourceFactoryProperty() . |
void |
setCalendarVisibility(Calendar calendar,
boolean visible) |
void |
setContextMenuCallback(Callback<DateControl.ContextMenuParameter,ContextMenu> callback)
Sets the value of
contextMenuCallbackProperty() . |
void |
setDate(LocalDate date)
Sets the value of
dateProperty() . |
void |
setDateDetailsCallback(Callback<DateControl.DateDetailsParameter,Boolean> callback)
Sets the value of
dateDetailsCallbackProperty() . |
void |
setDefaultCalendarProvider(Callback<DateControl,Calendar> provider)
Sets the value of
defaultCalendarProviderProperty() . |
void |
setDraggedEntry(DraggedEntry entry)
Sets the value of
draggedEntryProperty() . |
void |
setEnableHyperlinks(boolean enable)
Sets the value of the
enableHyperlinksProperty() . |
void |
setEndTime(LocalTime time)
Sets the value of
endTimeProperty() . |
void |
setEntryContextMenuCallback(Callback<DateControl.EntryContextMenuParameter,ContextMenu> callback)
Sets the value of
entryContextMenuCallbackProperty() . |
void |
setEntryDetailsCallback(Callback<DateControl.EntryDetailsParameter,Boolean> callback)
Sets the value of
entryDetailsCallbackProperty() . |
void |
setEntryDetailsPopOverContentCallback(Callback<DateControl.EntryDetailsPopOverContentParameter,Node> callback)
Sets the value of
entryDetailsPopOverContentCallbackProperty() . |
void |
setEntryFactory(Callback<DateControl.CreateEntryParameter,Entry<?>> factory)
Sets the value of
entryFactoryProperty() . |
void |
setLayout(DateControl.Layout layout)
Sets the value of
layoutProperty() . |
void |
setRequestedTime(LocalTime time)
Sets the value of
requestedTimeProperty() . |
void |
setSelectionMode(SelectionMode mode)
Sets the value of
selectionModeProperty() . |
void |
setShowToday(boolean show)
Sets the value of
showTodayProperty() . |
void |
setStartTime(LocalTime time)
Sets the value of
startTimeProperty() . |
void |
setSuspendUpdates(boolean suspend)
Sets the value of
suspendUpdatesProperty() . |
void |
setTime(LocalTime time)
Sets the value of
timeProperty() . |
void |
setToday(LocalDate date)
Sets the value of
todayProperty() . |
void |
setUsagePolicy(Callback<Integer,DateControl.Usage> policy)
Sets the value of
usagePolicyProperty() . |
void |
setVirtualGrid(VirtualGrid grid)
Sets the value of
virtualGridProperty() . |
void |
setWeekFields(WeekFields weekFields)
Sets the value of
weekFieldsProperty() . |
void |
setZoneId(ZoneId zoneId)
Sets the value of
zoneIdProperty() . |
void |
showDateDetails(Node owner,
LocalDate date)
Creates a new
DatePopOver and shows it attached to the given
owner node. |
void |
showEntry(Entry<?> entry)
Adjusts the current view / page in such a way that the given entry
becomes visible.
|
BooleanProperty |
showTodayProperty()
A flag used to indicate that the view will mark the area that represents
the value of
todayProperty() . |
ObjectProperty<LocalTime> |
startTimeProperty()
A start time used to limit the time interval shown by the control.
|
BooleanProperty |
suspendUpdatesProperty()
A property that will suspend all updates to the view based on model changes.
|
ObjectProperty<LocalTime> |
timeProperty()
Stores a time that can be visualized, e.g.
|
ObjectProperty<LocalDate> |
todayProperty()
Stores the date that is considered to represent "today".
|
void |
unbind(DateControl otherControl)
Unbinds the given control from this control.
|
ObjectProperty<Callback<Integer,DateControl.Usage>> |
usagePolicyProperty()
A property used to store a policy that will be used to determine if a given number of entries
indicates a low or high usage of that day.
|
ObjectProperty<VirtualGrid> |
virtualGridProperty()
A virtual grid used for snapping to invisible grid lines while editing
calendar entries.
|
ObjectProperty<WeekFields> |
weekFieldsProperty()
Week fields are used to determine the first day of a week (e.g.
|
ObjectProperty<ZoneId> |
zoneIdProperty()
The time zone used by the date control.
|
getUserAgentStylesheet
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthProperty
getChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, 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_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, 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, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, 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, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public final ObjectProperty<DraggedEntry> draggedEntryProperty
DraggedEntry
instance, which serves as a wrapper around
the actual entry that is currently being edited by the user. The
framework creates this wrapper when the user starts a drag and adds it to
the date control. This allows the framework to show the entry at its old
and new location at the same time. It also ensures that the calendar does
not fire any events before the user has committed the entry to a new
location.getDraggedEntry()
,
setDraggedEntry(DraggedEntry)
public final ObjectProperty<Callback<DateControl.CreateEntryParameter,Entry<?>>> entryFactoryProperty
createEntryAt(ZonedDateTime)
. The factory can return NULL to
indicate that no entry can be created at the given location.
The code below shows the default entry factory that is set on every date control.
setEntryFactory(param -> { DateControl control = param.getControl(); VirtualGrid grid = control.getVirtualGrid(); ZonedDateTime time = param.getZonedDateTime(); DayOfWeek firstDayOfWeek = getFirstDayOfWeek(); ZonedDateTime lowerTime = grid.adjustTime(time, false, firstDayOfWeek); ZonedDateTime upperTime = grid.adjustTime(time, true, firstDayOfWeek); if (Duration.between(time, lowerTime).abs().minus(Duration.between(time, upperTime).abs()).isNegative()) { time = lowerTime; } else { time = upperTime; } Entry<Object> entry = new Entry<>("New Entry"); entry.changeStartDate(time.toLocalDate()); entry.changeStartTime(time.toLocalTime()); entry.changeEndDate(entry.getStartDate()); entry.changeEndTime(entry.getStartTime().plusHours(1)); if (control instanceof AllDayView) { entry.setFullDay(true); } return entry; });
getEntryFactory()
,
setEntryFactory(Callback)
public final ObjectProperty<Callback<DateControl.CreateCalendarSourceParameter,CalendarSource>> calendarSourceFactoryProperty
setCalendarSourceFactory(param -> { CalendarSource source = new CalendarSource("Calendar Source"); Calendar calendar = new Calendar("Calendar"); source.getCalendars().add(calendar); return source; });
The factory can be invoked by calling createCalendarSource()
.
public final ObjectProperty<Callback<DateControl.EntryContextMenuParameter,ContextMenu>> entryContextMenuCallbackProperty
setEntryContextMenuCallback(param -> { EntryViewBase<?> entryView = param.getEntryView(); Entry<?> entry = entryView.getEntry(); ContextMenu contextMenu = new ContextMenu(); MenuItem informationItem = new MenuItem("Information"); informationItem.setOnAction(evt -> { Callback<EntryDetailsParameter, Boolean> detailsCallback = getEntryDetailsCallback(); if (detailsCallback != null) { ContextMenuEvent ctxEvent = param.getContextMenuEvent(); EntryDetailsParameter entryDetailsParam = new EntryDetailsParameter(ctxEvent, DateControl.this, entryView, this, ctxEvent.getScreenX(), ctxEvent.getScreenY()); detailsCallback.call(entryDetailsParam); } }); contextMenu.getItems().add(informationItem); Menu calendarMenu = new Menu("Calendar"); for (Calendar calendar : getCalendars()) { MenuItem calendarItem = new MenuItem(calendar.getName()); calendarItem.setOnAction(evt -> entry.setCalendar(calendar)); calendarMenu.getItems().add(calendarItem); } contextMenu.getItems().add(calendarMenu); return contextMenu; });
public final ObjectProperty<Callback<DateControl.ContextMenuParameter,ContextMenu>> contextMenuCallbackProperty
The code below shows a part of the default implementation:
setContextMenuCallback(param -> { ContextMenu menu = new ContextMenu(); MenuItem newEntryItem = new MenuItem("Add New Event"); newEntryItem.setOnAction(evt -> { createEntryAt(param.getZonedDateTime()); }); menu.getItems().add(newEntry); return menu; });
public final ObjectProperty<Callback<DateControl,Calendar>> defaultCalendarProviderProperty
The code shown below is the default implementation of this provider. It returns the first calendar of the first source. If no source is available it will return null.
setDefaultCalendarProvider(control -> { List<CalendarSource> sources = getCalendarSources(); if (sources != null && !sources.isEmpty()) { CalendarSource s = sources.get(0); List<? extends Calendar> calendars = s.getCalendars(); if (calendars != null && !calendars.isEmpty()) { return calendars.get(0); } } return null; });
public final ObjectProperty<Callback<DateControl.DateDetailsParameter,Boolean>> dateDetailsCallbackProperty
PopOver
but
applications might as well display a large dialog where the user can
freely edit the date.
setDateDetailsCallback(param -> { InputEvent evt = param.getInputEvent(); if (evt instanceof MouseEvent) { MouseEvent mouseEvent = (MouseEvent) evt; if (mouseEvent.getClickCount() == 1) { showDateDetails(param.getOwner(), param.getLocalDate()); return true; } } return false; });
public final ObjectProperty<Callback<DateControl.EntryDetailsParameter,Boolean>> entryDetailsCallbackProperty
PopOver
but
applications might as well display a large dialog where the user can
freely edit the entry.
setEntryDetailsCallback(param -> { InputEvent evt = param.getInputEvent(); if (evt instanceof MouseEvent) { MouseEvent mouseEvent = (MouseEvent) evt; if (mouseEvent.getClickCount() == 2) { showEntryDetails(param.getEntryView(), param.getOwner(), param.getScreenX(), param.getScreenY()); return true; } } else { showEntryDetails(param.getEntryView(), param.getOwner(), param.getScreenX(), param.getScreenY()); return true; } return false; });
public final ObjectProperty<Callback<DateControl.EntryDetailsPopOverContentParameter,Node>> entryDetailsPopOverContentCallbackProperty
public final ObjectProperty<LocalDate> todayProperty
LocalDate.now()
but can be any date.getToday()
,
setToday(LocalDate)
public final BooleanProperty showTodayProperty
todayProperty()
. By default this area will be
filled with a different color (red) than the rest (white).
isShowToday()
,
setShowToday(boolean)
public final ObjectProperty<LocalDate> dateProperty
LocalDate.now()
.getDate()
,
setDate(LocalDate)
public final ObjectProperty<ZoneId> zoneIdProperty
getZoneId()
,
setZoneId(ZoneId)
public final ObjectProperty<LocalTime> timeProperty
DayView
representing the current time.getTime()
,
setTime(LocalTime)
public final ObjectProperty<LocalTime> startTimeProperty
DayView
uses this property and the endTimeProperty()
to
support the concept of "early" and "late" hours. These hours can be
hidden if required.getStartTime()
,
setStartTime(LocalTime)
public final ObjectProperty<LocalTime> endTimeProperty
DayView
uses this property and the startTimeProperty()
to support the concept of "early" and "late" hours. These hours can be
hidden if required.getEndTime()
,
setEndTime(LocalTime)
public final ObjectProperty<WeekFields> weekFieldsProperty
WeekFields.ISO
.getWeekFields()
,
setWeekFields(WeekFields)
public final ReadOnlyListProperty<Calendar> calendarsProperty
getCalendars()
public final ObjectProperty<SelectionMode> selectionModeProperty
public final ObjectProperty<VirtualGrid> virtualGridProperty
VirtualGrid.OFF
can be used to completely disable
the grid.getVirtualGrid()
,
setVirtualGrid(VirtualGrid)
public final ObjectProperty<LocalTime> requestedTimeProperty
LocalTime.now()
.getRequestedTime()
,
setRequestedTime(LocalTime)
public final ObjectProperty<DateControl.Layout> layoutProperty
DateControl.Layout.SWIMLANE
strategy allocates
a separate column for each calendar and resolves overlapping entry
conflicts within that column. Swim lanes are especially useful for
resource booking systems (rooms, people, trucks).getLayout()
,
setLayout(Layout)
public final BooleanProperty enableHyperlinksProperty
CalendarView
the user can click on the "day of month" label of a cell inside the MonthSheetView
in
order to switch to the DayPage
where the user will see all entries scheduled for that day.isEnableHyperlinks()
,
setEnableHyperlinks(boolean)
public final BooleanProperty suspendUpdatesProperty
isSuspendUpdates()
,
setSuspendUpdates(boolean)
public final ObjectProperty<Callback<Integer,DateControl.Usage>> usagePolicyProperty
YearMonthView
to color
the background of each day based on the "usage" of that day. The default implementation of this policy
returns "none" for 0 entries, "very low" for 1 entry, "low" for 2 entries, "medium" for 3 entries,
"high" for 4 entries, and "very high" for 5 entries or more.getUsagePolicy()
,
setUsagePolicy(Callback)
public final ObjectProperty<Callback<Integer,DateControl.Usage>> usagePolicy
protected DateControl()
public final ObservableMap<Calendar,BooleanProperty> getCalendarVisibilityMap()
public final BooleanProperty getCalendarVisibilityProperty(Calendar calendar)
public final boolean isCalendarVisible(Calendar calendar)
public final void setCalendarVisibility(Calendar calendar, boolean visible)
public final void refreshData()
public final void createCalendarSource()
setCalendarSourceFactory(Callback)
.setCalendarSourceFactory(Callback)
public final ObjectProperty<DraggedEntry> draggedEntryProperty()
DraggedEntry
instance, which serves as a wrapper around
the actual entry that is currently being edited by the user. The
framework creates this wrapper when the user starts a drag and adds it to
the date control. This allows the framework to show the entry at its old
and new location at the same time. It also ensures that the calendar does
not fire any events before the user has committed the entry to a new
location.getDraggedEntry()
,
setDraggedEntry(DraggedEntry)
public final DraggedEntry getDraggedEntry()
draggedEntryProperty()
.public final void setDraggedEntry(DraggedEntry entry)
draggedEntryProperty()
.entry
- the dragged entrypublic final Entry<?> createEntryAt(ZonedDateTime time)
entryFactoryProperty()
). The factory receives a parameter object
that contains the default calendar where the entry can be added, however
the factory can choose to add the entry to any calendar it likes. Please
note that the time passed to the factory will be adjusted based on the
current virtual grid settings (see virtualGridProperty()
).time
- the time where the entry will be created (the entry start
time)setEntryFactory(Callback)
,
setVirtualGrid(VirtualGrid)
public final Entry<?> createEntryAt(ZonedDateTime time, Calendar calendar)
entryFactoryProperty()
). The factory receives a parameter object
that contains the calendar where the entry can be added, however the
factory can choose to add the entry to any calendar it likes. Please note
that the time passed to the factory will be adjusted based on the current
virtual grid settings (see virtualGridProperty()
).time
- the time where the entry will be created (the entry start
time)calendar
- the calendar to which the new entry will be added (if null the
default calendar provider will be invoked)setEntryFactory(Callback)
,
setVirtualGrid(VirtualGrid)
public Optional<Calendar> getCalendarAt(double x, double y)
layoutProperty()
).x
- the x-coordinate to checky
- the y-coordinate to checkpublic final void showEntry(Entry<?> entry)
entry
- the entry to showpublic final void editEntry(Entry<?> entry)
entry
- the entry to showpublic void showDateDetails(Node owner, LocalDate date)
DatePopOver
and shows it attached to the given
owner node.owner
- the owner nodedate
- the date for which to display more detailpublic final ObjectProperty<Callback<DateControl.CreateEntryParameter,Entry<?>>> entryFactoryProperty()
createEntryAt(ZonedDateTime)
. The factory can return NULL to
indicate that no entry can be created at the given location.
The code below shows the default entry factory that is set on every date control.
setEntryFactory(param -> { DateControl control = param.getControl(); VirtualGrid grid = control.getVirtualGrid(); ZonedDateTime time = param.getZonedDateTime(); DayOfWeek firstDayOfWeek = getFirstDayOfWeek(); ZonedDateTime lowerTime = grid.adjustTime(time, false, firstDayOfWeek); ZonedDateTime upperTime = grid.adjustTime(time, true, firstDayOfWeek); if (Duration.between(time, lowerTime).abs().minus(Duration.between(time, upperTime).abs()).isNegative()) { time = lowerTime; } else { time = upperTime; } Entry<Object> entry = new Entry<>("New Entry"); entry.changeStartDate(time.toLocalDate()); entry.changeStartTime(time.toLocalTime()); entry.changeEndDate(entry.getStartDate()); entry.changeEndTime(entry.getStartTime().plusHours(1)); if (control instanceof AllDayView) { entry.setFullDay(true); } return entry; });
getEntryFactory()
,
setEntryFactory(Callback)
public final Callback<DateControl.CreateEntryParameter,Entry<?>> getEntryFactory()
entryFactoryProperty()
.public final void setEntryFactory(Callback<DateControl.CreateEntryParameter,Entry<?>> factory)
entryFactoryProperty()
.factory
- the factory used for creating a new entrypublic final ObjectProperty<Callback<DateControl.CreateCalendarSourceParameter,CalendarSource>> calendarSourceFactoryProperty()
setCalendarSourceFactory(param -> { CalendarSource source = new CalendarSource("Calendar Source"); Calendar calendar = new Calendar("Calendar"); source.getCalendars().add(calendar); return source; });
The factory can be invoked by calling createCalendarSource()
.
public final Callback<DateControl.CreateCalendarSourceParameter,CalendarSource> getCalendarSourceFactory()
calendarSourceFactoryProperty()
.public final void setCalendarSourceFactory(Callback<DateControl.CreateCalendarSourceParameter,CalendarSource> callback)
calendarSourceFactoryProperty()
.callback
- the callback used for creating a new calendar sourcepublic final ObjectProperty<Callback<DateControl.EntryContextMenuParameter,ContextMenu>> entryContextMenuCallbackProperty()
setEntryContextMenuCallback(param -> { EntryViewBase<?> entryView = param.getEntryView(); Entry<?> entry = entryView.getEntry(); ContextMenu contextMenu = new ContextMenu(); MenuItem informationItem = new MenuItem("Information"); informationItem.setOnAction(evt -> { Callback<EntryDetailsParameter, Boolean> detailsCallback = getEntryDetailsCallback(); if (detailsCallback != null) { ContextMenuEvent ctxEvent = param.getContextMenuEvent(); EntryDetailsParameter entryDetailsParam = new EntryDetailsParameter(ctxEvent, DateControl.this, entryView, this, ctxEvent.getScreenX(), ctxEvent.getScreenY()); detailsCallback.call(entryDetailsParam); } }); contextMenu.getItems().add(informationItem); Menu calendarMenu = new Menu("Calendar"); for (Calendar calendar : getCalendars()) { MenuItem calendarItem = new MenuItem(calendar.getName()); calendarItem.setOnAction(evt -> entry.setCalendar(calendar)); calendarMenu.getItems().add(calendarItem); } contextMenu.getItems().add(calendarMenu); return contextMenu; });
public final Callback<DateControl.EntryContextMenuParameter,ContextMenu> getEntryContextMenuCallback()
entryContextMenuCallbackProperty()
.public final void setEntryContextMenuCallback(Callback<DateControl.EntryContextMenuParameter,ContextMenu> callback)
entryContextMenuCallbackProperty()
.callback
- the callback used for creating a context menu for a calendar
entrypublic final ObjectProperty<Callback<DateControl.ContextMenuParameter,ContextMenu>> contextMenuCallbackProperty()
The code below shows a part of the default implementation:
setContextMenuCallback(param -> { ContextMenu menu = new ContextMenu(); MenuItem newEntryItem = new MenuItem("Add New Event"); newEntryItem.setOnAction(evt -> { createEntryAt(param.getZonedDateTime()); }); menu.getItems().add(newEntry); return menu; });
public final Callback<DateControl.ContextMenuParameter,ContextMenu> getContextMenuCallback()
contextMenuCallbackProperty()
.public final void setContextMenuCallback(Callback<DateControl.ContextMenuParameter,ContextMenu> callback)
contextMenuCallbackProperty()
.callback
- the context menu callbackpublic final ObjectProperty<Callback<DateControl,Calendar>> defaultCalendarProviderProperty()
The code shown below is the default implementation of this provider. It returns the first calendar of the first source. If no source is available it will return null.
setDefaultCalendarProvider(control -> { List<CalendarSource> sources = getCalendarSources(); if (sources != null && !sources.isEmpty()) { CalendarSource s = sources.get(0); List<? extends Calendar> calendars = s.getCalendars(); if (calendars != null && !calendars.isEmpty()) { return calendars.get(0); } } return null; });
public final Callback<DateControl,Calendar> getDefaultCalendarProvider()
defaultCalendarProviderProperty()
.public final void setDefaultCalendarProvider(Callback<DateControl,Calendar> provider)
defaultCalendarProviderProperty()
.provider
- the default calendar providerpublic final ObjectProperty<Callback<DateControl.DateDetailsParameter,Boolean>> dateDetailsCallbackProperty()
PopOver
but
applications might as well display a large dialog where the user can
freely edit the date.
setDateDetailsCallback(param -> { InputEvent evt = param.getInputEvent(); if (evt instanceof MouseEvent) { MouseEvent mouseEvent = (MouseEvent) evt; if (mouseEvent.getClickCount() == 1) { showDateDetails(param.getOwner(), param.getLocalDate()); return true; } } return false; });
public final void setDateDetailsCallback(Callback<DateControl.DateDetailsParameter,Boolean> callback)
dateDetailsCallbackProperty()
.callback
- the date details callbackpublic final Callback<DateControl.DateDetailsParameter,Boolean> getDateDetailsCallback()
dateDetailsCallbackProperty()
.public final ObjectProperty<Callback<DateControl.EntryDetailsParameter,Boolean>> entryDetailsCallbackProperty()
PopOver
but
applications might as well display a large dialog where the user can
freely edit the entry.
setEntryDetailsCallback(param -> { InputEvent evt = param.getInputEvent(); if (evt instanceof MouseEvent) { MouseEvent mouseEvent = (MouseEvent) evt; if (mouseEvent.getClickCount() == 2) { showEntryDetails(param.getEntryView(), param.getOwner(), param.getScreenX(), param.getScreenY()); return true; } } else { showEntryDetails(param.getEntryView(), param.getOwner(), param.getScreenX(), param.getScreenY()); return true; } return false; });
public final void setEntryDetailsCallback(Callback<DateControl.EntryDetailsParameter,Boolean> callback)
entryDetailsCallbackProperty()
.callback
- the entry details callbackpublic final Callback<DateControl.EntryDetailsParameter,Boolean> getEntryDetailsCallback()
entryDetailsCallbackProperty()
.public final ObjectProperty<Callback<DateControl.EntryDetailsPopOverContentParameter,Node>> entryDetailsPopOverContentCallbackProperty()
public final void setEntryDetailsPopOverContentCallback(Callback<DateControl.EntryDetailsPopOverContentParameter,Node> callback)
entryDetailsPopOverContentCallbackProperty()
.callback
- the entry details popover content callbackpublic final Callback<DateControl.EntryDetailsPopOverContentParameter,Node> getEntryDetailsPopOverContentCallback()
entryDetailsPopOverContentCallbackProperty()
.public final ObjectProperty<LocalDate> todayProperty()
LocalDate.now()
but can be any date.getToday()
,
setToday(LocalDate)
public final void setToday(LocalDate date)
todayProperty()
.date
- the date representing "today"public final LocalDate getToday()
todayProperty()
.public final BooleanProperty showTodayProperty()
todayProperty()
. By default this area will be
filled with a different color (red) than the rest (white).
isShowToday()
,
setShowToday(boolean)
public final boolean isShowToday()
showTodayProperty()
.public final void setShowToday(boolean show)
showTodayProperty()
.show
- if true today will be highlighted visuallypublic final ObjectProperty<LocalDate> dateProperty()
LocalDate.now()
.getDate()
,
setDate(LocalDate)
public final void setDate(LocalDate date)
dateProperty()
.date
- the date shown by the controlpublic final LocalDate getDate()
dateProperty()
.public final ObjectProperty<ZoneId> zoneIdProperty()
getZoneId()
,
setZoneId(ZoneId)
public final void setZoneId(ZoneId zoneId)
zoneIdProperty()
.zoneId
- the time zonepublic final ZoneId getZoneId()
zoneIdProperty()
.public final ObjectProperty<LocalTime> timeProperty()
DayView
representing the current time.getTime()
,
setTime(LocalTime)
public final void setTime(LocalTime time)
timeProperty()
.time
- the current timepublic final LocalTime getTime()
timeProperty()
.public final ObjectProperty<LocalTime> startTimeProperty()
DayView
uses this property and the endTimeProperty()
to
support the concept of "early" and "late" hours. These hours can be
hidden if required.getStartTime()
,
setStartTime(LocalTime)
public final LocalTime getStartTime()
startTimeProperty()
.public final void setStartTime(LocalTime time)
startTimeProperty()
.time
- the start timepublic final ObjectProperty<LocalTime> endTimeProperty()
DayView
uses this property and the startTimeProperty()
to support the concept of "early" and "late" hours. These hours can be
hidden if required.getEndTime()
,
setEndTime(LocalTime)
public final LocalTime getEndTime()
endTimeProperty()
.public final void setEndTime(LocalTime time)
endTimeProperty()
.time
- the end timepublic final ObjectProperty<WeekFields> weekFieldsProperty()
WeekFields.ISO
.getWeekFields()
,
setWeekFields(WeekFields)
public final void setWeekFields(WeekFields weekFields)
weekFieldsProperty()
.weekFields
- the new week fieldspublic final WeekFields getWeekFields()
weekFieldsProperty()
.public final DayOfWeek getFirstDayOfWeek()
WeekFields.getFirstDayOfWeek()
.weekFieldsProperty()
public final ReadOnlyListProperty<Calendar> calendarsProperty()
getCalendars()
public final ObservableList<Calendar> getCalendars()
calendarsProperty()
.public final ObservableList<CalendarSource> getCalendarSources()
getCalendars()
.calendarSourceFactoryProperty()
public final ObjectProperty<SelectionMode> selectionModeProperty()
public final void setSelectionMode(SelectionMode mode)
selectionModeProperty()
.mode
- the selection mode (single, multiple)public final SelectionMode getSelectionMode()
selectionModeProperty()
.public final ObservableSet<Entry<?>> getSelections()
public final void select(Entry<?> entry)
entry
- the selected entriesdeselect(Entry)
,
getSelections()
public final void deselect(Entry<?> entry)
entry
- the selected entriesselect(Entry)
,
getSelections()
public final void clearSelection()
public final ObjectProperty<VirtualGrid> virtualGridProperty()
VirtualGrid.OFF
can be used to completely disable
the grid.getVirtualGrid()
,
setVirtualGrid(VirtualGrid)
public final VirtualGrid getVirtualGrid()
virtualGridProperty()
.public final void setVirtualGrid(VirtualGrid grid)
virtualGridProperty()
.grid
- the gridpublic final ObjectProperty<LocalTime> requestedTimeProperty()
LocalTime.now()
.getRequestedTime()
,
setRequestedTime(LocalTime)
public final void setRequestedTime(LocalTime time)
requestedTimeProperty()
.time
- the requested timepublic final LocalTime getRequestedTime()
requestedTimeProperty()
.public final ObjectProperty<DateControl.Layout> layoutProperty()
DateControl.Layout.SWIMLANE
strategy allocates
a separate column for each calendar and resolves overlapping entry
conflicts within that column. Swim lanes are especially useful for
resource booking systems (rooms, people, trucks).getLayout()
,
setLayout(Layout)
public final void setLayout(DateControl.Layout layout)
layoutProperty()
.layout
- the layoutpublic final DateControl.Layout getLayout()
layoutProperty()
.public ObservableSet<DayOfWeek> getWeekendDays()
public void goForward()
DetailedWeekView
adds the number of days found in
DetailedWeekView.getNumberOfDays()
.dateProperty()
public void goBack()
DetailedWeekView
removes the number of days found in
DetailedWeekView.getNumberOfDays()
.dateProperty()
public void goToday()
dateProperty()
,
todayProperty()
public final EntryViewBase<?> findEntryView(Entry<?> entry)
entry
- the entrypublic final List<DateControl> getBoundDateControls()
public final BooleanProperty enableHyperlinksProperty()
CalendarView
the user can click on the "day of month" label of a cell inside the MonthSheetView
in
order to switch to the DayPage
where the user will see all entries scheduled for that day.isEnableHyperlinks()
,
setEnableHyperlinks(boolean)
public final void setEnableHyperlinks(boolean enable)
enableHyperlinksProperty()
.enable
- if true the hyperlink support will be enabledpublic final boolean isEnableHyperlinks()
enableHyperlinksProperty()
.public final void bind(DateControl otherControl, boolean bindDate)
CalendarView
for example consists of several
pages. Each page is a date control that consists of several other date
controls. The DayPage
consists of the AgendaView
, a
single DayView
, and a YearMonthView
. All of these
controls are bound to each other so that the application can simply
change properties on the CalendarView
without worrying about the
nested controls.otherControl
- the control that will be bound to this controlbindDate
- determines if the date property will also be boundpublic final void unbind(DateControl otherControl)
bind(DateControl, boolean)
method.otherControl
- the control to unbindpublic final BooleanProperty suspendUpdatesProperty()
isSuspendUpdates()
,
setSuspendUpdates(boolean)
public final boolean isSuspendUpdates()
suspendUpdatesProperty()
.public final void setSuspendUpdates(boolean suspend)
suspendUpdatesProperty()
.suspend
- if true updates are suspendedpublic final ObjectProperty<Callback<Integer,DateControl.Usage>> usagePolicyProperty()
YearMonthView
to color
the background of each day based on the "usage" of that day. The default implementation of this policy
returns "none" for 0 entries, "very low" for 1 entry, "low" for 2 entries, "medium" for 3 entries,
"high" for 4 entries, and "very high" for 5 entries or more.getUsagePolicy()
,
setUsagePolicy(Callback)
public final void setUsagePolicy(Callback<Integer,DateControl.Usage> policy)
usagePolicyProperty()
.policy
- the new usage policypublic final Callback<Integer,DateControl.Usage> getUsagePolicy()
usagePolicyProperty()
.public ObservableList<org.controlsfx.control.PropertySheet.Item> getPropertySheetItems()
CalendarFXControl
PropertySheet
of ControlsFX.getPropertySheetItems
in class CalendarFXControl
Copyright © 2017 Dirk Lemmermann Software & Consulting. All rights reserved.