Class ContextMenu.Registration

Object
Registration
All Implemented Interfaces:
HandlerRegistration, HandlerRegistration
Enclosing class:
ContextMenu

protected class ContextMenu.Registration extends Object implements HandlerRegistration
Manage registrations of listener widgets, their context menu providers and the corresponding event handlers. Used for a lookup table to match listeners and providers with the listeners serving as the lookup key.
  • Field Details

    • contextMenuHandler

      private HandlerRegistration contextMenuHandler
      The reference to the context menu event handler.
    • touchStartHandler

      private HandlerRegistration touchStartHandler
      The reference to the touch start event handler.
    • touchEndHandler

      private HandlerRegistration touchEndHandler
      The reference to the touch end event handler.
    • touchMoveHandler

      private HandlerRegistration touchMoveHandler
      The reference to the touch move event handler.
    • touchCancelHandler

      private HandlerRegistration touchCancelHandler
      The reference to the touch cancel event handler.
    • provider

      private ContextMenu.Provider provider
      Provider of context menu entries for this listener widget.
    • listener

      private ContextMenu.Listener listener
      Listener widget for context menu requests.
  • Constructor Details

    • Registration

      public Registration(ContextMenu.Listener listener, ContextMenu.Provider provider)
      Register all event handlers relevant for handling context menus with listener widget and associate with the context menu provider.
      Parameters:
      listener - widget sporting a context menu
      provider - provides context menu entries for this listener widget
  • Method Details

    • getProvider

      public ContextMenu.Provider getProvider()
      Get the provider of entries of context menu for this listener widget.
      Returns:
      the provider
    • getListener

      public ContextMenu.Listener getListener()
      Get the listener widget for context menu events.
      Returns:
      the listening widget
    • removeHandler

      public void removeHandler()
      Specified by:
      removeHandler in interface HandlerRegistration