A
- the kind of CModeAreaPerspective
that can be registeredpublic abstract class AbstractModePerspective<A extends CModeAreaPerspective> extends Object implements LocationModePerspective
LocationModeManagerPerspective
just uses
a collection of LocationModePerspective
s to find out whether the mode of
a CDockablePerspective
matches this mode or not.Constructor and Description |
---|
AbstractModePerspective() |
Modifier and Type | Method and Description |
---|---|
void |
add(A location)
Adds
location to the list of possible parents. |
A |
getArea(int index)
Gets the
index 'th area of this AbstractModePerspective |
int |
getAreaCount()
Gets the number of
CModeAreaPerspective s stored in this object. |
CPerspective |
getPerspective()
Gets the perspective that uses this mode.
|
boolean |
isCurrentMode(PerspectiveDockable dockable)
Checks whether
dockable currently is in this mode. |
boolean |
isCurrentMode(String root,
DockableProperty location)
Checks whether the dockable at location
root /location
should be in the mode represented by this . |
void |
readSetting(ModeSetting<Location> setting)
Reads settings belonging to this mode from
setting . |
void |
remove(A location)
Removes
location from this perspective. |
void |
setPerspective(CPerspective perspective)
Informs this mode of what perspective is going to use it.
|
void |
writeSetting(ModeSetting<Location> setting)
Writes settings that belong to this mode to
setting . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdentifier
public void setPerspective(CPerspective perspective)
LocationModePerspective
setPerspective
in interface LocationModePerspective
perspective
- the perspective that uses this modepublic CPerspective getPerspective()
public void add(A location)
location
to the list of possible parents.location
- the new location, not null
public void remove(A location)
location
from this perspective.location
- the station to removepublic int getAreaCount()
CModeAreaPerspective
s stored in this object.public A getArea(int index)
index
'th area of this AbstractModePerspective
index
- the index of some areapublic boolean isCurrentMode(PerspectiveDockable dockable)
LocationModePerspective
dockable
currently is in this
mode.isCurrentMode
in interface LocationModePerspective
dockable
- the element whose mode is searchedtrue
if this mode describes the situation of dockable
public boolean isCurrentMode(String root, DockableProperty location)
LocationModePerspective
root
/location
should be in the mode represented by this
.isCurrentMode
in interface LocationModePerspective
root
- the unique identifer of the root DockStation
location
- the location on the root stationpublic void readSetting(ModeSetting<Location> setting)
LocationModePerspective
setting
.readSetting
in interface LocationModePerspective
setting
- some settingspublic void writeSetting(ModeSetting<Location> setting)
LocationModePerspective
setting
.writeSetting
in interface LocationModePerspective
setting
- the settings to write