|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.perspective.CPerspective
@Todo(compatibility=COMPATIBLE, priority=MAJOR, description="remove the warning about modes without perspective") public class CPerspective
A CPerspective
is a lightweight, modifiable representation of all Dockable
s and DockStation
s
handled by a CControl
.
When using a CPerspective
clients have to be aware of:
CStation
used by a CControl
needs to be registered using addRoot(CStationPerspective)
Constructor Summary | |
---|---|
CPerspective(CControlAccess control)
Creates a new perspective |
Method Summary | |
---|---|
void |
addRoot(CStationPerspective station)
Deprecated. use addStation(CStationPerspective) instead |
void |
addStation(CStationPerspective station)
Adds a new station to this perspective. |
Iterator<PerspectiveElement> |
elements()
Gets an iterator that will visit all the PerspectiveElement s of this CPerspective . |
CContentPerspective |
getContentArea()
Gets a representation of the default CContentArea . |
CContentPerspective |
getContentArea(String id)
Gets a representation of the CContentArea with identifier id . |
CDockablePerspective |
getDockable(String id)
Searches for the SingleCDockablePerspective or MultipleCDockablePerspective whose
unique identifier is id . |
String[] |
getDockableKeys()
Gets all the unique keys for SingleCDockablePerspective s and MultipleCDockablePerspective s. |
LocationModeManagerPerspective |
getLocationManager()
Gets the representation of the CLocationModeManager , the representation
is responsible for finding out what ExtendedMode and location a
CDockablePerspective has. |
CStationPerspective |
getRoot(String id)
Deprecated. use getStation(String) instead |
String[] |
getRootKeys()
Deprecated. use getStationKeys() instead |
CExternalizePerspective |
getScreenStation()
Gets the CStationPerspective for the station that represents free floating dockables. |
CStationPerspective |
getStation(String id)
Gets the station which was registered with the unique identifier id . |
String[] |
getStationKeys()
Gets the names of all the stations that were registered |
void |
putDockable(CDockablePerspective dockable)
Stores dockable in the list of known dockables. |
CDockablePerspective |
removeDockable(String key)
Removes the dockable with unique key key from the list of known dockables. |
void |
shrink()
Searches all occurances of a ShrinkablePerspectiveStation and calls
shrink on them. |
Location |
storeLocation(CDockablePerspective dockable)
Determines the current location of dockable and stores that location
in a map using the ExtendedMode of the Location as key. |
void |
storeLocations()
Stores the current location of all CDockablePerspective s currently known to this
CPerspective . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CPerspective(CControlAccess control)
control
- the owner of this perspectiveMethod Detail |
---|
public LocationModeManagerPerspective getLocationManager()
CLocationModeManager
, the representation
is responsible for finding out what ExtendedMode
and location a
CDockablePerspective
has.
null
public void storeLocations()
CDockablePerspective
s currently known to this
CPerspective
. The location is stored in the LocationHistory
of each
dockable.
public Location storeLocation(CDockablePerspective dockable)
dockable
and stores that location
in a map using the ExtendedMode
of the Location
as key. If the
user later clicks on one of the buttons like "minimize" or "externalize" this
location information is read and applied.
dockable
- the element whose location should be stored
null
if the location of
dockable
could not be determined@Deprecated @Todo(compatibility=BREAK_MINOR, priority=ENHANCEMENT, target=VERSION_1_1_2, description="Remove this method") public void addRoot(CStationPerspective station)
addStation(CStationPerspective)
instead
id
is
already registered, then this station gets replaced.
station
- the new stationpublic void addStation(CStationPerspective station)
id
is
already registered, then this station gets replaced.
station
- the new station@Deprecated @Todo(compatibility=BREAK_MINOR, priority=ENHANCEMENT, target=VERSION_1_1_2, description="Remove this method") public CStationPerspective getRoot(String id)
getStation(String)
instead
id
.
id
- some unique identifier
id
, can be null
public CStationPerspective getStation(String id)
id
.
id
- some unique identifier
id
, can be null
public CDockablePerspective getDockable(String id)
SingleCDockablePerspective
or MultipleCDockablePerspective
whose
unique identifier is id
. This method requires a call to storeLocations()
before it will return any results.
id
- the unique identifier of a dockable, after CControlRegister.toSingleId(String)
or CControlRegister.toMultiId(String)
has been applied.
null
if id
is unknown or if
storeLocations()
was not executedpublic String[] getDockableKeys()
SingleCDockablePerspective
s and MultipleCDockablePerspective
s.
For this method to return the correct keys, storeLocations()
must have been executed.
public CDockablePerspective removeDockable(String key)
key
from the list of known dockables. If the
dockable is still part of the tree, and storeLocations()
is called, then the dockable
is reinserted into the list.
key
- the unique identifier of the element to remove
public void putDockable(CDockablePerspective dockable)
dockable
in the list of known dockables. This allows
clients to add "invisible" dockables: CDockable
s which are not yet visible
but which already have some location information stored.
dockable
- the new element, not null
@Deprecated @Todo(compatibility=BREAK_MINOR, priority=ENHANCEMENT, target=VERSION_1_1_2, description="Remove this method") public String[] getRootKeys()
getStationKeys()
instead
null
public String[] getStationKeys()
null
public CContentPerspective getContentArea()
CContentArea
. If there are no
stations for the perspective, then the missing stations are automatically
added to this perspective.
public CContentPerspective getContentArea(String id)
CContentArea
with identifier id
. If there are no
stations for the perspective, then the missing stations are automatically
added to this perspective.
id
- the unique identifier of the area
public CExternalizePerspective getScreenStation()
CStationPerspective
for the station that represents free floating dockables. This
is equivalent of calling getRoot( CControl.EXTERNALIZED_STATION_ID )
.
null
if there is no station registered with key
CControl.EXTERNALIZED_STATION_ID
ClassCastException
- if the station named CControl.EXTERNALIZED_STATION_ID
is not
of type CExternalizePerspective
public void shrink()
ShrinkablePerspectiveStation
and calls
shrink
on them.
public Iterator<PerspectiveElement> elements()
PerspectiveElement
s of this CPerspective
. The
iterator does not check whether this perspective is modified while it is in use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |