Top Description Inners Fields Constructors Methods
com.calendarfx.view

public Class MonthSheetView

extends DateControl
Class Inheritance
Imports
com.calendarfx.model.Calendar, .Calendar.Style, .Entry, impl.com.calendarfx.view.MonthSheetViewSkin, javafx.beans.property.BooleanProperty, .IntegerProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.ObservableList, javafx.css.PseudoClass, javafx.geometry.Insets, .Pos, javafx.scene.Node, javafx.scene.canvas.Canvas, .GraphicsContext, javafx.scene.control.ContextMenu, .Label, .MenuItem, .RadioMenuItem, .SeparatorMenuItem, .Skin, .ToggleGroup, javafx.scene.input.ContextMenuEvent, .MouseButton, .PickResult, javafx.scene.layout.Region, javafx.scene.paint.Color, javafx.util.Callback, org.controlsfx.control.PropertySheet, java.time.DayOfWeek, .LocalDate, .LocalTime, .Month, .Year, .YearMonth, .ZonedDateTime, java.time.format.TextStyle, java.time.temporal.WeekFields, java.util.HashMap, .List, .Locale, .Map, .Objects, .Optional

A view laying out months and dates in a spreadsheet style. An ideal way of displaying several months or even a year. Each day is represented by a cell (see DateCell). Cells are created by a cell factory and can be customized to fit an application's needs.

Screenshot (Using DetailedDateCell)

Month Sheet View

Screenshot (Using "aligned" weekday layout)

Month Sheet View Aligned
See Also
setWeekDayLayout(WeekDayLayoutStrategy), setCellFactory(Callback), MonthSheetView.DateCell, MonthSheetView.SimpleDateCell, MonthSheetView.DetailedDateCell, MonthSheetView.BadgeDateCell, MonthSheetView.UsageDateCell

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
MonthSheetView.BadgeDateCell

The badge date cell extends the SimpleDateCell and adds another label to it that is used to display a counter of the number of entries that exist on that date.

public static enum
MonthSheetView.ClickBehaviour

An enumerator to control the behaviour of the control when the user clicks on a date.

public abstract static class
MonthSheetView.DateCell

The base class for all date cells that are used in combination with the MonthSheetView.

public static class
MonthSheetView.DateParameter

A parameter object used by the cell factory of the month sheet view.

public static class
MonthSheetView.DetailedDateCell

A specialization of the SimpleDateCell that adds a small canvas on the right-hand side to visualize the utilization of the day (the entries that exist on that date).

public static class
MonthSheetView.HeaderParameter

A parameter object used by the "header" cell factory of the month sheet view.

public static class
MonthSheetView.MonthHeaderCell

The default cell used for month headers.

public static class
MonthSheetView.SimpleDateCell

A date cell used to display the day of month, the day of week, and the week of year in three separate labels.

public static class
MonthSheetView.UsageDateCell

A specialization of the SimpleDateCell that adds utilization information to the cell by coloring its background differently based on the number of entries found on that day.

public static enum
MonthSheetView.ViewUnit

A view unit describes how many months the view should show.

public static enum
MonthSheetView.WeekDayLayoutStrategy

The different ways the view can align date cells.

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<Callback<MonthSheetView.DateParameter, MonthSheetView.DateCell>>
private final ObjectProperty<MonthSheetView.ClickBehaviour>
private double
private double
private MonthSheetView.DateCell
private final ObjectProperty<DateSelectionModel>
private static final String
private final IntegerProperty
private final IntegerProperty
private final ObjectProperty<MonthSheetView.ViewUnit>
private final ObjectProperty<Callback<MonthSheetView.HeaderParameter, Node>>
private static final String
private final BooleanProperty
private static final String
private static final String
private static final String
private static final String
private static final String
private final ObjectProperty<MonthSheetView.ViewUnit>
private final ObjectProperty<MonthSheetView.WeekDayLayoutStrategy>
Inherited from com.calendarfx.view.DateControl:
usagePolicy

Constructor Summary

AccessConstructor and Description
public
MonthSheetView()

Constructs a new month sheet view that is using the SimpleDateCell.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<Callback<MonthSheetView.DateParameter, MonthSheetView.DateCell>>

Returns:

the cell factory
cellFactoryProperty
()

A property used to store a reference to the cell factory for this view.

public final ObjectProperty<MonthSheetView.ClickBehaviour>

Returns:

