public interface LocationMode extends Mode<Location>
Mode that is used by the LocationModeManager. A LocationMode
represents a state Dockables are in depending on their current location in the tree
of DockStations and Dockables. Since DockStations
may be nested, most algorithms working with them have to be recursive. Some of the
methods of LocationMode have a slightly different semantic than specified in the
Mode interface.| Modifier and Type | Method and Description |
|---|---|
void |
addLocationModeListener(LocationModeListener listener)
Adds a listener to this mode.
|
Location |
aside(AsideRequest request,
Location location)
Calls
DockStation.aside(AsideRequest) on a station that matches location. |
void |
ensureNotHidden(Dockable dockable)
Ensures that no
Dockable that has this mode hides dockable. |
ExtendedMode |
getExtendedMode()
Gets the unique identifier of this mode.
|
LocationModeManager<?> |
getManager()
Gets the manager which currently works with this mode.
|
DockStation |
getRepresentation(String uniqueId)
Gets the one
DockStation that is known with the root-id uniqueId. |
Set<String> |
getRepresentationIds()
Gets all the unique identifiers that will yield a non-
null result when calling getRepresentation(String). |
boolean |
isCurrentMode(Dockable dockable)
If this method is not able to clearly find out whether
dockable
has this mode, it returns false. |
boolean |
isRepresenting(DockStation station)
Tells whether this mode knows
station and represents the mode
children of station are in. |
void |
removeLocationModeListener(LocationModeListener listener)
Removes
listener from this mode. |
void |
setController(DockController controller)
Connects this mode with a controller.
|
void |
setManager(LocationModeManager<?> manager)
Sets the manager which is using this mode.
|
boolean |
shouldAutoFocus()
Tells the
LocationModeManager whether the focus should be transferred to
a Dockable that has this mode. |
apply, current, getActionsFor, getSettingFactory, getUniqueIdentifier, isDefaultMode, readSetting, writeSettingvoid setManager(LocationModeManager<?> manager)
manager - the manager or nullIllegalStateException - if manager is not null
and another manager is already setvoid setController(DockController controller)
ModeAreas.controller - the new controller or nullLocation aside(AsideRequest request, Location location)
DockStation.aside(AsideRequest) on a station that matches location.request - the request to forward to a DockStation or to processlocation - the source of the location whose neighbor is searchednull if the request could not be processedLocationModeManager<?> getManager()
nullboolean isCurrentMode(Dockable dockable)
dockable
has this mode, it returns false. The LocationModeManager
will ask again with the parent station of dockable.isCurrentMode in interface Mode<Location>dockable - some dockable, not nulldockable is in this modeboolean isRepresenting(DockStation station)
station and represents the mode
children of station are in.station - the station which is to be testedstationDockStation getRepresentation(String uniqueId)
DockStation that is known with the root-id uniqueId.
The uniqueId is the same id as used returned by Location.getRoot()
of Locations issued by this mode.uniqueId - the id of some stationnullSet<String> getRepresentationIds()
null result when calling getRepresentation(String).DockStations, the result may not be modifiablevoid addLocationModeListener(LocationModeListener listener)
apply starts or finishes.listener - the new listenervoid removeLocationModeListener(LocationModeListener listener)
listener from this mode.listener - the listener to removeExtendedMode getExtendedMode()
void ensureNotHidden(Dockable dockable)
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 hiddenboolean shouldAutoFocus()
LocationModeManager whether the focus should be transferred to
a Dockable that has this mode.Copyright © 2018. All rights reserved.