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 addContentArea(CContentArea area)
          Adds a new content area to this register.
 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.
 CommonSingleDockableFactory getBackupFactory()
          Gets the backup factory for missing SingleCDockables.
 CommonMultipleDockableFactory getCommonMultipleDockableFactory(java.lang.String id)
          Gets the factory with identifier id.
 java.util.List<CContentArea> getContentAreas()
          Gets an unmodifiable list of all CContentAreas known to this register.
 CContentArea getDefaultContentArea()
          Gets the default content area.
 SingleCDockable getSingleDockable(java.lang.String id)
          Searches the one SingleCDockable whose unique id equals id.
 void putCommonMultipleDockableFactory(java.lang.String id, CommonMultipleDockableFactory factory)
          Adds factory to this register.
 CommonMultipleDockableFactory removeCommonMultipleDockableFactory(java.lang.String id)
          Removes the CommonMultipleDockableFactory with identifier id rom this register.
 boolean removeContentArea(CContentArea area)
          Removes area from 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.
 void setDefaultContentArea(CContentArea area)
          Sets the default content area.
 
Methods inherited from interface bibliothek.gui.dock.common.CControlRegister
getControl, getDockable, getDockableCount, getDockables, getFactories, getFactory, getMultipleDockables, getSingleDockables, getStations, isMultiId, isSingleId, listDockablesInMode, listMultipleDockableFactories, listMultipleDockables, listSingleBackupFactories, listSingleDockables, multiToNormalId, singleToNormalId, toMultiId, toSingleId
 

Method Detail

getContentAreas

java.util.List<CContentArea> getContentAreas()
Gets an unmodifiable list of all CContentAreas known to this register. The list might or might not be updated when the contents of this register change.

Returns:
the unmodifiable list

addContentArea

void addContentArea(CContentArea area)
Adds a new content area to this register.

Parameters:
area - the new area
Throws:
java.lang.IllegalArgumentException - if area is already known to this register
java.lang.NullPointerException - if area is null

removeContentArea

boolean removeContentArea(CContentArea area)
Removes area from this register

Parameters:
area - the area to remove
Returns:
true if area was known to this register before, false if area could not be removed because it was not in the list

getDefaultContentArea

CContentArea getDefaultContentArea()
Gets the default content area.

Returns:
the area, can be null

setDefaultContentArea

void setDefaultContentArea(CContentArea area)
Sets the default content area.

Parameters:
area - the new area

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(java.lang.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(java.lang.String id,
                                      CommonMultipleDockableFactory factory)
Adds factory to this register.

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

getCommonMultipleDockableFactory

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

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

removeCommonMultipleDockableFactory

CommonMultipleDockableFactory removeCommonMultipleDockableFactory(java.lang.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