the click behaviour
clickBehaviourProperty
()

The behaviour used when the user clicks on a date.

private ContextMenu
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final ObjectProperty<DateSelectionModel>

Returns:

the date selection model
dateSelectionModelProperty
()

A property used to store a selection model for selecting dates.

public final IntegerProperty

Returns:

the number of units used to extend the view at the beginning (e.g. "3 months")
extendedUnitsBackwardProperty
()

An integer property that stores the number of units that will be used to extend the view by.

public final IntegerProperty

Returns:

the number of units used to extend the view at the end (e.g. "3 months")
extendedUnitsForwardProperty
()

An integer property that stores the number of units that will be used to extend the view by.

public final ObjectProperty<MonthSheetView.ViewUnit>

Returns:

the view unit (e.g. "quarters", "year", "month")
extendedViewUnitProperty
()

A property used to store the unit shown by the view in front of or after the main columns (e.g. "quarters", "year", "month").

public final Callback<MonthSheetView.DateParameter, MonthSheetView.DateCell>

Returns:

the cell factory
getCellFactory
()

Returns the value of cellFactoryProperty().

public final MonthSheetView.ClickBehaviour

Returns:

the click behaviour
getClickBehaviour
()

Returns the value of clickBehaviourProperty().

public final DateSelectionModel

Returns:

the date selection model
getDateSelectionModel
()

Returns the value of dateSelectionModelProperty().

public final YearMonth

Returns:

the start month
getEndMonth
()

Returns the first "regular" month shown by the view.

public final YearMonth

Returns:

the start month
getExtendedEndMonth
()

Returns the last month shown by the view.

public final YearMonth

Returns:

the start month
getExtendedStartMonth
()

Returns the first month shown by the view.

public final int

Returns:

the number of units shown at the beginning of the view
getExtendedUnitsBackward
()

Returns the value of extendedUnitsBackwardProperty.

public final int

Returns:

the number of units shown at the end of the view
getExtendedUnitsForward
()

Returns the value of extendedUnitsForward.

public final MonthSheetView.ViewUnit

Returns:

the extended view unit (e.g. "quarters", "year", "month")
getExtendedViewUnit
()

Returns the value of extendedViewUnitProperty().

public final Callback<MonthSheetView.HeaderParameter, Node>

Returns:

the "header" cell factory
getHeaderCellFactory
()

Returns the value of headerCellFactoryProperty().

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 YearMonth

Returns:

the start month
getStartMonth
()

Returns the first "regular" month shown by the view.

public final MonthSheetView.ViewUnit

Returns:

the view unit (e.g. "quarters", "year", "month")
getViewUnit
()

Returns the value of viewUnitProperty().

public final MonthSheetView.WeekDayLayoutStrategy

Returns:

the weekday layout strategy
getWeekDayLayout
()

Returns the value of weekDayLayoutProperty().

public final ObjectProperty<Callback<MonthSheetView.HeaderParameter, Node>>

Returns:

the cell factory
headerCellFactoryProperty
()

A property used to store a reference to the "header" cell factory for this view.

public final boolean

Returns:

true if the given month is part of the extended months
isExtendedMonth
(YearMonth
the month to check
month
)

A simple check to see if the given month is part of the extended months.

public final boolean

Returns:

true if the numbers should be shown
isShowWeekNumber
()

Returns the value of showWeekNumberProperty().

public final boolean

Returns:

true if the date is within the time range of the view
isVisibleDate
(LocalDate
the date to check for visibility
date
)

Determines if the given date is currently showing is part of the view.

public final void
public final void
setClickBehaviour(MonthSheetView.ClickBehaviour
the click behaviour
behaviour
)

Sets the value of clickBehaviourProperty().

public final void
setDateSelectionModel(DateSelectionModel
the date selection model
model
)

Sets the value of dateSelectionModelProperty().

public final void
setExtendedUnitsBackward(final int
the number of units shown at the beginning of the view
units
)

Sets the value of extendedUnitsBackwardProperty.

public final void
setExtendedUnitsForward(int
the number of units shown at the end of the view
units
)

Sets the value of extendedUnitsForward.

public final void
setExtendedViewUnit(MonthSheetView.ViewUnit
the extended view unit (e.g. "quarters", "year", "month")
unit
)

Sets the value of extendedViewUnitProperty().

public final void
setHeaderCellFactory(Callback<MonthSheetView.HeaderParameter, Node>
the "header" cell factory
factory
)

