Class AbstractModePerspective<A extends CModeAreaPerspective>
java.lang.Object
bibliothek.gui.dock.common.perspective.mode.AbstractModePerspective<A>
- Type Parameters:
A- the kind ofCModeAreaPerspectivethat can be registered
- All Implemented Interfaces:
LocationModePerspective
- Direct Known Subclasses:
CExternalizedModePerspective,CMaximizedModePerspective,CMinimizedModePerspective,CNormalModePerspective
public abstract class AbstractModePerspective<A extends CModeAreaPerspective>
extends Object
implements LocationModePerspective
This abstract implementation of a
LocationModeManagerPerspective just uses
a collection of LocationModePerspectives to find out whether the mode of
a CDockablePerspective matches this mode or not.- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAddslocationto the list of possible parents.getArea(int index) Gets theindex'th area of thisAbstractModePerspectiveintGets the number ofCModeAreaPerspectives stored in this object.Gets the perspective that uses this mode.booleanisCurrentMode(PerspectiveDockable dockable) Checks whetherdockablecurrently is inthismode.booleanisCurrentMode(String root, DockableProperty location) Checks whether the dockable at locationroot/locationshould be in the mode represented bythis.voidreadSetting(ModeSetting<Location> setting) Reads settings belonging to this mode fromsetting.voidRemoveslocationfrom this perspective.voidsetPerspective(CPerspective perspective) Informs this mode of what perspective is going to use it.voidwriteSetting(ModeSetting<Location> setting) Writes settings that belong to this mode tosetting.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.common.perspective.mode.LocationModePerspective
getIdentifier
-
Constructor Details
-
AbstractModePerspective
public AbstractModePerspective()
-
-
Method Details
-
setPerspective
Description copied from interface:LocationModePerspectiveInforms this mode of what perspective is going to use it.- Specified by:
setPerspectivein interfaceLocationModePerspective- Parameters:
perspective- the perspective that uses this mode
-
getPerspective
Gets the perspective that uses this mode.- Returns:
- the perspective
-
add
Addslocationto the list of possible parents.- Parameters:
location- the new location, notnull
-
remove
Removeslocationfrom this perspective.- Parameters:
location- the station to remove
-
getAreaCount
public int getAreaCount()Gets the number ofCModeAreaPerspectives stored in this object.- Returns:
- the number of areas
-
getArea
Gets theindex'th area of thisAbstractModePerspective- Parameters:
index- the index of some area- Returns:
- the area
-
isCurrentMode
Description copied from interface:LocationModePerspectiveChecks whetherdockablecurrently is inthismode.- Specified by:
isCurrentModein interfaceLocationModePerspective- Parameters:
dockable- the element whose mode is searched- Returns:
trueif this mode describes the situation ofdockable
-
isCurrentMode
Description copied from interface:LocationModePerspectiveChecks whether the dockable at locationroot/locationshould be in the mode represented bythis.- Specified by:
isCurrentModein interfaceLocationModePerspective- Parameters:
root- the unique identifer of the rootDockStationlocation- the location on the root station- Returns:
- whether a dockable in this mode can have the described location
-
readSetting
Description copied from interface:LocationModePerspectiveReads settings belonging to this mode fromsetting.- Specified by:
readSettingin interfaceLocationModePerspective- Parameters:
setting- some settings
-
writeSetting
Description copied from interface:LocationModePerspectiveWrites settings that belong to this mode tosetting.- Specified by:
writeSettingin interfaceLocationModePerspective- Parameters:
setting- the settings to write
-