Class LocationModeManagerPerspective
java.lang.Object
bibliothek.gui.dock.common.perspective.mode.LocationModeManagerPerspective
Represents a
CLocationModeManager and offers methods to find the current location and
ExtendedMode of a CDockablePerspective.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionLocationModeManagerPerspective(CPerspective perspective, CControlAccess control) Creates a new manager -
Method Summary
Modifier and TypeMethodDescriptionvoidAddsmodeto this manager.getLocation(CDockablePerspective dockable) Gets the current location ofdockable.getLocation(PerspectiveDockable dockable) Gets the current location ofdockable.getMode(ExtendedMode mode) Gets the location-mode with the identifiermode.getMode(PerspectiveDockable dockable) Gets the current mode ofdockable.Gets theExtendedModewhose identifier is equal toidentifier.getMode(String root, DockableProperty location) Gets the mode which could have a child in the given location.getModes()Gets an array containing all the modes known to this manager.getRoot(PerspectiveDockable dockable) Gets the firstCStationPerspectivethat is a root station and that is a parent ofdockable.voidreadModes(ModeSettings<Location, ?> modes, CPerspective cperspective, CControlAccess control) Reads the contents ofmodesand applies it to the dockables ofcperspective.writeModes(CControlAccess control) Writes the contents of thisLocationModeManagerPerspectiveinto a newModeSettings.
-
Constructor Details
-
LocationModeManagerPerspective
Creates a new manager- Parameters:
perspective- the owner of this manager, notnullcontrol- the control which is wrapped byperspective
-
-
Method Details
-
getMode
Gets theExtendedModewhose identifier is equal toidentifier.- Parameters:
identifier- some identifier of a mode- Returns:
- the mode or
nullif not found
-
addMode
Addsmodeto this manager.- Parameters:
mode- the additional mode
-
getMode
Gets the location-mode with the identifiermode.- Parameters:
mode- the identifier- Returns:
- the mode or
nullif not found
-
getModes
Gets an array containing all the modes known to this manager.- Returns:
- all the modes
-
getMode
Gets the current mode ofdockable.- Parameters:
dockable- the element whose location is searched- Returns:
- the mode of
dockableornullif not found
-
getMode
Gets the mode which could have a child in the given location.- Parameters:
root- the identifier of the rootDockStationlocation- the location of some dockable- Returns:
- the matching mode or
nullif not found
-
getRoot
Gets the firstCStationPerspectivethat is a root station and that is a parent ofdockable.- Parameters:
dockable- some element whose root-station is searched- Returns:
- the root-station or
nullif not found
-
getLocation
Gets the current location ofdockable.- Parameters:
dockable- the element whose location is searched- Returns:
- the location or
nullif not found
-
getLocation
Gets the current location ofdockable.- Parameters:
dockable- the element whose location is searched- Returns:
- the location or
nullif not found
-
writeModes
Writes the contents of thisLocationModeManagerPerspectiveinto a newModeSettings.- Parameters:
control- access to factories that may be used for writing the contents- Returns:
- the contents of this object
-
readModes
public void readModes(ModeSettings<Location, ?> modes, CPerspective cperspective, CControlAccess control) Reads the contents ofmodesand applies it to the dockables ofcperspective.- Parameters:
modes- the settings to readcperspective- the perspective for which to read the settingcontrol- the control associated withcperspective
-