bibliothek.gui.dock.common.intern
Interface MutableCControlRegister

All Superinterfaces:
CControlRegister
All Known Implementing Classes:
DefaultCControlRegister

public interface MutableCControlRegister
extends CControlRegister

A CControlRegister whose contents can be changed.

Author:
Benjamin Sigg

Method Summary
 void addMultipleDockable(MultipleCDockable dockable)
          Adds dockable to this register.
 void addSingleDockable(SingleCDockable dockable)
          Adds dockable to this register.
 void addStation(CStation<?> station)
          Adds station to this register.
 void addStationContainer(CStationContainer container)
          Adds a new set of CStations to this register.
 CommonSingleDockableFactory getBackupFactory()
          Gets the backup factory for missing SingleCDockables.
 CommonMultipleDockableFactory getCommonMultipleDockableFactory(String id)
          Gets the factory with identifier id.
 CContentArea getDefaultContentArea()
          Gets the default set of CStations.
 SingleCDockable getSingleDockable(String id)
          Searches the one SingleCDockable whose unique id equals id.
 void putCommonMultipleDockableFactory(String id, CommonMultipleDockableFactory factory)
          Adds factory to this register.
 CommonMultipleDockableFactory removeCommonMultipleDockableFactory(String id)
          Removes the CommonMultipleDockableFactory with identifier id rom this register.
 boolean removeMultipleDockable(MultipleCDockable dockable)
          Removes dockable from this register.
 boolean removeSingleDockable(SingleCDockable dockable)
          Removes dockable from this register.
 boolean removeStation(CStation<?> station)
          Removes station from this register.
 boolean removeStationContainer(CStationContainer container)
          Removes container from this registry.
 void setDefaultContentArea(CContentArea container)
          Sets the default set of CStations.
 
Methods inherited from interface bibliothek.gui.dock.common.CControlRegister
getContainer, getControl, getDockable, getDockableCount, getDockables, getFactories, getFactory, getMultipleDockables, getSingleDockables, getStationContainers, getStations, isMultiId, isSingleId, listDockablesInMode, listMultipleDockableFactories, listMultipleDockables, listSingleBackupFactories, listSingleDockables, multiToNormalId, singleToNormalId, toMultiId, toSingleId
 

Method Detail

addStationContainer

void addStationContainer(CStationContainer container)
Adds a new set of CStations to this register.

Parameters:
container - the new set of stations, not null
Throws:
IllegalArgumentException - if container is already registered or another container with the same unique id was found
NullPointerException - if container is null

removeStationContainer

boolean removeStationContainer(CStationContainer container)
Removes container from this registry.

Parameters:
container - the container to remove
Returns:
true if container was known to this registry and was removed, false otherwise

getDefaultContentArea

CContentArea getDefaultContentArea()
Gets the default set of CStations.

Returns:
the container, can be null

setDefaultContentArea

void setDefaultContentArea(CContentArea container)
Sets the default set of CStations. One of this CStations will be used to show new CDockables if they do not have a location set.

Parameters:
container - the new container

addStation

void addStation(CStation<?> station)
Adds station to this register.

Parameters:
station - the new station

removeStation

boolean removeStation(CStation<?> station)
Removes station from this register.

Parameters:
station - the station to remove
Returns:
true if station was removed, false otherwise

getBackupFactory

CommonSingleDockableFactory getBackupFactory()
Gets the backup factory for missing SingleCDockables.

Returns:
the factory, never null

addSingleDockable

void addSingleDockable(SingleCDockable dockable)
Adds dockable to this register.

Parameters:
dockable - the new element

getSingleDockable

SingleCDockable getSingleDockable(String id)
Searches the one SingleCDockable whose unique id equals id.

Parameters:
id - some id to search
Returns:
a dockable with the same id

addMultipleDockable

void addMultipleDockable(MultipleCDockable dockable)
Adds dockable to this register.

Parameters:
dockable - the new element

putCommonMultipleDockableFactory

void putCommonMultipleDockableFactory(String id,
                                      CommonMultipleDockableFactory factory)
Adds factory to this register.

Parameters:
id - the id for the factory
factory - the new factory

getCommonMultipleDockableFactory

CommonMultipleDockableFactory getCommonMultipleDockableFactory(String id)
Gets the factory with identifier id.

Parameters:
id - the id of the factory
Returns:
the factory or null

removeCommonMultipleDockableFactory

CommonMultipleDockableFactory removeCommonMultipleDockableFactory(String id)
Removes the CommonMultipleDockableFactory with identifier id rom this register.

Parameters:
id - the identifier of the factory
Returns:
the factory that was removed or null

removeSingleDockable

boolean removeSingleDockable(SingleCDockable dockable)
Removes dockable from this register.

Parameters:
dockable - the element to remove
Returns:
true if dockable was removed, false if not

removeMultipleDockable

boolean removeMultipleDockable(MultipleCDockable dockable)
Removes dockable from this register.

Parameters:
dockable - the element to remove
Returns:
true if dockable was removed, false if not