Package bibliothek.gui.dock.common.mode
Class KeyedLocationModeActionProvider
java.lang.Object
bibliothek.gui.dock.facile.mode.DefaultLocationModeActionProvider
bibliothek.gui.dock.common.mode.KeyedLocationModeActionProvider
- All Implemented Interfaces:
LocationModeActionProvider
- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new provider.KeyedLocationModeActionProvider(String key, DockAction defaultAction) Creates a new provider.KeyedLocationModeActionProvider(String key, CAction defaultAction) Creates a new provider. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(Dockable dockable, DockActionSource source) Called ifdockableis no longer in use and all references todockableare to be removed.getActions(Dockable dockable, Mode<Location> currentMode, DockActionSource currentSource) Called if the elementdockable, which is currently in modemode, should have some additionalDockActions related to the owner of thisLocationModeActionProvider.voidsetSelectModeAction(DockAction selectModeAction) Sets the action which must be triggered in order to activate this mode.Methods inherited from class bibliothek.gui.dock.facile.mode.DefaultLocationModeActionProvider
getSelectModeAction, setSelectModeAction
-
Constructor Details
-
KeyedLocationModeActionProvider
Creates a new provider.- Parameters:
key- the key forCDockable.getAction(String), must not benull
-
KeyedLocationModeActionProvider
Creates a new provider.- Parameters:
key- the key forCDockable.getAction(String), must not benulldefaultAction- the default action, may benull
-
KeyedLocationModeActionProvider
Creates a new provider.- Parameters:
key- the key forCDockable.getAction(String), must not benulldefaultAction- the default action, may benull
-
-
Method Details
-
setSelectModeAction
Description copied from class:DefaultLocationModeActionProviderSets the action which must be triggered in order to activate this mode. This action will be returned byDefaultLocationModeActionProvider.getActions(Dockable, Mode, DockActionSource)if the mode is notthis. Changes to this property are applied to all visibleDockable.- Overrides:
setSelectModeActionin classDefaultLocationModeActionProvider- Parameters:
selectModeAction- the action ornull
-
getActions
public DockActionSource getActions(Dockable dockable, Mode<Location> currentMode, DockActionSource currentSource) Description copied from interface:LocationModeActionProviderCalled if the elementdockable, which is currently in modemode, should have some additionalDockActions related to the owner of thisLocationModeActionProvider.- Specified by:
getActionsin interfaceLocationModeActionProvider- Overrides:
getActionsin classDefaultLocationModeActionProvider- Parameters:
dockable- the element for which an action source is requiredcurrentMode- the current mode ofdockablecurrentSource- the source that was returned by this method in the previous call. May benulleither if this method returnednullor was not yet called fordockable- Returns:
- the source or
nullif the default value should be used
-
destroy
Description copied from interface:LocationModeActionProviderCalled ifdockableis no longer in use and all references todockableare to be removed.- Specified by:
destroyin interfaceLocationModeActionProvider- Overrides:
destroyin classDefaultLocationModeActionProvider- Parameters:
dockable- the element which is no longer handled by the owning modesource- the last result ofgetActions, may benull
-