Top Description Inners Fields Constructors Methods
com.calendarfx.view

public Class ResourcesView<T extends Resource<?>>

extends DayViewBase
Class Inheritance
Imports
com.calendarfx.model.Resource, impl.com.calendarfx.view.ResourcesViewSkin, javafx.beans.InvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .IntegerProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ObservableList, javafx.geometry.Pos, javafx.scene.Node, javafx.scene.control.Label, .Skin, javafx.scene.layout.Region, javafx.util.Callback, java.time.format.DateTimeFormatter, java.time.temporal.ChronoUnit, .TemporalAdjusters, java.util.function.Consumer

The detailed day view is a composite control consisting of a DayView, an AllDayView, an CalendarHeaderView, and a TimeScaleView. The image below shows the standard appearance of the view. The second image shows the same view with the optional agenda view made visible. Detailed Day View Detailed Day View Agenda

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ResourcesView.Type

A list of possible visualization types that the resources view can support.

Field Summary

Modifier and TypeField and Description
private final BooleanProperty
private final ObjectProperty<Callback<T, AllDayView>>
private final ObjectProperty<Callback<T, DayView>>
private static final String
private final ObjectProperty<Callback<ResourcesView<T>, Region>>
private final IntegerProperty
private final ObjectProperty<Callback<T, Node>>
private final ObservableList<T>
private final BooleanProperty
private final BooleanProperty
private final BooleanProperty
private final ObjectProperty<Callback<ResourcesView<T>, Region>>
private final ObjectProperty<ResourcesView.Type>
private final ObjectProperty<Node>
private final ObjectProperty<Node>
private final ObjectProperty<Callback<T, WeekDayHeaderView>>
private final ObjectProperty<Callback<T, WeekView>>
Inherited from com.calendarfx.view.DayViewBase:
MILLIS_PER_HOUR

Constructor Summary

AccessConstructor and Description
public
ResourcesView()

Constructs a new day view.

Method Summary

Modifier and TypeMethod and Description
public final BooleanProperty

Returns:

true if the view always shows the first day of the week
adjustToFirstDayOfWeekProperty
()

A flag used to indicate that the view should always show the first day of the week (e.g. "Monday") at its beginning even if the dateProperty() is set to another day (e.g. "Thursday").

public final ObjectProperty<Callback<T, AllDayView>>

Returns:

a factory for all day views
allDayViewFactoryProperty
()

A factory used for creating a new AllDayView instance for each resource shown in the view.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final ObjectProperty<Callback<T, DayView>>

Returns:

a factory for resource day views
dayViewFactoryProperty
()

A factory used for creating a new DayView instance for a resource day shown in the view.

public final Callback<T, AllDayView>
public final Callback<T, DayView>
public final Callback<ResourcesView<T>, Region>
public final int

Returns:

the number of days shown by the view
getNumberOfDays
()

Returns the value of numberOfDaysProperty().

public final Callback<T, Node>
public final ObservableList<T>

Returns:

the list of resources
getResources
()

The resources to be shown in this view.

public final Callback<ResourcesView<T>, Region>
public final ResourcesView.Type
public final Node
public final Node
public final Callback<T, WeekDayHeaderView>
public final Callback<T, WeekView>
public final boolean

Returns:

true if the view always shows the first day of the week
isAdjustToFirstDayOfWeek
()

Returns the value of adjustToFirstDayOfWeekProperty().

public final boolean

Returns:

true if the all day view will be visible
isShowAllDayView
()

Sets the value of showAllDayViewProperty().

public final boolean

Returns:

true if the scrollbar will be visible
isShowScrollBar
()

Returns the value of showScrollBarProperty().

public final boolean

Returns:

true if the timescale view will be visible
isShowTimeScaleView
()

Returns the value of showTimeScaleViewProperty().

public final ObjectProperty<Callback<ResourcesView<T>, Region>>

Returns:

the resource separator factory
largeSeparatorFactoryProperty
()

A factory used for creating the vertical separators between the resources.

private void
private void
public final IntegerProperty

Returns:

the number of days shown by the view
numberOfDaysProperty
()

Stores the number of days that will be shown by this view.

public final ObjectProperty<Callback<T, Node>>

