Top Description Inners Fields Constructors Methods
com.calendarfx.view

public abstract Class DayViewBase

extends DateControl
implements ZonedDateTimeProvider
Class Inheritance
All Implemented Interfaces
com.calendarfx.view.ZonedDateTimeProvider
Known Direct Subclasses
com.calendarfx.view.DetailedDayView, com.calendarfx.view.DetailedWeekView, com.calendarfx.view.ResourceCalendarView, com.calendarfx.view.ResourcesView, com.calendarfx.view.TimeScaleView, com.calendarfx.view.WeekView, impl.com.calendarfx.view.ResourcesViewContainer, com.calendarfx.view.DayView
Imports
com.calendarfx.model.Calendar, .Entry, .Interval, com.calendarfx.util.LoggingDomain, .ViewHelper, javafx.beans.InvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .DoubleProperty, .IntegerProperty, .ObjectProperty, .ReadOnlyBooleanProperty, .ReadOnlyBooleanWrapper, .ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, .SimpleBooleanProperty, .SimpleDoubleProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.MapChangeListener, .ObservableList, javafx.scene.input.MouseEvent, javafx.scene.paint.Color, .Paint, org.controlsfx.control.PropertySheet.Item, java.time.Instant, .LocalDate, .LocalTime, .ZoneId, .ZonedDateTime, java.time.temporal.ChronoUnit, java.util.Optional, java.util.function.BiConsumer

The common superclass for all date controls that are used to display the 24 hours of a day: day view, week day view, timescale, week timescale, and week view. Instances of this type can be configured to display hours at a fixed height or alternatively a fixed number of hours for a given viewport height (see HoursLayoutStrategy). This control also supports an early / late hours concept where these hours can either be shown, or hidden, or shown in a compressed way (see EarlyLateHoursStrategy). The idea behind early / late hours is that often applications do not work with all 24 hours of a day and hiding or compressing these hours allow the user to focus on the relevant hours.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DayViewBase.AvailabilityEditingEntryBehaviour

A list of possible ways that entries can behave when the user switches to availability editing.

public static enum
DayViewBase.EarlyLateHoursStrategy

An enumerator used for specifying how to deal with late and early hours.

public static enum
DayViewBase.GridType

A list of possible grid types supported by the day view.

public static enum
DayViewBase.HoursLayoutStrategy

An enumerator used for specifying how to lay out hours.

public static enum
DayViewBase.OverlapResolutionStrategy

An enum listing possible methods of determining overlapping entries.

Field Summary

Modifier and TypeField and Description
private static final String
private final ReadOnlyObjectWrapper<LocalTime>
private final ObjectProperty<DayViewBase.EarlyLateHoursStrategy>
private final BooleanProperty
private final BooleanProperty
private final BooleanProperty
private final ObjectProperty<DayViewBase.AvailabilityEditingEntryBehaviour>
private final DoubleProperty
private final DoubleProperty
private final ObjectProperty<Paint>
private final ObjectProperty<VirtualGrid>
private final ObjectProperty<DayViewBase.GridType>
private final DoubleProperty
private final DoubleProperty
private final ObjectProperty<DayViewBase.HoursLayoutStrategy>
private final ObjectProperty<Paint>
private final ObjectProperty<Instant>
private final ObjectProperty<Instant>
private final ReadOnlyObjectWrapper<LocalTime>
private final DoubleProperty
public static final double
private final DoubleProperty
private final ObjectProperty<BiConsumer<Instant, Instant>>
private final ObjectProperty<DayViewBase.OverlapResolutionStrategy>
private final BooleanProperty
private final ObjectProperty<ZonedDateTime>
private final ReadOnlyBooleanWrapper
private final ReadOnlyBooleanWrapper
private final BooleanProperty
private final IntegerProperty
Inherited from com.calendarfx.view.DateControl:
usagePolicy

Constructor Summary

AccessConstructor and Description
public
DayViewBase()

Constructs a new view.

Method Summary

Modifier and TypeMethod and Description
public final void
bind(DayViewBase
the control that will be bound to this control
otherControl
,
boolean
if true will also bind the date property
bindDate
)

Invokes DateControl#bind(DateControl, boolean) and adds some more bindings between this control and the given control.

public final ReadOnlyObjectProperty<LocalTime>

Returns:

the earliest time used by the view
earliestTimeUsedProperty
()

A read-only property used for informing the application about the earliest time point used by any of the calendar entries currently shown by the view.

public final ObjectProperty<DayViewBase.EarlyLateHoursStrategy>

Returns:

the early / late hours strategy
earlyLateHoursStrategyProperty
()

Specifies a strategy for dealing with early / late hours.

