Package bibliothek.gui.dock.common
Interface CStationContainer
- All Known Implementing Classes:
CContentArea
public interface CStationContainer
A
CStationContainer is a set of root CStations that are somehow
combined and ordered on some kind of Component. A container may or may not be mutable.- Author:
- Benjamin Sigg
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the observerlistenerto this container.CStation<?>Gets the preferred defaultCStationof this container.CStation<?>Gets the preferred defaultCStationof this container for children in modemode.CStation<?>getMatchingStation(CStationContainer container, CStation<?> station) Assumingcontaineris a type ofCStationContainerthat is known tothis, and assumingstationis a child ofcontainer: this method returns one ofthischildren that has the same relative location in respect tothisasstationhas tocontainer.CStation<?>getStation(int index) Gets the index'th child of this container.intGets the number ofCStations that are currently in this container.Gets a unique identifier that is used by only thisCStationContainer.voidRemoves the observerlistenerfrom this container.
-
Method Details
-
addStationContainerListener
Adds the observerlistenerto this container. The listener is to be informed whenever aCStationis added or removed from this container.- Parameters:
listener- the new listener, notnull
-
removeStationContainerListener
Removes the observerlistenerfrom this container.- Parameters:
listener- the listener to remove
-
getUniqueId
String getUniqueId()Gets a unique identifier that is used by only thisCStationContainer.- Returns:
- the unique identifier, not
null
-
getComponent
Component getComponent()- Returns:
- the parent of all
CStations, notnull
-
getStationCount
int getStationCount()Gets the number ofCStations that are currently in this container.- Returns:
- the number of stations, at least 0
-
getStation
Gets the index'th child of this container.- Parameters:
index- the index of the child, between 0 andgetStationCount()- Returns:
- the child, not
null
-
getDefaultStation
CStation<?> getDefaultStation()Gets the preferred defaultCStationof this container. Children with no location are usually made visible on such a default station.- Returns:
- the default station or
null
-
getDefaultStation
Gets the preferred defaultCStationof this container for children in modemode.- Parameters:
mode- the mode for which a station is searched- Returns:
- a child of this
CStationContainerthat can showDockables in modemode, can benull
-
getMatchingStation
Assumingcontaineris a type ofCStationContainerthat is known tothis, and assumingstationis a child ofcontainer: this method returns one ofthischildren that has the same relative location in respect tothisasstationhas tocontainer. For example ifstationis the center area of aCGridArea, andthisis aCGridAreaas well, then this method would return the center area ofthis.- Parameters:
container- some kind ofCStationContainer, may be a type that is known tothisor not.station- some child ofcontainer- Returns:
- a child of
this, such that the location of the child in relation tothisis equivalent to the location ofstationin relation tocontainer. A value ofnullindicates that this method did not find a suitable child. If possible the result of this method andstationshould be of the same type.
-