Returns:

the resource header factory callback
resourceHeaderFactoryProperty
()

A factory callback for creating a header for each resource

public final void
setAdjustToFirstDayOfWeek(boolean
if true the view will always show the first day of the week
adjust
)

Sets the value of adjustToFirstDayOfWeekProperty().

public final void
setAllDayViewFactory(Callback<T, AllDayView> allDayViewFactory)

public void
setDayViewFactory(Callback<T, DayView> dayViewFactory)

public final void
public final void
setNumberOfDays(int
the new number of days shown by the view
number
)

Sets the value of numberOfDaysProperty().

public final void
setResourceHeaderFactory(Callback<T, Node> resourceHeaderFactory)

public final void
setShowAllDayView(boolean
true if the all day view will be visible
show
)

Sets the value of showAllDayViewProperty().

public final void
setShowScrollBar(boolean
if true the scrollbar will be visible
showScrollBar
)

Sets the value of showScrollBarProperty().

public final void
setShowTimeScaleView(boolean
if true the timescale view will be visible
show
)

Sets the value of showTimeScaleViewProperty().

public final void
public final void
public final void
setUpperLeftCorner(Node upperLeftCorner)

public final void
setUpperRightCorner(Node upperRightCorner)

public final void
public void
setWeekViewFactory(Callback<T, WeekView> weekViewFactory)

public final BooleanProperty

Returns:

true if the all day view will be visible
showAllDayViewProperty
()

A property used to toggle the visibility of the all day view.

public final BooleanProperty

Returns:

true if the scrollbar should be shown to the user
showScrollBarProperty
()

A property used to control the visibility of the vertial scrollbar.

public final BooleanProperty

Returns:

true if the timescale view will be visible
showTimeScaleViewProperty
()

A property used to toggle the visibility of the time scale view.

public final ObjectProperty<Callback<ResourcesView<T>, Region>>
public final ObjectProperty<ResourcesView.Type>

Returns:

the visualization type
typeProperty
()

Determines the visualization type: resoruces over dates or dates over resources.

public final ObjectProperty<Node>

Returns:

the upper left corner node
upperLeftCornerProperty
()

Specifies a node that will be placed in the upper left corner of the view.

public final ObjectProperty<Node>

Returns:

the upper right corner node
upperRightCornerProperty
()

Specifies a node that will be placed in the upper right corner of the view.

public final ObjectProperty<Callback<T, WeekDayHeaderView>>

Returns:

a factory for week day header views
weekDayHeaderViewFactoryProperty
()

A factory used for creating a new WeekDayHeaderView instance for each resource shown in the view.

public final ObjectProperty<Callback<T, WeekView>>

Returns:

a factory for resource week views
weekViewFactoryProperty
()

A factory used for creating a new WeekView instance for each resource shown in the view.

