public class LocationModeManagerPerspective extends Object
CLocationModeManager
and offers methods to find the current location and
ExtendedMode
of a CDockablePerspective
.Constructor and Description |
---|
LocationModeManagerPerspective(CPerspective perspective,
CControlAccess control)
Creates a new manager
|
Modifier and Type | Method and Description |
---|---|
void |
addMode(LocationModePerspective mode)
Adds
mode to this manager. |
Location |
getLocation(CDockablePerspective dockable)
Gets the current location of
dockable . |
Location |
getLocation(PerspectiveDockable dockable)
Gets the current location of
dockable . |
LocationModePerspective |
getMode(ExtendedMode mode)
Gets the location-mode with the identifier
mode . |
ExtendedMode |
getMode(Path identifier)
Gets the
ExtendedMode whose identifier is equal to
identifier . |
ExtendedMode |
getMode(PerspectiveDockable dockable)
Gets the current mode of
dockable . |
ExtendedMode |
getMode(String root,
DockableProperty location)
Gets the mode which could have a child in the given location.
|
ExtendedMode[] |
getModes()
Gets an array containing all the modes known to this manager.
|
CStationPerspective |
getRoot(PerspectiveDockable dockable)
Gets the first
CStationPerspective that is a root station and
that is a parent of dockable . |
void |
readModes(ModeSettings<Location,?> modes,
CPerspective cperspective,
CControlAccess control)
Reads the contents of
modes and applies it to the dockables of cperspective . |
ModeSettings<Location,Location> |
writeModes(CControlAccess control)
Writes the contents of this
LocationModeManagerPerspective into a new ModeSettings . |
public LocationModeManagerPerspective(CPerspective perspective, CControlAccess control)
perspective
- the owner of this manager, not null
control
- the control which is wrapped by perspective
public ExtendedMode getMode(Path identifier)
ExtendedMode
whose identifier is equal to
identifier
.identifier
- some identifier of a modenull
if not foundpublic void addMode(LocationModePerspective mode)
mode
to this manager.mode
- the additional modepublic LocationModePerspective getMode(ExtendedMode mode)
mode
.mode
- the identifiernull
if not foundpublic ExtendedMode[] getModes()
public ExtendedMode getMode(PerspectiveDockable dockable)
dockable
.dockable
- the element whose location is searcheddockable
or null
if not foundpublic ExtendedMode getMode(String root, DockableProperty location)
root
- the identifier of the root DockStation
location
- the location of some dockablenull
if not foundpublic CStationPerspective getRoot(PerspectiveDockable dockable)
CStationPerspective
that is a root station and
that is a parent of dockable
.dockable
- some element whose root-station is searchednull
if not foundpublic Location getLocation(CDockablePerspective dockable)
dockable
.dockable
- the element whose location is searchednull
if not foundpublic Location getLocation(PerspectiveDockable dockable)
dockable
.dockable
- the element whose location is searchednull
if not foundpublic ModeSettings<Location,Location> writeModes(CControlAccess control)
LocationModeManagerPerspective
into a new ModeSettings
.control
- access to factories that may be used for writing the contentspublic void readModes(ModeSettings<Location,?> modes, CPerspective cperspective, CControlAccess control)
modes
and applies it to the dockables of cperspective
.modes
- the settings to readcperspective
- the perspective for which to read the settingcontrol
- the control associated with cperspective