M
- the areas that are managed by this modepublic class ExternalizedMode<M extends ExternalizedModeArea> extends DefaultLocationMode<M>
AbstractLocationMode.DockableHandle
Modifier and Type | Field and Description |
---|---|
static String |
ICON_IDENTIFIER
the key used for the
IconManager to read the Icon for the "externalize"-action |
static Path |
IDENTIFIER
the unique identifier of this mode
|
Modifier | Constructor and Description |
---|---|
protected |
ExternalizedMode()
Empty default constructor.
|
|
ExternalizedMode(CControl control)
Creates a new mode.
|
|
ExternalizedMode(DockController controller)
Creates a new mode.
|
Modifier and Type | Method and Description |
---|---|
void |
ensureNotHidden(Dockable dockable)
Ensures that no
Dockable that has this mode hides dockable . |
ExternalizedModeBehavior |
getBehavior()
Gets the current implementation of some algorithms of this mode.
|
ExtendedMode |
getExtendedMode()
Gets the unique identifier of this mode.
|
ModeSettingFactory<Location> |
getSettingFactory()
Gets a factory for creating new
ModeSetting s. |
Path |
getUniqueIdentifier()
Gets a unique identifier, only this
Mode must have this
identifier. |
boolean |
isDefaultMode(Dockable dockable)
Checks whether this mode is a default mode of
dockable . |
void |
readSetting(ModeSetting<Location> setting)
Sets the properties of this mode.
|
boolean |
runApply(Dockable dockable,
Location history,
AffectedSet set)
This default implementation uses the
DockStation.move(Dockable, DockableProperty)
and DockStation.drop(Dockable, DockableProperty) methods to put
dockable at its location. |
void |
setBehavior(ExternalizedModeBehavior behavior)
Tells this
ExternalizedMode how some algorithms are implemented. |
void |
writeSetting(ModeSetting<Location> setting)
Gets the current properties of this mode in an independent way.
|
current, isCurrentMode
add, addLocationModeListener, apply, aside, createHandle, get, get, get, get, getActionsFor, getController, getDefaultArea, getManager, getRepresentation, getRepresentationIds, isModeAvailable, isModeHidden, isRepresenting, iterator, listeners, remove, removeLocationModeListener, setActionProvider, setController, setDefaultArea, setManager, setShouldAutoFocus, shouldAutoFocus
public static final Path IDENTIFIER
public static final String ICON_IDENTIFIER
IconManager
to read the Icon
for the "externalize"-actionprotected ExternalizedMode()
AbstractLocationMode.setActionProvider(LocationModeActionProvider)
to complete
initialization of this mode.public ExternalizedMode(CControl control)
control
- the control in whose realm this mode workspublic ExternalizedMode(DockController controller)
controller
- the owner of this modepublic Path getUniqueIdentifier()
Mode
Mode
must have this
identifier. Identifiers with the first segment being "dock" are
reserved for this framework, clients may choose any other identifiers.null
, should contain at least
one segment.public ExtendedMode getExtendedMode()
LocationMode
public boolean isDefaultMode(Dockable dockable)
Mode
dockable
. A
default mode is a mode that is choosen per default, if no other mode
is selected. There should be only one default-mode per Dockable
.dockable
- some dockable, not null
public boolean runApply(Dockable dockable, Location history, AffectedSet set)
DefaultLocationMode
DockStation.move(Dockable, DockableProperty)
and DockStation.drop(Dockable, DockableProperty)
methods to put
dockable
at its location.runApply
in class DefaultLocationMode<M extends ExternalizedModeArea>
dockable
- the element whose mode becomes this
history
- history information that was returned by this mode when calling
Mode.current(Dockable)
the last time.set
- this method has to store all Dockable
s which might have changed their
mode in the set.true
if dockable
was moved, false
if the method failed
to set the location of dockable
for any reasonpublic ModeSettingFactory<Location> getSettingFactory()
Mode
ModeSetting
s.null
public void setBehavior(ExternalizedModeBehavior behavior)
ExternalizedMode
how some algorithms are implemented.behavior
- the new behavior, not null
public ExternalizedModeBehavior getBehavior()
public void ensureNotHidden(Dockable dockable)
LocationMode
Dockable
that has this mode hides dockable
.
Note that dockable
may or may not be in this mode.dockable
- the element which must not be hiddenpublic void writeSetting(ModeSetting<Location> setting)
Mode
setting
- a ModeSetting
with the same id as this Mode
. This setting
was created by a ModeSettingFactory
with the same id as this Mode
.public void readSetting(ModeSetting<Location> setting)
Mode
ModeSetting
that has been created by the current
ModeSettingFactory
setting
- the new set of properties, not null