Inherited from com.calendarfx.view.DayViewBase:
bindearliestTimeUsedPropertyearlyLateHoursStrategyPropertyenableCurrentTimeCirclePropertyenableCurrentTimeMarkerPropertyenableStartAndEndTimesFlipPropertyentryViewAvailabilityEditingBehaviourPropertyentryViewAvailabilityEditingOpacityPropertyentryWidthPercentagePropertygetEarliestTimeUsedgetEarlyLateHoursStrategygetEntryViewAvailabilityEditingBehaviourgetEntryViewAvailabilityEditingOpacitygetEntryWidthPercentagegetGridLineColorgetGridLinesgetGridTypegetHourHeightgetHourHeightCompressedgetHoursLayoutStrategygetInstantAtgetInstantAtgetLassoColorgetLassoEndgetLassoStartgetLatestTimeUsedgetLocationgetLocationgetMaxHourHeightgetMinHourHeightgetOnLassoFinishedgetOverlapResolutionStrategygetPropertySheetItemsgetScrollTimegetVisibleHoursgetZonedDateTimegetZonedDateTimeAtgetZonedDateTimeAtgetZonedDateTimeEndgetZonedDateTimeMaxgetZonedDateTimeMingetZonedDateTimeStartgridLineColorPropertygridLinesPropertygridTypePropertyhourHeightCompressedPropertyhourHeightPropertyhoursLayoutStrategyPropertyinstallDefaultLassoFinishedBehaviourisEnableCurrentCircleMarkerisEnableCurrentTimeMarkerisEnableStartAndEndTimesFlipisScrollingEnabledisShowCurrentTimeMarkerisShowCurrentTimeTodayMarkerisTrimTimeBoundslassoColorPropertylassoEndPropertylassoStartPropertylatestTimeUsedPropertymaxHourHeightPropertyminHourHeightPropertyonLassoFinishedPropertyoverlapResolutionStrategyPropertyscrollingEnabledPropertyscrollTimePropertysetEarlyLateHoursStrategysetEnableCurrentTimeCirclesetEnableCurrentTimeMarkersetEnableStartAndEndTimesFlipsetEntryViewAvailabilityEditingBehavioursetEntryViewAvailabilityEditingOpacitysetEntryWidthPercentagesetGridLineColorsetGridLinessetGridTypesetHourHeightsetHourHeightCompressedsetHoursLayoutStrategysetLassoColorsetLassoEndsetLassoStartsetMaxHourHeightsetMinHourHeightsetOnLassoFinishedsetOverlapResolutionStrategysetScrollingEnabledsetScrollTimesetTrimTimeBoundssetVisibleHoursshowCurrentTimeMarkerPropertyshowCurrentTimeTodayMarkerPropertytrimTimeBoundsPropertyunbindvisibleHoursProperty

Field Detail

adjustToFirstDayOfWeekback to summary
private final BooleanProperty adjustToFirstDayOfWeek
allDayViewFactoryback to summary
private final ObjectProperty<Callback<T, AllDayView>> allDayViewFactory
dayViewFactoryback to summary
private final ObjectProperty<Callback<T, DayView>> dayViewFactory
DEFAULT_STYLEback to summary
private static final String DEFAULT_STYLE
largeSeparatorFactoryback to summary
private final ObjectProperty<Callback<ResourcesView<T>, Region>> largeSeparatorFactory
numberOfDaysback to summary
private final IntegerProperty numberOfDays
resourceHeaderFactoryback to summary
private final ObjectProperty<Callback<T, Node>> resourceHeaderFactory
resourcesback to summary
private final ObservableList<T> resources
showAllDayViewback to summary
private final BooleanProperty showAllDayView
showScrollBarback to summary
private final BooleanProperty showScrollBar
showTimeScaleViewback to summary
private final BooleanProperty showTimeScaleView
smallSeparatorFactoryback to summary
private final ObjectProperty<Callback<ResourcesView<T>, Region>> smallSeparatorFactory
typeback to summary
private final ObjectProperty<ResourcesView.Type> type
upperLeftCornerback to summary
private final ObjectProperty<Node> upperLeftCorner
upperRightCornerback to summary
private final ObjectProperty<Node> upperRightCorner
weekDayHeaderViewFactoryback to summary
private final ObjectProperty<Callback<T, WeekDayHeaderView>> weekDayHeaderViewFactory
weekViewFactoryback to summary
private final ObjectProperty<Callback<T, WeekView>> weekViewFactory

Constructor Detail

ResourcesViewback to summary
public ResourcesView()

Constructs a new day view.

Method Detail

adjustToFirstDayOfWeekPropertyback to summary
public final BooleanProperty adjustToFirstDayOfWeekProperty()

A flag used to indicate that the view should always show the first day of the week (e.g. "Monday") at its beginning even if the dateProperty() is set to another day (e.g. "Thursday").

Returns:BooleanProperty

true if the view always shows the first day of the week

allDayViewFactoryPropertyback to summary
public final ObjectProperty<Callback<T, AllDayView>> allDayViewFactoryProperty()

A factory used for creating a new AllDayView instance for each resource shown in the view.

Returns:ObjectProperty<Callback<T, AllDayView>>

a factory for all day views

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
dayViewFactoryPropertyback to summary
public final ObjectProperty<Callback<T, DayView>> dayViewFactoryProperty()

A factory used for creating a new DayView instance for a resource day shown in the view.

Returns:ObjectProperty<Callback<T, DayView>>

a factory for resource day views

