Top Description Fields Constructors Methods
com.calendarfx.view

public Class DayView

extends DayViewBase
Class Inheritance
Known Direct Subclasses
com.calendarfx.view.WeekDayView
Imports
com.calendarfx.model.Calendar, .Entry, impl.com.calendarfx.view.DayViewSkin, javafx.beans.InvalidationListener, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.scene.control.Skin, javafx.util.Callback, java.time.LocalDate, java.util.List, .Optional

A view representing a single day. This view can be customized to show all 24 hours at equal height, compress the early and late hours (unused hours), or to hide these hours altogether. The view uses a factory to create instances of DayEntryView. Applications can plug in their own factory to customize the appearance of entry views. New calendar entries can be created by double clicking in the background of the view. The image below shows an example of this view with three entry views and compressed early hours. Day View

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private final ObjectProperty<Callback<Entry<?>, DayEntryView>>
Inherited from com.calendarfx.view.DayViewBase:
MILLIS_PER_HOUR

Constructor Summary

AccessConstructor and Description
public
DayView()

Constructs a new day view.

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final ObjectProperty<Callback<Entry<?>, DayEntryView>>

Returns:

the day entry view factory
entryViewFactoryProperty
()

A factory used for creating instances of DayEntryView for each calendar entry that needs to be shown in this day view.

public Optional<Calendar<T>>
getCalendarAt(double
the x-coordinate to check
x
,
double
the y-coordinate to check
y
)

Overrides com.calendarfx.view.DateControl.getCalendarAt.

Returns the calendar shown at the given location.

public final Callback<Entry<?>, DayEntryView>

Returns:

the entry view factory
getEntryViewFactory
()

Returns the value of entryViewFactoryProperty().

public final void
setEntryViewFactory(Callback<Entry<?>, DayEntryView>
the entry view factory
factory
)

Sets the value of entryViewFactoryProperty().

private void
Inherited from com.calendarfx.view.DayViewBase:
bindearliestTimeUsedPropertyearlyLateHoursStrategyPropertyenableCurrentTimeCirclePropertyenableCurrentTimeMarkerPropertyenableStartAndEndTimesFlipPropertyentryViewAvailabilityEditingBehaviourPropertyentryViewAvailabilityEditingOpacityPropertyentryWidthPercentagePropertygetEarliestTimeUsedgetEarlyLateHoursStrategygetEntryViewAvailabilityEditingBehaviourgetEntryViewAvailabilityEditingOpacitygetEntryWidthPercentagegetGridLineColorgetGridLinesgetGridTypegetHourHeightgetHourHeightCompressedgetHoursLayoutStrategygetInstantAtgetInstantAtgetLassoColorgetLassoEndgetLassoStartgetLatestTimeUsedgetLocationgetLocationgetMaxHourHeightgetMinHourHeightgetOnLassoFinishedgetOverlapResolutionStrategygetPropertySheetItemsgetScrollTimegetVisibleHoursgetZonedDateTimegetZonedDateTimeAtgetZonedDateTimeAtgetZonedDateTimeEndgetZonedDateTimeMaxgetZonedDateTimeMingetZonedDateTimeStartgridLineColorPropertygridLinesPropertygridTypePropertyhourHeightCompressedPropertyhourHeightPropertyhoursLayoutStrategyPropertyinstallDefaultLassoFinishedBehaviourisEnableCurrentCircleMarkerisEnableCurrentTimeMarkerisEnableStartAndEndTimesFlipisScrollingEnabledisShowCurrentTimeMarkerisShowCurrentTimeTodayMarkerisTrimTimeBoundslassoColorPropertylassoEndPropertylassoStartPropertylatestTimeUsedPropertymaxHourHeightPropertyminHourHeightPropertyonLassoFinishedPropertyoverlapResolutionStrategyPropertyscrollingEnabledPropertyscrollTimePropertysetEarlyLateHoursStrategysetEnableCurrentTimeCirclesetEnableCurrentTimeMarkersetEnableStartAndEndTimesFlipsetEntryViewAvailabilityEditingBehavioursetEntryViewAvailabilityEditingOpacitysetEntryWidthPercentagesetGridLineColorsetGridLinessetGridTypesetHourHeightsetHourHeightCompressedsetHoursLayoutStrategysetLassoColorsetLassoEndsetLassoStartsetMaxHourHeightsetMinHourHeightsetOnLassoFinishedsetOverlapResolutionStrategysetScrollingEnabledsetScrollTimesetTrimTimeBoundssetVisibleHoursshowCurrentTimeMarkerPropertyshowCurrentTimeTodayMarkerPropertytrimTimeBoundsPropertyunbindvisibleHoursProperty

Field Detail

DAY_VIEWback to summary
private static final String DAY_VIEW
DAY_VIEW_TODAYback to summary
private static final String DAY_VIEW_TODAY
DAY_VIEW_WEEKEND_DAYback to summary
private static final String DAY_VIEW_WEEKEND_DAY
entryViewFactoryback to summary
private final ObjectProperty<Callback<Entry<?>, DayEntryView>> entryViewFactory

Constructor Detail

DayViewback to summary
public DayView()

Constructs a new day view.

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
entryViewFactoryPropertyback to summary
public final ObjectProperty<Callback<Entry<?>, DayEntryView>> entryViewFactoryProperty()

A factory used for creating instances of DayEntryView for each calendar entry that needs to be shown in this day view.

Returns:ObjectProperty<Callback<Entry<?>, DayEntryView>>

the day entry view factory

getCalendarAtback to summary
public Optional<Calendar<T>> getCalendarAt(double x, double y)

Overrides com.calendarfx.view.DateControl.getCalendarAt.

Doc from com.calendarfx.view.DateControl.getCalendarAt.

Returns the calendar shown at the given location. This method returns an optional value. Calling this method might or might not make sense, depending on the type of control and the current layout (see layoutProperty()).

Parameters
x:double

the x-coordinate to check

y:double

the y-coordinate to check

Returns:Optional<Calendar<T>>

the calendar at the given location

Annotations
@Override
getEntryViewFactoryback to summary
public final Callback<Entry<?>, DayEntryView> getEntryViewFactory()

Returns the value of entryViewFactoryProperty().

Returns:Callback<Entry<?>, DayEntryView>

the entry view factory

setEntryViewFactoryback to summary
public final void setEntryViewFactory(Callback<Entry<?>, DayEntryView> factory)

Sets the value of entryViewFactoryProperty().

Parameters
factory:Callback<Entry<?>, DayEntryView>

the entry view factory

updateStyleClassesback to summary
private void updateStyleClasses()