Top Description Constructors Methods
com.calendarfx.view

public Class ContextMenuProvider

extends Object
implements Callback<DateControl.ContextMenuParameter, ContextMenu>
Class Inheritance
All Implemented Interfaces
javafx.util.Callback
Imports
com.calendarfx.model.Calendar, com.calendarfx.view.DateControl.ContextMenuParameter, .DayViewBase.EarlyLateHoursStrategy, .DayViewBase.HoursLayoutStrategy, javafx.scene.control.ContextMenu, .CustomMenuItem, .Menu, .MenuItem, .RadioMenuItem, .SeparatorMenuItem, .Slider, .ToggleGroup, javafx.util.Callback, java.text.MessageFormat, java.time.LocalTime, java.time.temporal.ChronoUnit

An implementation of the context menu callback required by DateControl. Applications can subclass to create their own context menus for the different views.
See Also
DateControl#setContextMenuCallback(Callback)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ContextMenu
call(DateControl.ContextMenuParameter
The single argument upon which the returned value should be determined.
param
)

Implements javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

protected ContextMenu

Returns:

a context menu for an all day view
getAllDayViewMenu
(DateControl.ContextMenuParameter
parameter object with the most relevant information for creating a new context menu
param
)

Returns the context menu specific for an AllDayView.

private ContextMenu
protected ContextMenu

Returns:

a context menu for a day view
getDayViewMenu
(DateControl.ContextMenuParameter
parameter object with the most relevant information for creating a new context menu
param
)

Returns the context menu specific for a single DayView.

protected ContextMenu

Returns:

a context menu for a week day view
getWeekDayViewMenu
(DateControl.ContextMenuParameter
parameter object with the most relevant information for creating a new context menu
param
)

Returns the context menu specific for a single WeekDayView.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ContextMenuProviderback to summary
public ContextMenuProvider()

Method Detail

callback to summary
public ContextMenu call(DateControl.ContextMenuParameter param)

Implements javafx.util.Callback.call.

Doc from javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

Parameters
param:DateControl.ContextMenuParameter

The single argument upon which the returned value should be determined.

Returns:ContextMenu

An object of type R that may be determined based on the provided parameter value.

Annotations
@Override
getAllDayViewMenuback to summary
protected ContextMenu getAllDayViewMenu(DateControl.ContextMenuParameter param)

Returns the context menu specific for an AllDayView.

Parameters
param:DateControl.ContextMenuParameter

parameter object with the most relevant information for creating a new context menu

Returns:ContextMenu

a context menu for an all day view

getDayViewBaseMenuback to summary
private ContextMenu getDayViewBaseMenu(DateControl.ContextMenuParameter param)
getDayViewMenuback to summary
protected ContextMenu getDayViewMenu(DateControl.ContextMenuParameter param)

Returns the context menu specific for a single DayView.

Parameters
param:DateControl.ContextMenuParameter

parameter object with the most relevant information for creating a new context menu

Returns:ContextMenu

a context menu for a day view

getWeekDayViewMenuback to summary
protected ContextMenu getWeekDayViewMenu(DateControl.ContextMenuParameter param)

Returns the context menu specific for a single WeekDayView. Week day views are used inside a WeekView.

Parameters
param:DateControl.ContextMenuParameter

parameter object with the most relevant information for creating a new context menu

Returns:ContextMenu

a context menu for a week day view