public final BooleanProperty

Returns:

true if the current time will be marked with a red dot
enableCurrentTimeCircleProperty
()

A property used to signal whether the application wants to use the red (default) dot used for marking the current system time.

public final BooleanProperty

Returns:

true if the current time will be marked with a red line / text
enableCurrentTimeMarkerProperty
()

A property used to signal whether the application wants to use the red (default) line used for marking the current system time.

public final BooleanProperty

Returns:

whether start and end times can be flipped
enableStartAndEndTimesFlipProperty
()

Determines whether the user can flip the start and the end time of an entry by dragging either one to the other side of the other one.

public final ObjectProperty<DayViewBase.AvailabilityEditingEntryBehaviour>

Returns:

the behaviour of entry views when in availability editing mode
entryViewAvailabilityEditingBehaviourProperty
()

Determines how entry views should behave when the user switches to the availability editing mode.

public final DoubleProperty

Returns:

the opacity value
entryViewAvailabilityEditingOpacityProperty
()

A double value that determines how opaque entry views will be while the user is performing availability editing.

public final DoubleProperty

Returns:

the entry percentage width
entryWidthPercentageProperty
()

A percentage value used to specify how much of the available width inside the view will be utilized by the entry views.

public final LocalTime

Returns:

the earliest time used
getEarliestTimeUsed
()

Returns the value of earliestTimeUsedProperty().

public final DayViewBase.EarlyLateHoursStrategy

Returns:

the early / late hours strategy
getEarlyLateHoursStrategy
()

Returns the value of earlyLateHoursStrategyProperty().

public final DayViewBase.AvailabilityEditingEntryBehaviour
public final double
public double

Returns:

the percentage width
getEntryWidthPercentage
()

Returns the value of entryWidthPercentageProperty().

public final Paint
public final VirtualGrid
public final DayViewBase.GridType
public final double

Returns:

the hour height
getHourHeight
()

Returns the value of hourHeightProperty().

public final double

Returns:

the compressed hour height
getHourHeightCompressed
()

Returns the value of hourHeightCompressedProperty().

public final DayViewBase.HoursLayoutStrategy

Returns:

the hours layout strategy
getHoursLayoutStrategy
()

Returns the value of hoursLayoutStrategyProperty().

public Instant

Returns:

the time at the mouse event location
getInstantAt
(MouseEvent
the mouse event
evt
)

Returns the time instant at the location of the given mouse event.

public Instant

Returns:

the time at the given location
getInstantAt
(double
the x-coordinate
x
,
double
the y-coordinate
y
)

Returns the time instant at the given location.

public final Paint
public final Instant
public final Instant
public final LocalTime

Returns:

the latest time used
getLatestTimeUsed
()

Returns the value of latestTimeUsedProperty().

public final double

Returns:

the y coordinate
getLocation
(Instant
the time for which to return the coordinate
instant
)

Returns the y coordinate for the given time instance.

public final double

Returns:

the y coordinate
getLocation
(ZonedDateTime
the time for which to return the coordinate
time
)

Returns the y coordinate for the given time.

public final double
public final double
public final BiConsumer<Instant, Instant>
public final DayViewBase.OverlapResolutionStrategy
public ObservableList<PropertySheet.Item>
getPropertySheetItems()

Overrides com.calendarfx.view.DateControl.getPropertySheetItems.

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

public final ZonedDateTime
public final int

Returns:

the number of visible hours
getVisibleHours
()

Returns the value of visibleHoursProperty().

public final ZonedDateTime

Returns:

the zoned date time version of the given time
getZonedDateTime
(LocalTime
the local time to convert to a zoned date time
time
)

Returns the zoned date time version of the given time for the view and its current date and time zone.

public ZonedDateTime

Returns:

the time at the given location
getZonedDateTimeAt
(double
the x-coordinate
x
,
double
the y-coordinate
y
)

Returns the zoned date time at the given location.

public ZonedDateTime
getZonedDateTimeAt(double
the x coordinate of the input event
x
,
double
the y coordinate of the input event
y
,
ZoneId
the zoneID for which we query the time
zoneId
)

Implements com.calendarfx.view.ZonedDateTimeProvider.getZonedDateTimeAt.

Returns the time at the given location.

public final ZonedDateTime

Returns:

the zoned end time of the view
getZonedDateTimeEnd
()

Returns the zoned end time of the day view for the view's current date, its end time, and its time zone.

public final ZonedDateTime

Returns:

the zoned maximum time of the view
getZonedDateTimeMax
()

Returns the zoned maximum time of the day view for the view's current date, for LocalTime#MAX, and its time zone.

public final ZonedDateTime

