Interface PopupActionProvider

  • All Known Implementing Classes:
    ListingMergePanelProvider

    public interface PopupActionProvider
    Provides notification when the popup action menu is displayed. This interface allows temporary/transient actions (those not registered with the tool via DockingTool.addAction(DockingActionIf)) to be used in the popup context menu.

    Most clients will register actions directly with the tool. However, clients that have numerous actions that vary greatly with the context can use this method to only create those actions on demand as the popup is about to be shown, and only if their context is active. This mechanism can reduce the tool's action management overhead. Once you have created an implementation of this class, you must register it with DockingTool.addPopupActionProvider(PopupActionProvider).

    • Method Detail

      • getPopupActions

        java.util.List<DockingActionIf> getPopupActions​(DockingTool tool,
                                                        ActionContext context)
        Provides notification that the popup menu is about to be displayed and allows a set of temporary actions to be included in the popup menu. Actions returned will be included in the menu if they have a valid popup menu path and respond true to the DockingActionIf.isValidContext(ActionContext) call.
        Parameters:
        tool - the tool requesting the actions
        context - the ActionContext
        Returns:
        list of temporary popup actions; return null if there are no popup actions