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 LocationModePerspectives 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
CModeAreaPerspectives 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, waitgetIdentifierpublic void setPerspective(CPerspective perspective)
LocationModePerspectivesetPerspective in interface LocationModePerspectiveperspective - 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 nullpublic void remove(A location)
location from this perspective.location - the station to removepublic int getAreaCount()
CModeAreaPerspectives stored in this object.public A getArea(int index)
index'th area of this AbstractModePerspectiveindex - the index of some areapublic boolean isCurrentMode(PerspectiveDockable dockable)
LocationModePerspectivedockable currently is in this mode.isCurrentMode in interface LocationModePerspectivedockable - the element whose mode is searchedtrue if this mode describes the situation of dockablepublic boolean isCurrentMode(String root, DockableProperty location)
LocationModePerspectiveroot/location
should be in the mode represented by this.isCurrentMode in interface LocationModePerspectiveroot - the unique identifer of the root DockStationlocation - the location on the root stationpublic void readSetting(ModeSetting<Location> setting)
LocationModePerspectivesetting.readSetting in interface LocationModePerspectivesetting - some settingspublic void writeSetting(ModeSetting<Location> setting)
LocationModePerspectivesetting.writeSetting in interface LocationModePerspectivesetting - the settings to writeCopyright © 2018. All rights reserved.