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
 void addStationContainerListener(CStationContainerListener listener)
          Adds the observer listener to this container.
 Component getComponent()
          Gets a Component whose children are all the CStations of this CStationContainer.
 CStation<?> getDefaultStation()
          Gets the preferred default CStation of this container.
 CStation<?> getStation(int index)
          Gets the index'th child of this container.
 int getStationCount()
          Gets the number of CStations that are currently in this container.
 String getUniqueId()
          Gets a unique identifier that is used by only this CStationContainer.
 void removeStationContainerListener(CStationContainerListener listener)
          Removes the observer listener from this container.
 

Method Detail

addStationContainerListener

void addStationContainerListener(CStationContainerListener listener)
Adds the observer listener to this container. The listener is to be informed whenever a CStation is added or removed from this container.

Parameters:
listener - the new listener, not null

removeStationContainerListener

void removeStationContainerListener(CStationContainerListener listener)
Removes the observer listener from this container.

Parameters:
listener - the listener to remove

getUniqueId

String getUniqueId()
Gets a unique identifier that is used by only this CStationContainer.

Returns:
the unique identifier, not null

getComponent

Component getComponent()
Gets a Component whose children are all the CStations of this CStationContainer.

Returns:
the parent of all CStations, not null

getStationCount

int getStationCount()
Gets the number of CStations that are currently in this container.

Returns:
the number of stations, at least 0

getStation

CStation<?> getStation(int index)
Gets the index'th child of this container.

Parameters:
index - the index of the child, between 0 and getStationCount()
Returns:
the child, not null

getDefaultStation

CStation<?> getDefaultStation()
Gets the preferred default CStation of this container. Children with no location are usually made visible on such a default station.

Returns:
the default station or null