Package bibliothek.gui.dock.facile.mode
Class DefaultLocationModeActionProvider
java.lang.Object
bibliothek.gui.dock.facile.mode.DefaultLocationModeActionProvider
- All Implemented Interfaces:
LocationModeActionProvider
- Direct Known Subclasses:
KeyedLocationModeActionProvider
This default implementation always returns the same
DockActionSource to
all Dockables. This source contains an exchangeable DockAction.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty providerCreates a new provider.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> mode, DockActionSource source) Called if the elementdockable, which is currently in modemode, should have some additionalDockActions related to the owner of thisLocationModeActionProvider.Gets the action which must be triggered in order to activate this mode.voidsetSelectModeAction(DockAction selectModeAction) Sets the action which must be triggered in order to activate this mode.voidsetSelectModeAction(CAction action)
-
Constructor Details
-
DefaultLocationModeActionProvider
public DefaultLocationModeActionProvider()Creates a new empty provider -
DefaultLocationModeActionProvider
Creates a new provider.- Parameters:
action- the action of this provider, may benull- See Also:
-
DefaultLocationModeActionProvider
Creates a new provider.- Parameters:
action- the action of this provider, may benull- See Also:
-
-
Method Details
-
setSelectModeAction
- Parameters:
action- the new action ornull- See Also:
-
setSelectModeAction
Sets the action which must be triggered in order to activate this mode. This action will be returned bygetActions(Dockable, Mode, DockActionSource)if the mode is notthis. Changes to this property are applied to all visibleDockable.- Parameters:
selectModeAction- the action ornull
-
getSelectModeAction
Gets the action which must be triggered in order to activate this mode.- Returns:
- the action or
null
-
getActions
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- Parameters:
dockable- the element for which an action source is requiredmode- the current mode ofdockablesource- 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- Parameters:
dockable- the element which is no longer handled by the owning modesource- the last result ofgetActions, may benull
-