Top Description Inners Fields Constructors Methods
com.calendarfx.view.page

public Class YearPage

extends PageBase
Class Inheritance
Imports
com.calendarfx.view.Messages, .MonthSheetView, .MonthSheetView.ClickBehaviour, .YearView, com.calendarfx.view.print.ViewType, impl.com.calendarfx.view.page.YearPageSkin, javafx.beans.binding.Bindings, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.ObservableList, javafx.scene.Node, javafx.scene.control.Skin, .ToggleButton, .Tooltip, org.controlsfx.control.PropertySheet, org.kordamp.ikonli.fontawesome.FontAwesome, org.kordamp.ikonli.javafx.FontIcon, java.time.format.DateTimeFormatter, java.util.Optional

A composite view focused on displaying calendar information for a single year. The view consists of the page "chrome" inherited from the superclass and a view of type YearView. Alternatively the page can also display months in columns via the MonthSheetView control. The application can switch between these two views by calling setDisplayMode(DisplayMode).

YearView

Year Page

MonthSheetView

Year Page 2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
YearPage.DisplayMode

An enum used for setting the display mode of the YearPage.

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<YearPage.DisplayMode>
private final ToggleButton
private final MonthSheetView
private final String
private final YearView

Constructor Summary

AccessConstructor and Description
public
YearPage()

Constructs a new year page.

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<YearPage.DisplayMode>

Returns:

the display mode
displayModeProperty
()

A property used to control whether the page should display the year in a grid format (with each cell containing a single month) or in a column format (each column representing one month).

public final YearPage.DisplayMode

Returns:

the current display mode
getDisplayMode
()

Returns the value of displayModeProperty().

public final MonthSheetView

Returns:

the month sheet view
getMonthSheetView
()

Returns the MonthSheetView used by the page to display months in columns.

public final ViewType
getPrintViewType()

Implements abstract com.calendarfx.view.page.PageBase.getPrintViewType.

Returns the type of view used when printing this page.

public ObservableList<PropertySheet.Item>
getPropertySheetItems()

Overrides com.calendarfx.view.page.PageBase.getPropertySheetItems.

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

public Node
getToolBarControls()

Overrides com.calendarfx.view.page.PageBase.getToolBarControls.

Returns one or more controls that can be added to the toolbar by the surrounding container, e.g. the CalendarView.

public final YearView

Returns:

the year view
getYearView
()

Returns the YearView used by the page to display months in a 4x3 grid layout.

public final void
goBack()

Overrides com.calendarfx.view.DateControl.goBack.

Makes the control go forward in time by removing one or more days from the current date.

public final void
goForward()

Overrides com.calendarfx.view.DateControl.goForward.

Makes the control go forward in time by adding one or more days to the current date.

public final void
setDisplayMode(YearPage.DisplayMode
the display mode
mode
)

Sets the value of displayModeProperty().

private void
Inherited from com.calendarfx.view.page.PageBase:
dateTimeFormatterPropertygetDateTimeFormatterisShowDateisShowNavigationsetDateTimeFormattersetShowDatesetShowNavigationshowDatePropertyshowNavigationProperty

Field Detail

displayModeback to summary
private final ObjectProperty<YearPage.DisplayMode> displayMode
displayModeButtonback to summary
private final ToggleButton displayModeButton
monthSheetViewback to summary
private final MonthSheetView monthSheetView
YEAR_PAGE_CATEGORYback to summary
private final String YEAR_PAGE_CATEGORY
yearViewback to summary
private final YearView yearView

Constructor Detail

YearPageback to summary
public YearPage()

Constructs a new year page.

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
displayModePropertyback to summary
public final ObjectProperty<YearPage.DisplayMode> displayModeProperty()

A property used to control whether the page should display the year in a grid format (with each cell containing a single month) or in a column format (each column representing one month).

Returns:ObjectProperty<YearPage.DisplayMode>

the display mode

getDisplayModeback to summary
public final YearPage.DisplayMode getDisplayMode()

Returns the value of displayModeProperty().

Returns:YearPage.DisplayMode

the current display mode

getMonthSheetViewback to summary
public final MonthSheetView getMonthSheetView()

Returns the MonthSheetView used by the page to display months in columns.

Returns:MonthSheetView

the month sheet view

getPrintViewTypeback to summary
public final ViewType getPrintViewType()

Implements abstract com.calendarfx.view.page.PageBase.getPrintViewType.

Doc from com.calendarfx.view.page.PageBase.getPrintViewType.

Returns the type of view used when printing this page.

Returns:ViewType

The print view type.

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

Overrides com.calendarfx.view.page.PageBase.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
getToolBarControlsback to summary
public Node getToolBarControls()

Overrides com.calendarfx.view.page.PageBase.getToolBarControls.

Doc from com.calendarfx.view.page.PageBase.getToolBarControls.

Returns one or more controls that can be added to the toolbar by the surrounding container, e.g. the CalendarView.

Returns:Node

extra toolbar controls

Annotations
@Override
getYearViewback to summary
public final YearView getYearView()

Returns the YearView used by the page to display months in a 4x3 grid layout.

Returns:YearView

the year view

goBackback to summary
public final void goBack()

Overrides com.calendarfx.view.DateControl.goBack.

Doc from com.calendarfx.view.DateControl.goBack.

Makes the control go forward in time by removing one or more days from the current date. Subclasses override this method to adjust it to their needs, e.g. the DetailedWeekView removes the number of days found in DetailedWeekView#getNumberOfDays().

Annotations
@Override
goForwardback to summary
public final void goForward()

Overrides com.calendarfx.view.DateControl.goForward.

Doc from com.calendarfx.view.DateControl.goForward.

Makes the control go forward in time by adding one or more days to the current date. Subclasses override this method to adjust it to their needs, e.g. the DetailedWeekView adds the number of days found in DetailedWeekView#getNumberOfDays().

Annotations
@Override
setDisplayModeback to summary
public final void setDisplayMode(YearPage.DisplayMode mode)

Sets the value of displayModeProperty().

Parameters
mode:YearPage.DisplayMode

the display mode

updateDisplayModeIconback to summary
private void updateDisplayModeIcon()
com.calendarfx.view.page back to summary

public final Enum YearPage.DisplayMode

extends Enum<YearPage.DisplayMode>
Class Inheritance

An enum used for setting the display mode of the YearPage. The page can display the 12 months of a year in a grid or a column layout.
See Also
displayModeProperty()

Field Summary

Modifier and TypeField and Description
public static final YearPage.DisplayMode
public static final YearPage.DisplayMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

COLUMNSback to summary
public static final YearPage.DisplayMode COLUMNS
GRIDback to summary
public static final YearPage.DisplayMode GRID

Constructor Detail

DisplayModeback to summary
private DisplayMode()

Method Detail

valueOfback to summary
public static YearPage.DisplayMode valueOf(String name)
valuesback to summary
public static YearPage.DisplayMode[] values()