Returns:

the zoned minimum time of the view
getZonedDateTimeMin
()

Returns the zoned minimum time of the day view for the view's current date, for LocalTime#MIN, and its time zone.

public final ZonedDateTime

Returns:

the zoned start time of the view
getZonedDateTimeStart
()

Returns the zoned start time of the day view for the view's current date, its start time, and its time zone.

public final ObjectProperty<Paint>

Returns:

the grid line color
gridLineColorProperty
()

A color used to draw the lightweight grid lines in a background canvas.

public final ObjectProperty<VirtualGrid>

Returns:

the grid lines virtual grid object
gridLinesProperty
()

A virtual grid used to control the placement of lightweight grid lines in the background of the view.

public final ObjectProperty<DayViewBase.GridType>

Returns:

the grid type
gridTypeProperty
()

Determines the type of grid / grid lines will be used for full hours, half hours, and so on.

public final DoubleProperty

Returns:

the compressed hour height
hourHeightCompressedProperty
()

The height used for each early / late hour shown by the view when using the EarlyLateHoursStrategy#SHOW_COMPRESSED strategy.

public final DoubleProperty

Returns:

the hour height
hourHeightProperty
()

The height used for each hour shown by the view.

public final ObjectProperty<DayViewBase.HoursLayoutStrategy>

Returns:

the hours layout strategy
hoursLayoutStrategyProperty
()

The layout strategy used by this view for showing hours.

public void
installDefaultLassoFinishedBehaviour()

Registers a onLassoFinishedProperty() that will add a calendar entry for the lasso selection into the current availability calendar.

public final boolean

Returns:

true if the current time will be marked with a red dot
isEnableCurrentCircleMarker
()

Returns the value of enableCurrentTimeCircleProperty.

public final boolean

Returns:

true if the current time will be marked with a red line / text
isEnableCurrentTimeMarker
()

Returns the value of enableCurrentTimeMarkerProperty.

public final boolean
public final boolean
public final boolean

Returns:

true if the view should display the marker
isShowCurrentTimeMarker
()

Returns the value of showCurrentTimeMarkerProperty().

public final boolean

Returns:

true if the view should show the marker
isShowCurrentTimeTodayMarker
()

Returns the value of showCurrentTimeTodayMarkerProperty().

public final boolean
public final ObjectProperty<Paint>
public final ObjectProperty<Instant>
public final ObjectProperty<Instant>
public final ReadOnlyObjectProperty<LocalTime>

Returns:

the latest time used by the view
latestTimeUsedProperty
()

A read-only property used for informing the application about the latest time point used by any of the calendar entries currently shown by the view.

public final DoubleProperty

Returns:

the maximum hour height
maxHourHeightProperty
()

Returns the maximum height of an hour interval.

public final DoubleProperty

Returns:

the minimum hour height
minHourHeightProperty
()

Returns the minimum height of an hour interval.

public final ObjectProperty<BiConsumer<Instant, Instant>>
public final ObjectProperty<DayViewBase.OverlapResolutionStrategy>

Returns:

the overlap resolution strategy
overlapResolutionStrategyProperty
()

A property used to instruct the view how to resolve overlapping entries, whether the resolution should be based on the time intervals of calendar entries or on their visual bounds or completely disabled.

public final BooleanProperty
public final ObjectProperty<ZonedDateTime>
public final void
setEarlyLateHoursStrategy(DayViewBase.EarlyLateHoursStrategy
the strategy to use for early / late hours
strategy
)

Sets the value of earlyLateHoursStrategyProperty().

public final void
setEnableCurrentTimeCircle(boolean
if true the current time will be marked with a red dot
enable
)

Sets the value of enableCurrentTimeCircleProperty.

public final void
setEnableCurrentTimeMarker(boolean
if true the current time will be marked with a red line / text
enable
)

Sets the value of enableCurrentTimeMarkerProperty.

public final void
setEnableStartAndEndTimesFlip(boolean enableStartAndEndTimesFlip)

public final void
public final void
setEntryViewAvailabilityEditingOpacity(double entryViewAvailabilityEditingOpacity)

public final void
setEntryWidthPercentage(double
the new percentage width
percentage
)

Sets the value of entryWidthPercentage.

public final void
setGridLineColor(Paint gridLineColor)

public final void
public final void
public final void
setHourHeight(double
the hour height
height
)

Sets the value of hourHeightProperty().

public final void
setHourHeightCompressed(double
the compressed hour height
height
)

Sets the value of hourHeightCompressedProperty().

public final void
setHoursLayoutStrategy(DayViewBase.HoursLayoutStrategy
the hours layout strategy
strategy
)