getAllDayViewFactoryback to summary
public final Callback<T, AllDayView> getAllDayViewFactory()
getDayViewFactoryback to summary
public final Callback<T, DayView> getDayViewFactory()
getLargeSeparatorFactoryback to summary
public final Callback<ResourcesView<T>, Region> getLargeSeparatorFactory()
getNumberOfDaysback to summary
public final int getNumberOfDays()

Returns the value of numberOfDaysProperty().

Returns:int

the number of days shown by the view

getResourceHeaderFactoryback to summary
public final Callback<T, Node> getResourceHeaderFactory()
getResourcesback to summary
public final ObservableList<T> getResources()

The resources to be shown in this view.

Returns:ObservableList<T>

the list of resources

getSmallSeparatorFactoryback to summary
public final Callback<ResourcesView<T>, Region> getSmallSeparatorFactory()
getTypeback to summary
public final ResourcesView.Type getType()
getUpperLeftCornerback to summary
public final Node getUpperLeftCorner()
getUpperRightCornerback to summary
public final Node getUpperRightCorner()
getWeekDayHeaderViewFactoryback to summary
public final Callback<T, WeekDayHeaderView> getWeekDayHeaderViewFactory()
getWeekViewFactoryback to summary
public final Callback<T, WeekView> getWeekViewFactory()
isAdjustToFirstDayOfWeekback to summary
public final boolean isAdjustToFirstDayOfWeek()

Returns the value of adjustToFirstDayOfWeekProperty().

Returns:boolean

true if the view always shows the first day of the week

isShowAllDayViewback to summary
public final boolean isShowAllDayView()

Sets the value of showAllDayViewProperty().

Returns:boolean

true if the all day view will be visible

isShowScrollBarback to summary
public final boolean isShowScrollBar()

Returns the value of showScrollBarProperty().

Returns:boolean

true if the scrollbar will be visible

isShowTimeScaleViewback to summary
public final boolean isShowTimeScaleView()

Returns the value of showTimeScaleViewProperty().

Returns:boolean

true if the timescale view will be visible

largeSeparatorFactoryPropertyback to summary
public final ObjectProperty<Callback<ResourcesView<T>, Region>> largeSeparatorFactoryProperty()

A factory used for creating the vertical separators between the resources.

Returns:ObjectProperty<Callback<ResourcesView<T>, Region>>

the resource separator factory

maybeAdjustToFirstDayOfWeekback to summary
private void maybeAdjustToFirstDayOfWeek()
maybeRunAndConsumeback to summary
private void maybeRunAndConsume(RequestEvent evt, Consumer<RequestEvent> consumer)
numberOfDaysPropertyback to summary
public final IntegerProperty numberOfDaysProperty()

Stores the number of days that will be shown by this view.

Returns:IntegerProperty

the number of days shown by the view

resourceHeaderFactoryPropertyback to summary
public final ObjectProperty<Callback<T, Node>> resourceHeaderFactoryProperty()

A factory callback for creating a header for each resource

Returns:ObjectProperty<Callback<T, Node>>

the resource header factory callback

setAdjustToFirstDayOfWeekback to summary
public final void setAdjustToFirstDayOfWeek(boolean adjust)

Sets the value of adjustToFirstDayOfWeekProperty().

Parameters
adjust:boolean

if true the view will always show the first day of the week

setAllDayViewFactoryback to summary
public final void setAllDayViewFactory(Callback<T, AllDayView> allDayViewFactory)
setDayViewFactoryback to summary
public void setDayViewFactory(Callback<T, DayView> dayViewFactory)
setLargeSeparatorFactoryback to summary
public final void setLargeSeparatorFactory(Callback<ResourcesView<T>, Region> largeSeparatorFactory)
setNumberOfDaysback to summary
public final void setNumberOfDays(int number)

Sets the value of numberOfDaysProperty().

Parameters
number:int

the new number of days shown by the view

setResourceHeaderFactoryback to summary
public final void setResourceHeaderFactory(Callback<T, Node> resourceHeaderFactory)
setShowAllDayViewback to summary
public final void setShowAllDayView(boolean show)

Sets the value of showAllDayViewProperty().

Parameters
show:boolean

true if the all day view will be visible

