A
- the areas that are managed by this modepublic abstract class DefaultLocationMode<A extends StationModeArea> extends AbstractLocationMode<A>
Mode
that works with Location
s. This
implementation offers a runApply(Dockable, Location, AffectedSet)
and
Mode.apply(Dockable, Object, AffectedSet)
method.AbstractLocationMode.DockableHandle
Constructor and Description |
---|
DefaultLocationMode() |
Modifier and Type | Method and Description |
---|---|
Location |
current(Dockable dockable)
This default implementation just returns the location of
dockable but does not change any properties. |
boolean |
isCurrentMode(Dockable dockable)
This default implementation calls
ModeArea.isChild(Dockable) on each
area of this mode and returns true if at least one area returns true . |
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. |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
ensureNotHidden, getExtendedMode
getSettingFactory, getUniqueIdentifier, isDefaultMode, readSetting, writeSetting
public Location current(Dockable dockable)
dockable
but does not change any properties.dockable
- the elementMode.apply(Dockable, Object, AffectedSet)
public boolean runApply(Dockable dockable, Location history, AffectedSet set)
DockStation.move(Dockable, DockableProperty)
and DockStation.drop(Dockable, DockableProperty)
methods to put
dockable
at its location.runApply
in class AbstractLocationMode<A extends StationModeArea>
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 boolean isCurrentMode(Dockable dockable)
ModeArea.isChild(Dockable)
on each
area of this mode and returns true
if at least one area returns true
.dockable
- some dockable, not null
dockable
is in this
mode