Interface ContextMenu.ContextMenuListener

  • Enclosing class:
    ContextMenu

    public static interface ContextMenu.ContextMenuListener
    Listener used to get events from ContextMenu.
    Since:
    1.0.2
    • Method Detail

      • activeItemChanged

        void activeItemChanged​(MenuItem newActiveItem,
                               boolean changedByKeyboard)
        Called when active menu item (the highlighted one) has changed. This can't be used to listen when MenuItem was pressed, add ChangeListener to MenuItem directly to achieve this.
        Parameters:
        newActiveItem - new item that is now active. May be null.
        changedByKeyboard - whether the change occurred by keyboard (arrows keys) or by mouse.