Sets the value of hoursLayoutStrategyProperty().

public final void
setLassoColor(Paint lassoColor)

public final void
setLassoEnd(Instant lassoEnd)

public final void
setLassoStart(Instant lassoStart)

public final void
setMaxHourHeight(double maxHourHeight)

public final void
setMinHourHeight(double minHourHeight)

public final void
public final void
public final void
setScrollingEnabled(boolean scrollingEnabled)

public final void
public final void
setTrimTimeBounds(boolean trimTimeBounds)

public final void
setVisibleHours(int
the number of visible hours
hours
)

Sets the value of visibleHoursProperty().

public final ReadOnlyBooleanProperty

Returns:

true if the current time marker should be shown
showCurrentTimeMarkerProperty
()

A read-only property used to indicate whether the view should show the "current time" marker.

public final ReadOnlyBooleanProperty

Returns:

true if the current time marker should be shown
showCurrentTimeTodayMarkerProperty
()

A read-only property used to indicate whether the view should show the "current time today" marker.

private void
public final BooleanProperty

Returns:

true if the time bounds will be automatically trimmed
trimTimeBoundsProperty
()

A property to control whether the view should automatically adjust the earliest and latest time used properties based on the currently showing entries.

public final void
unbind(DayViewBase otherControl)

public final IntegerProperty

Returns:

the number of visible hours
visibleHoursProperty
()

The number of visible hours that the application wants to present to the user at any time.

Inherited from com.calendarfx.view.DateControl:
availabilityCalendarPropertyavailabilityFillPropertyavailabilityGridPropertybindcalendarSourceFactoryPropertycalendarsPropertyclearSelectioncontextMenuCallbackPropertycreateCalendarSourcecreateEntryAtcreateEntryAtcreateEntryAtcreateEntryClickCountPropertydateDetailsCallbackPropertydatePropertydefaultCalendarProviderPropertydeselectdraggedEntryPropertyeditAvailabilityPropertyeditEntryeditEntryenableHyperlinksPropertyenableTimeZoneSupportPropertyendTimePropertyentryContextMenuCallbackPropertyentryDetailsCallbackPropertyentryDetailsPopOverContentCallbackPropertyentryEditPolicyPropertyentryFactoryPropertyfindEntryViewgetAvailabilityCalendargetAvailabilityFillgetAvailabilityGridgetAvailableZoneIdsgetBoundDateControlsgetCalendarAtgetCalendarsgetCalendarSourceFactorygetCalendarSourcesgetCalendarVisibilityMapgetCalendarVisibilityPropertygetContextMenuCallbackgetCreateEntryClickCountgetDategetDateDetailsCallbackgetDefaultCalendarProvidergetDraggedEntrygetEndTimegetEntryContextMenuCallbackgetEntryDetailsCallbackgetEntryDetailsPopOverContentCallbackgetEntryEditPolicygetEntryFactorygetFirstDayOfWeekgetLayoutgetRequestedTimegetSelectionModegetSelectionsgetStartTimegetTimegetTodaygetUsagePolicygetVirtualGridgetWeekendDaysgetWeekFieldsgetZonedDateTimegetZoneIdgoBackgoForwardgoTodayisCalendarVisibleisEditAvailabilityisEnableHyperlinksisEnableTimeZoneSupportisShowDetailsUponEntryCreationisShowNoonMarkerisShowTodayisSuspendUpdateslayoutPropertyrefreshDatarequestedTimePropertyselectselectionModePropertysetAvailabilityCalendarsetAvailabilityFillsetAvailabilityGridsetCalendarSourceFactorysetCalendarVisibilitysetContextMenuCallbacksetCreateEntryClickCountsetDatesetDateDetailsCallbacksetDefaultCalendarProvidersetDraggedEntrysetEditAvailabilitysetEnableHyperlinkssetEnableTimeZoneSupportsetEndTimesetEntryContextMenuCallbacksetEntryDetailsCallbacksetEntryDetailsPopOverContentCallbacksetEntryEditPolicysetEntryFactorysetLayoutsetRequestedTimesetSelectionModesetShowDetailsUponEntryCreationsetShowNoonMarkersetShowTodaysetStartTimesetSuspendUpdatessetTimesetTodaysetUsagePolicysetVirtualGridsetWeekFieldssetZoneIdshowDateDetailsshowDetailsUponEntryCreationPropertyshowEntryshowNoonMarkerPropertyshowTodayPropertystartTimePropertysuspendUpdatesPropertytimePropertytodayPropertyunbindunbindAllusagePolicyPropertyvirtualGridPropertyvisibleLayersPropertyweekFieldsPropertyzoneIdProperty