public abstract class MappingLocationModeActionProvider extends Object implements LocationModeActionProvider
LocationModeActionProvider
mimics a map with keys managed by
a subclass. In its getActions(Dockable, Mode, DockActionSource)
method it selects the one provider whose key matches the current mode to provide the actions.Constructor and Description |
---|
MappingLocationModeActionProvider() |
Modifier and Type | Method and Description |
---|---|
void |
destroy(Dockable dockable,
DockActionSource source)
Called if
dockable is no longer in use and all references
to dockable are to be removed. |
DockActionSource |
getActions(Dockable dockable,
Mode<Location> currentMode,
DockActionSource currentSource)
Called if the element
dockable , which is currently in
mode mode , should have some additional DockAction s
related to the owner of this LocationModeActionProvider . |
protected abstract LocationModeActionProvider |
getProvider(Dockable dockable,
Mode<Location> currentMode,
DockActionSource currentSource)
Gets the
LocationModeActionProvider which fits the key generated by the arguments
of this methode. |
public void destroy(Dockable dockable, DockActionSource source)
LocationModeActionProvider
dockable
is no longer in use and all references
to dockable
are to be removed.destroy
in interface LocationModeActionProvider
dockable
- the element which is no longer handled by the owning modesource
- the last result of getActions
, may be null
public DockActionSource getActions(Dockable dockable, Mode<Location> currentMode, DockActionSource currentSource)
LocationModeActionProvider
dockable
, which is currently in
mode mode
, should have some additional DockAction
s
related to the owner of this LocationModeActionProvider
.getActions
in interface LocationModeActionProvider
dockable
- the element for which an action source is requiredcurrentMode
- 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
null
if the default value should be usedprotected abstract LocationModeActionProvider getProvider(Dockable dockable, Mode<Location> currentMode, DockActionSource currentSource)
LocationModeActionProvider
which fits the key generated by the arguments
of this methode.dockable
- the element for which the actions will be usedcurrentMode
- the current mode of dockable
currentSource
- the current actions of dockable
null