Sets the value of headerCellFactoryProperty().

public final void
setShowWeekNumber(boolean
true if the numbers should be shown
show
)

Sets the value of showWeekNumberProperty().

public final void
setViewUnit(MonthSheetView.ViewUnit
the view unit (e.g. "quarters", "year", "month")
unit
)

Sets the value of viewUnitProperty().

public final void
setWeekDayLayout(MonthSheetView.WeekDayLayoutStrategy
the weekday layout strategy
weekDayLayout
)

Sets the value of weekDayLayoutProperty().

public final BooleanProperty

Returns:

true if the numbers should be shown
showWeekNumberProperty
()

A property used to control whether the week numbers should be shown.

public final ObjectProperty<MonthSheetView.ViewUnit>

Returns:

the view unit (e.g. "quarters", "year", "month")
viewUnitProperty
()

A property used to store the unit shown by the view (e.g. "quarters", "year", "month").

public final ObjectProperty<MonthSheetView.WeekDayLayoutStrategy>

Returns:

the weekday layout strategy property
weekDayLayoutProperty
()

A property used to store the layout strategy used by this view.

Inherited from com.calendarfx.view.DateControl:
availabilityCalendarPropertyavailabilityFillPropertyavailabilityGridPropertybindcalendarSourceFactoryPropertycalendarsPropertyclearSelectioncontextMenuCallbackPropertycreateCalendarSourcecreateEntryAtcreateEntryAtcreateEntryAtcreateEntryClickCountPropertydateDetailsCallbackPropertydatePropertydefaultCalendarProviderPropertydeselectdraggedEntryPropertyeditAvailabilityPropertyeditEntryeditEntryenableHyperlinksPropertyenableTimeZoneSupportPropertyendTimePropertyentryContextMenuCallbackPropertyentryDetailsCallbackPropertyentryDetailsPopOverContentCallbackPropertyentryEditPolicyPropertyentryFactoryPropertyfindEntryViewgetAvailabilityCalendargetAvailabilityFillgetAvailabilityGridgetAvailableZoneIdsgetBoundDateControlsgetCalendarAtgetCalendarsgetCalendarSourceFactorygetCalendarSourcesgetCalendarVisibilityMapgetCalendarVisibilityPropertygetContextMenuCallbackgetCreateEntryClickCountgetDategetDateDetailsCallbackgetDefaultCalendarProvidergetDraggedEntrygetEndTimegetEntryContextMenuCallbackgetEntryDetailsCallbackgetEntryDetailsPopOverContentCallbackgetEntryEditPolicygetEntryFactorygetFirstDayOfWeekgetLayoutgetRequestedTimegetSelectionModegetSelectionsgetStartTimegetTimegetTodaygetUsagePolicygetVirtualGridgetWeekendDaysgetWeekFieldsgetZonedDateTimegetZoneIdgoBackgoForwardgoTodayisCalendarVisibleisEditAvailabilityisEnableHyperlinksisEnableTimeZoneSupportisShowDetailsUponEntryCreationisShowNoonMarkerisShowTodayisSuspendUpdateslayoutPropertyrefreshDatarequestedTimePropertyselectselectionModePropertysetAvailabilityCalendarsetAvailabilityFillsetAvailabilityGridsetCalendarSourceFactorysetCalendarVisibilitysetContextMenuCallbacksetCreateEntryClickCountsetDatesetDateDetailsCallbacksetDefaultCalendarProvidersetDraggedEntrysetEditAvailabilitysetEnableHyperlinkssetEnableTimeZoneSupportsetEndTimesetEntryContextMenuCallbacksetEntryDetailsCallbacksetEntryDetailsPopOverContentCallbacksetEntryEditPolicysetEntryFactorysetLayoutsetRequestedTimesetSelectionModesetShowDetailsUponEntryCreationsetShowNoonMarkersetShowTodaysetStartTimesetSuspendUpdatessetTimesetTodaysetUsagePolicysetVirtualGridsetWeekFieldssetZoneIdshowDateDetailsshowDetailsUponEntryCreationPropertyshowEntryshowNoonMarkerPropertyshowTodayPropertystartTimePropertysuspendUpdatesPropertytimePropertytodayPropertyunbindunbindAllusagePolicyPropertyvirtualGridPropertyvisibleLayersPropertyweekFieldsPropertyzoneIdProperty