Class FullCalendarContextMenu
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,FullCalendarMenuItem,FullCalendarSubMenu>
  
io.jmix.fullcalendarflowui.component.contextmenu.FullCalendarContextMenu
- All Implemented Interfaces:
- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasComponents,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasEnabled,- com.vaadin.flow.component.HasStyle,- HasFullCalendarMenuItems,- Serializable
public class FullCalendarContextMenu
extends com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,FullCalendarMenuItem,FullCalendarSubMenu>
implements HasFullCalendarMenuItems  
Component for context menu in 
FullCalendar.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class com.vaadin.flow.component.contextmenu.ContextMenuBasecom.vaadin.flow.component.contextmenu.ContextMenuBase.OpenedChangeEvent<TComponent extends com.vaadin.flow.component.contextmenu.ContextMenuBase<TComponent,?, ?>> Nested classes/interfaces inherited from interface io.jmix.fullcalendarflowui.component.contextmenu.HasFullCalendarMenuItemsHasFullCalendarMenuItems.FullCalendarClickContextMenuItemEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected FullCalendarCellContextprotected Function<FullCalendarCellContext,Boolean> protected FullCalendarDeserializerFields inherited from class com.vaadin.flow.component.contextmenu.ContextMenuBaseEVENT_DETAIL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddContextMenuOpenedListener(com.vaadin.flow.component.ComponentEventListener<FullCalendarContextMenuOpenedEvent> listener) Adds a listener to handle changing opened/closed state.addItem(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<HasFullCalendarMenuItems.FullCalendarClickContextMenuItemEvent> clickListener) Adds new menu item.addItem(String text, com.vaadin.flow.component.ComponentEventListener<HasFullCalendarMenuItems.FullCalendarClickContextMenuItemEvent> clickListener) Adds new menu item.static FullCalendarContextMenucreate(FullCalendar target) Creates new instance of context menu with providedFullCalendartarget.protected com.vaadin.flow.component.contextmenu.MenuManager<FullCalendarContextMenu,FullCalendarMenuItem, FullCalendarSubMenu> createMenuManager(com.vaadin.flow.function.SerializableRunnable contentReset) protected booleanonBeforeOpenMenu(elemental.json.JsonObject eventDetail) voidsetContentMenuHandler(Function<FullCalendarCellContext, Boolean> contentMenuHandler) Sets a handler to configure content of context menu.voidsetTarget(com.vaadin.flow.component.Component target) Methods inherited from class com.vaadin.flow.component.contextmenu.ContextMenuBaseadd, addComponentAtIndex, addItem, addItem, addOpenedChangeListener, close, getChildren, getItems, getMenuManager, isOpened, isOpenOnClick, remove, removeAll, setOpenOnClickMethods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponentsadd, add, addComponentAsFirst, removeMethods inherited from interface com.vaadin.flow.component.HasElementgetElementMethods inherited from interface com.vaadin.flow.component.HasEnabledisEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
- 
Field Details- 
cellContext
- 
contentMenuHandler
- 
deserializer
 
- 
- 
Constructor Details- 
FullCalendarContextMenupublic FullCalendarContextMenu()
- 
FullCalendarContextMenu
 
- 
- 
Method Details- 
createCreates new instance of context menu with providedFullCalendartarget.- Parameters:
- target- calendar to bound with a context menu
- Returns:
- new instance of context menu
 
- 
addContextMenuOpenedListenerpublic com.vaadin.flow.shared.Registration addContextMenuOpenedListener(com.vaadin.flow.component.ComponentEventListener<FullCalendarContextMenuOpenedEvent> listener) Adds a listener to handle changing opened/closed state.- Parameters:
- listener- a listener to add
- Returns:
- a registration object for removing an event listener from context menu
 
- 
getContentMenuHandler
- 
setContentMenuHandlerpublic void setContentMenuHandler(@Nullable Function<FullCalendarCellContext, Boolean> contentMenuHandler) Sets a handler to configure content of context menu. For instance:contextMenu.setContentMenuHandler(context -> { contextMenu.removeAll(); if (context.getCalendarEvent() != null) { contextMenu.addItem("Event menu item", event -> {}); // do something return true; } else if (context.getDayCell() != null) { if (context.getDayCell().isDisabled()) { return false; } else { contextMenu.addItem("Simple day cell menu item", event -> {}); // do something return true; } } else { return false; } });- Parameters:
- contentMenuHandler- handler to add
 
- 
addItempublic FullCalendarMenuItem addItem(String text, com.vaadin.flow.component.ComponentEventListener<HasFullCalendarMenuItems.FullCalendarClickContextMenuItemEvent> clickListener) Description copied from interface:HasFullCalendarMenuItemsAdds new menu item.- Specified by:
- addItemin interface- HasFullCalendarMenuItems
- Parameters:
- text- item's text
- clickListener- click listener
- Returns:
- added menu item
 
- 
addItempublic FullCalendarMenuItem addItem(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<HasFullCalendarMenuItems.FullCalendarClickContextMenuItemEvent> clickListener) Description copied from interface:HasFullCalendarMenuItemsAdds new menu item.- Specified by:
- addItemin interface- HasFullCalendarMenuItems
- Parameters:
- component- component that should be used as a content of menu item
- clickListener- click listener
- Returns:
- added menu item
 
- 
setTargetpublic void setTarget(@Nullable com.vaadin.flow.component.Component target) - Overrides:
- setTargetin class- com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,- FullCalendarMenuItem, - FullCalendarSubMenu> 
 
- 
getTarget- Overrides:
- getTargetin class- com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,- FullCalendarMenuItem, - FullCalendarSubMenu> 
 
- 
onBeforeOpenMenuprotected boolean onBeforeOpenMenu(elemental.json.JsonObject eventDetail) - Overrides:
- onBeforeOpenMenuin class- com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,- FullCalendarMenuItem, - FullCalendarSubMenu> 
 
- 
createMenuManagerprotected com.vaadin.flow.component.contextmenu.MenuManager<FullCalendarContextMenu,FullCalendarMenuItem, createMenuManagerFullCalendarSubMenu> (com.vaadin.flow.function.SerializableRunnable contentReset) - Specified by:
- createMenuManagerin class- com.vaadin.flow.component.contextmenu.ContextMenuBase<FullCalendarContextMenu,- FullCalendarMenuItem, - FullCalendarSubMenu> 
 
 
-