Top Description Fields Constructors Methods
com.calendarfx.view

public Class CalendarHeaderView

extends CalendarFXControl
Class Inheritance
Imports
com.calendarfx.model.Calendar, com.calendarfx.view.DateControl.Layout, impl.com.calendarfx.view.CalendarHeaderViewSkin, javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .IntegerProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ObservableList, .ObservableMap, javafx.scene.Node, javafx.scene.control.Label, .Skin, javafx.util.Callback

A view used for showing the short names of calendars on top of those DayView instances that are using the Layout#SWIMLANE layout strategy. Calendar Header View
See Also
DetailedWeekView#getCalendarHeaderView()

Field Summary

Modifier and TypeField and Description
private final ObservableList<Calendar<T>>
private final ObservableMap<Calendar<T>, BooleanProperty>
private final ObjectProperty<Callback<Calendar<T>, Node>>
private static final String
private final IntegerProperty

Constructor Summary

AccessConstructor and Description
public
CalendarHeaderView()

Constructs a new calendar header view.

Method Summary

Modifier and TypeMethod and Description
public final void
bind(DateControl dateControl)

public final ObjectProperty<Callback<Calendar<T>, Node>>

Returns:

the cell factory property
cellFactoryProperty
()

Returns the property used for storing a reference to a cell factory that will be used to create the nodes that will serve as column headers.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final ObservableList<Calendar<T>>

Returns:

the calendars
getCalendars
()

The list of calendars for which the view will display a header.

public final ObservableMap<Calendar<T>, BooleanProperty>
public final BooleanProperty
public final Callback<Calendar<T>, Node>

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 final boolean
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 void
setCalendarVisibility(Calendar<T> calendar, boolean visible)

public final void
setCellFactory(Callback<Calendar<T>, Node>
the factory
factory
)

Sets the value of cellFactoryProperty().

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

Sets the value of numberOfDaysProperty().

public final void
unbind(DateControl dateControl)

Inherited from com.calendarfx.view.CalendarFXControl:
getPropertySheetItemsgetUserAgentStylesheet

Field Detail

calendarsback to summary
private final ObservableList<Calendar<T>> calendars
calendarVisibilityMapback to summary
private final ObservableMap<Calendar<T>, BooleanProperty> calendarVisibilityMap
cellFactoryback to summary
private final ObjectProperty<Callback<Calendar<T>, Node>> cellFactory
DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS
numberOfDaysback to summary
private final IntegerProperty numberOfDays

Constructor Detail

CalendarHeaderViewback to summary
public CalendarHeaderView()

Constructs a new calendar header view.

Method Detail

bindback to summary
public final void bind(DateControl dateControl)
cellFactoryPropertyback to summary
public final ObjectProperty<Callback<Calendar<T>, Node>> cellFactoryProperty()

Returns the property used for storing a reference to a cell factory that will be used to create the nodes that will serve as column headers.

Returns:ObjectProperty<Callback<Calendar<T>, Node>>

the cell factory property

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
getCalendarsback to summary
public final ObservableList<Calendar<T>> getCalendars()

The list of calendars for which the view will display a header.

Returns:ObservableList<Calendar<T>>

the calendars

getCalendarVisibilityMapback to summary
public final ObservableMap<Calendar<T>, BooleanProperty> getCalendarVisibilityMap()
getCalendarVisibilityPropertyback to summary
public final BooleanProperty getCalendarVisibilityProperty(Calendar<T> calendar)
getCellFactoryback to summary
public final Callback<Calendar<T>, Node> getCellFactory()

Returns the value of cellFactoryProperty().

Returns:Callback<Calendar<T>, Node>

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

isCalendarVisibleback to summary
public final boolean isCalendarVisible(Calendar<T> calendar)
numberOfDaysPropertyback to summary
public final IntegerProperty numberOfDaysProperty()

Stores the number of days that will be shown by this view. This value will be 1 if the view is used in combination with the DayView and 7 if used together with the DetailedWeekView.

Returns:IntegerProperty

the number of days shown by the view

See Also
DetailedWeekView#numberOfDaysProperty()
setCalendarVisibilityback to summary
public final void setCalendarVisibility(Calendar<T> calendar, boolean visible)
setCellFactoryback to summary
public final void setCellFactory(Callback<Calendar<T>, Node> factory)

Sets the value of cellFactoryProperty().

Parameters
factory:Callback<Calendar<T>, Node>

the 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

unbindback to summary
public final void unbind(DateControl dateControl)