public class DefaultLocationModeActionProvider extends Object implements LocationModeActionProvider
DockActionSource
to
all Dockable
s. This source contains an exchangeable DockAction
.Constructor and Description |
---|
DefaultLocationModeActionProvider()
Creates a new empty provider
|
DefaultLocationModeActionProvider(CAction action)
Creates a new provider.
|
DefaultLocationModeActionProvider(DockAction action)
Creates a new provider.
|
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> mode,
DockActionSource source)
Called if the element
dockable , which is currently in
mode mode , should have some additional DockAction s
related to the owner of this LocationModeActionProvider . |
DockAction |
getSelectModeAction()
Gets the action which must be triggered in order to activate this mode.
|
void |
setSelectModeAction(CAction action)
|
void |
setSelectModeAction(DockAction selectModeAction)
Sets the action which must be triggered in order to activate this mode.
|
public DefaultLocationModeActionProvider()
public DefaultLocationModeActionProvider(CAction action)
action
- the action of this provider, may be null
setSelectModeAction(CAction)
public DefaultLocationModeActionProvider(DockAction action)
action
- the action of this provider, may be null
setSelectModeAction(DockAction)
public void setSelectModeAction(CAction action)
action
- the new action or null
setSelectModeAction(DockAction)
public void setSelectModeAction(DockAction selectModeAction)
getActions(Dockable, Mode, DockActionSource)
if the mode
is not this
. Changes to this property are applied to all visible
Dockable
.selectModeAction
- the action or null
public DockAction getSelectModeAction()
null
public DockActionSource getActions(Dockable dockable, Mode<Location> mode, DockActionSource source)
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 requiredmode
- the current mode of dockable
source
- 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 usedpublic 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