Interface LocationModeActionProvider

All Known Implementing Classes:
DefaultLocationModeActionProvider, KeyedLocationModeActionProvider, MappingLocationModeActionProvider

public interface LocationModeActionProvider
Is associated with one LocationMode, provides a (set of) actions to set the mode of a Dockable to the owner of this provider.
The actions provided by this interface are only shown if the mode of a Dockable is not the same as the owner mode, and if the owner mode is available to the element.
Author:
Benjamin Sigg
  • Method Details

    • getActions

      DockActionSource getActions(Dockable dockable, Mode<Location> currentMode, DockActionSource currentSource)
      Called if the element dockable, which is currently in mode mode, should have some additional DockActions related to the owner of this LocationModeActionProvider.
      Parameters:
      dockable - the element for which an action source is required
      currentMode - the current mode of dockable
      currentSource - the source that was returned by this method in the previous call. May be null either if this method returned null or was not yet called for dockable
      Returns:
      the source or null if the default value should be used
    • destroy

      void destroy(Dockable dockable, DockActionSource source)
      Called if dockable is no longer in use and all references to dockable are to be removed.
      Parameters:
      dockable - the element which is no longer handled by the owning mode
      source - the last result of getActions, may be null