Top Description Inners Fields Constructors Methods
com.calendarfx.view

public Class WeekDayHeaderView

extends DateControl
Class Inheritance
Imports
impl.com.calendarfx.view.WeekDayHeaderViewSkin, impl.com.calendarfx.view.util.Util, javafx.beans.property.BooleanProperty, .IntegerProperty, .ObjectProperty, .ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, .SimpleBooleanProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.ObservableList, javafx.scene.control.Label, .Skin, javafx.scene.input.MouseButton, javafx.scene.layout.Region, javafx.util.Callback, org.controlsfx.control.PropertySheet.Item, java.time.LocalDate, java.time.format.DateTimeFormatter, java.util.Objects, .Optional

A view for displaying the names of the week days in the DetailedWeekView control. A cell factory can be used to customize the appearance of the names. Week Weekdays

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
WeekDayHeaderView.WeekDayHeaderCell

A cell used by the WeekDayHeaderView to display the names of the weekdays (Mo.

Field Summary

Modifier and TypeField and Description
private final BooleanProperty
private final ObjectProperty<Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>>
private static final String
private final ReadOnlyObjectWrapper<LocalDate>
private final IntegerProperty
private final ObjectProperty<Callback<WeekDayHeaderView, Region>>
private final ReadOnlyObjectWrapper<LocalDate>
private static final String
Inherited from com.calendarfx.view.DateControl:
usagePolicy

Constructor Summary

AccessConstructor and Description
public
WeekDayHeaderView(int
the number of days to show
numberOfDays
)

Constructs a new week day header view with the given number of days.

public
WeekDayHeaderView()

Constructs a new week day header 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<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>>

Returns:

the cell factory
cellFactoryProperty
()

A cell factory used for creating instances of WeekDayHeaderCell that will be used to display the weekend day names.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final ReadOnlyObjectProperty<LocalDate>

Returns:

the last date shown by the view
endDateProperty
()

The last date shown by the view.

public final Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>

Returns:

the cell factory
getCellFactory
()

Returns the value of cellFactoryProperty().

public final int

Returns:

the number of days shown by the view
getNumberOfDays
()

Returns the value of numberOfDaysProperty().

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 Callback<WeekDayHeaderView, Region>
public final LocalDate

Returns:

the start date
getStartDate
()

Returns the value of startDateProperty().

public final boolean

Returns:

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

Returns the value of adjustToFirstDayOfWeekProperty().

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<WeekDayHeaderView, Region>>

Returns:

the separator factory
separatorFactoryProperty
()

A factory used for creating (optional) vertical separators between the week day headers.

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
public final void
setNumberOfDays(int
the new number of days shown by the view
number
)

Sets the value of numberOfDaysProperty().

public final void
public final ReadOnlyObjectProperty<LocalDate>

Returns:

the first date shown by the view
startDateProperty
()

The first date shown by the view.

Inherited from com.calendarfx.view.DateControl:
availabilityCalendarPropertyavailabilityFillPropertyavailabilityGridPropertybindcalendarSourceFactoryPropertycalendarsPropertyclearSelectioncontextMenuCallbackPropertycreateCalendarSourcecreateEntryAtcreateEntryAtcreateEntryAtcreateEntryClickCountPropertydateDetailsCallbackPropertydatePropertydefaultCalendarProviderPropertydeselectdraggedEntryPropertyeditAvailabilityPropertyeditEntryeditEntryenableHyperlinksPropertyenableTimeZoneSupportPropertyendTimePropertyentryContextMenuCallbackPropertyentryDetailsCallbackPropertyentryDetailsPopOverContentCallbackPropertyentryEditPolicyPropertyentryFactoryPropertyfindEntryViewgetAvailabilityCalendargetAvailabilityFillgetAvailabilityGridgetAvailableZoneIdsgetBoundDateControlsgetCalendarAtgetCalendarsgetCalendarSourceFactorygetCalendarSourcesgetCalendarVisibilityMapgetCalendarVisibilityPropertygetContextMenuCallbackgetCreateEntryClickCountgetDategetDateDetailsCallbackgetDefaultCalendarProvidergetDraggedEntrygetEndTimegetEntryContextMenuCallbackgetEntryDetailsCallbackgetEntryDetailsPopOverContentCallbackgetEntryEditPolicygetEntryFactorygetFirstDayOfWeekgetLayoutgetRequestedTimegetSelectionModegetSelectionsgetStartTimegetTimegetTodaygetUsagePolicygetVirtualGridgetWeekendDaysgetWeekFieldsgetZonedDateTimegetZoneIdgoBackgoForwardgoTodayisCalendarVisibleisEditAvailabilityisEnableHyperlinksisEnableTimeZoneSupportisShowDetailsUponEntryCreationisShowNoonMarkerisShowTodayisSuspendUpdateslayoutPropertyrefreshDatarequestedTimePropertyselectselectionModePropertysetAvailabilityCalendarsetAvailabilityFillsetAvailabilityGridsetCalendarSourceFactorysetCalendarVisibilitysetContextMenuCallbacksetCreateEntryClickCountsetDatesetDateDetailsCallbacksetDefaultCalendarProvidersetDraggedEntrysetEditAvailabilitysetEnableHyperlinkssetEnableTimeZoneSupportsetEndTimesetEntryContextMenuCallbacksetEntryDetailsCallbacksetEntryDetailsPopOverContentCallbacksetEntryEditPolicysetEntryFactorysetLayoutsetRequestedTimesetSelectionModesetShowDetailsUponEntryCreationsetShowNoonMarkersetShowTodaysetStartTimesetSuspendUpdatessetTimesetTodaysetUsagePolicysetVirtualGridsetWeekFieldssetZoneIdshowDateDetailsshowDetailsUponEntryCreationPropertyshowEntryshowNoonMarkerPropertyshowTodayPropertystartTimePropertysuspendUpdatesPropertytimePropertytodayPropertyunbindunbindAllusagePolicyPropertyvirtualGridPropertyvisibleLayersPropertyweekFieldsPropertyzoneIdProperty

Field Detail

adjustToFirstDayOfWeekback to summary
private final BooleanProperty adjustToFirstDayOfWeek
cellFactoryback to summary
private final ObjectProperty<Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>> cellFactory
DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS
endDateback to summary
private final ReadOnlyObjectWrapper<LocalDate> endDate
numberOfDaysback to summary
private final IntegerProperty numberOfDays
separatorFactoryback to summary
private final ObjectProperty<Callback<WeekDayHeaderView, Region>> separatorFactory
startDateback to summary
private final ReadOnlyObjectWrapper<LocalDate> startDate
WEEK_DAY_HEADER_VIEW_CATEGORYback to summary
private static final String WEEK_DAY_HEADER_VIEW_CATEGORY

Constructor Detail

WeekDayHeaderViewback to summary
public WeekDayHeaderView(int numberOfDays)

Constructs a new week day header view with the given number of days.

Parameters
numberOfDays:int

the number of days to show

WeekDayHeaderViewback to summary
public WeekDayHeaderView()

Constructs a new week day header 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

cellFactoryPropertyback to summary
public final ObjectProperty<Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>> cellFactoryProperty()

A cell factory used for creating instances of WeekDayHeaderCell that will be used to display the weekend day names.

Returns:ObjectProperty<Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>>

the cell factory

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
endDatePropertyback to summary
public final ReadOnlyObjectProperty<LocalDate> endDateProperty()

The last date shown by the view.

Returns:ReadOnlyObjectProperty<LocalDate>

the last date shown by the view

getCellFactoryback to summary
public final Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell> getCellFactory()

Returns the value of cellFactoryProperty().

Returns:Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>

the cell factory

getNumberOfDaysback to summary
public final int getNumberOfDays()

Returns the value of numberOfDaysProperty().

Returns:int

the number of days shown by the view

getPropertySheetItemsback to summary
public ObservableList<PropertySheet.Item> getPropertySheetItems()

Overrides com.calendarfx.view.DateControl.getPropertySheetItems.

Doc from com.calendarfx.view.CalendarFXControl.getPropertySheetItems.

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

Returns:ObservableList<PropertySheet.Item>

the property sheet items

Annotations
@Override
getSeparatorFactoryback to summary
public final Callback<WeekDayHeaderView, Region> getSeparatorFactory()
getStartDateback to summary
public final LocalDate getStartDate()

Returns the value of startDateProperty().

Returns:LocalDate

the start date

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

numberOfDaysPropertyback to summary
public final IntegerProperty numberOfDaysProperty()

Stores the number of days that will be shown by this view. This value needs to be equivalent to the number of days shown by the DetailedWeekView.

Returns:IntegerProperty

the number of days shown by the view

separatorFactoryPropertyback to summary
public final ObjectProperty<Callback<WeekDayHeaderView, Region>> separatorFactoryProperty()

A factory used for creating (optional) vertical separators between the week day headers.

Returns:ObjectProperty<Callback<WeekDayHeaderView, Region>>

the separator factory

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

setCellFactoryback to summary
public final void setCellFactory(Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell> factory)

Sets the value of cellFactoryProperty().

Parameters
factory:Callback<WeekDayHeaderView, WeekDayHeaderView.WeekDayHeaderCell>

the cell factory

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

setSeparatorFactoryback to summary
public final void setSeparatorFactory(Callback<WeekDayHeaderView, Region> separatorFactory)
startDatePropertyback to summary
public final ReadOnlyObjectProperty<LocalDate> startDateProperty()

The first date shown by the view.

Returns:ReadOnlyObjectProperty<LocalDate>

the first date shown by the view

com.calendarfx.view back to summary

public Class WeekDayHeaderView.WeekDayHeaderCell

extends Label
Class Inheritance

A cell used by the WeekDayHeaderView to display the names of the weekdays (Mo. 5th, Tue. 6th, ...).
See Also
WeekDayHeaderView#cellFactoryProperty()

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<LocalDate>
private final ObjectProperty<DateTimeFormatter>

Constructor Summary

AccessConstructor and Description
public
WeekDayHeaderCell(WeekDayHeaderView
the weekday header view
view
)

Constructs a new date cell.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<LocalDate>

Returns:

the date
dateProperty
()

The date shown by this cell.

public final ObjectProperty<DateTimeFormatter>

Returns:

the date formatter
formatterProperty
()

The formatter to be used for the date.

public final LocalDate

Returns:

the date shown by the cell
getDate
()

Returns the value of dateProperty().

public final DateTimeFormatter
public final void
setDate(LocalDate
the new date to show
date
)

Sets the value of dateProperty().

public final void
Inherited from javafx.scene.control.Label:
createDefaultSkingetInitialFocusTraversablegetLabelForlabelForPropertysetLabelFor

Field Detail

dateback to summary
private final ObjectProperty<LocalDate> date
formatterback to summary
private final ObjectProperty<DateTimeFormatter> formatter

Constructor Detail

WeekDayHeaderCellback to summary
public WeekDayHeaderCell(WeekDayHeaderView view)

Constructs a new date cell.

Parameters
view:WeekDayHeaderView

the weekday header view

Method Detail

datePropertyback to summary
public final ObjectProperty<LocalDate> dateProperty()

The date shown by this cell.

Returns:ObjectProperty<LocalDate>

the date

formatterPropertyback to summary
public final ObjectProperty<DateTimeFormatter> formatterProperty()

The formatter to be used for the date.

Returns:ObjectProperty<DateTimeFormatter>

the date formatter

getDateback to summary
public final LocalDate getDate()

Returns the value of dateProperty().

Returns:LocalDate

the date shown by the cell

getFormatterback to summary
public final DateTimeFormatter getFormatter()
setDateback to summary
public final void setDate(LocalDate date)

Sets the value of dateProperty().

Parameters
date:LocalDate

the new date to show

setFormatterback to summary
public final void setFormatter(DateTimeFormatter formatter)