setShowScrollBarback to summary
public final void setShowScrollBar(boolean showScrollBar)

Sets the value of showScrollBarProperty().

Parameters
showScrollBar:boolean

if true the scrollbar will be visible

setShowTimeScaleViewback to summary
public final void setShowTimeScaleView(boolean show)

Sets the value of showTimeScaleViewProperty().

Parameters
show:boolean

if true the timescale view will be visible

setSmallSeparatorFactoryback to summary
public final void setSmallSeparatorFactory(Callback<ResourcesView<T>, Region> smallSeparatorFactory)
setTypeback to summary
public final void setType(ResourcesView.Type type)
setUpperLeftCornerback to summary
public final void setUpperLeftCorner(Node upperLeftCorner)
setUpperRightCornerback to summary
public final void setUpperRightCorner(Node upperRightCorner)
setWeekDayHeaderViewFactoryback to summary
public final void setWeekDayHeaderViewFactory(Callback<T, WeekDayHeaderView> factory)
setWeekViewFactoryback to summary
public void setWeekViewFactory(Callback<T, WeekView> weekViewFactory)
showAllDayViewPropertyback to summary
public final BooleanProperty showAllDayViewProperty()

A property used to toggle the visibility of the all day view.

Returns:BooleanProperty

true if the all day view will be visible

showScrollBarPropertyback to summary
public final BooleanProperty showScrollBarProperty()

A property used to control the visibility of the vertial scrollbar.

Returns:BooleanProperty

true if the scrollbar should be shown to the user

showTimeScaleViewPropertyback to summary
public final BooleanProperty showTimeScaleViewProperty()

A property used to toggle the visibility of the time scale view.

Returns:BooleanProperty

true if the timescale view will be visible

smallSeparatorFactoryPropertyback to summary
public final ObjectProperty<Callback<ResourcesView<T>, Region>> smallSeparatorFactoryProperty()
typePropertyback to summary
public final ObjectProperty<ResourcesView.Type> typeProperty()

Determines the visualization type: resoruces over dates or dates over resources.

Returns:ObjectProperty<ResourcesView.Type>

the visualization type

upperLeftCornerPropertyback to summary
public final ObjectProperty<Node> upperLeftCornerProperty()

Specifies a node that will be placed in the upper left corner of the view.

Returns:ObjectProperty<Node>

the upper left corner node

upperRightCornerPropertyback to summary
public final ObjectProperty<Node> upperRightCornerProperty()

Specifies a node that will be placed in the upper right corner of the view.

Returns:ObjectProperty<Node>

the upper right corner node

weekDayHeaderViewFactoryPropertyback to summary
public final ObjectProperty<Callback<T, WeekDayHeaderView>> weekDayHeaderViewFactoryProperty()

A factory used for creating a new WeekDayHeaderView instance for each resource shown in the view.

Returns:ObjectProperty<Callback<T, WeekDayHeaderView>>

a factory for week day header views

weekViewFactoryPropertyback to summary
public final ObjectProperty<Callback<T, WeekView>> weekViewFactoryProperty()

A factory used for creating a new WeekView instance for each resource shown in the view.

Returns:ObjectProperty<Callback<T, WeekView>>

a factory for resource week views

com.calendarfx.view back to summary

public final Enum ResourcesView.Type

extends Enum<ResourcesView.Type>
Class Inheritance

A list of possible visualization types that the resources view can support.

Field Summary

Modifier and TypeField and Description
public static final ResourcesView.Type
DATES_OVER_RESOURCES

Display the dates at the very top and then one or more resources below each date.

public static final ResourcesView.Type
RESOURCES_OVER_DATES

Display the resources at the very top and then one or more days below each resource.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static ResourcesView.Type
public static ResourcesView.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DATES_OVER_RESOURCESback to summary
public static final ResourcesView.Type DATES_OVER_RESOURCES

Display the dates at the very top and then one or more resources below each date.

RESOURCES_OVER_DATESback to summary
public static final ResourcesView.Type RESOURCES_OVER_DATES

Display the resources at the very top and then one or more days below each resource.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static ResourcesView.Type valueOf(String name)
valuesback to summary
public static ResourcesView.Type[] values()