public class DefaultCControlRegister extends Object implements MutableCControlRegister
CControlRegister.| Constructor and Description |
|---|
DefaultCControlRegister(CControl control)
Creates a new register
|
| Modifier and Type | Method and Description |
|---|---|
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. |
CStationContainer |
getContainer(CStation<?> child)
Searches the
CStationContainer which contains child. |
CControl |
getControl()
Gets the control for which this register is used.
|
CContentArea |
getDefaultContentArea()
Gets the default set of
CStations. |
CDockable |
getDockable(int index)
Gets the index'th dockable that is registered
|
int |
getDockableCount()
Gets the number of
CDockables that are registered. |
List<CDockable> |
getDockables()
Gets an unmodifiable list of all
CDockables which are known to
this register. |
Map<String,MultipleCDockableFactory<?,?>> |
getFactories()
Gets an unmodifiable map of all
MultipleCDockableFactorys that
are known to this register. |
MultipleCDockableFactory<?,?> |
getFactory(String id)
Searches the factory with identifier
id. |
List<MultipleCDockable> |
getMultipleDockables()
Gets an unmodifiable list of all
MultipleCDockables which are known to
this register. |
SingleCDockable |
getSingleDockable(String id)
Searches the one
SingleCDockable whose unique id equals id. |
List<SingleCDockable> |
getSingleDockables()
Gets an unmodifiable list of all
SingleCDockables which are known to
this register. |
List<CStationContainer> |
getStationContainers()
Gets an unmodifiable list of all
CStationContainers known
to this register. |
List<CStation<?>> |
getStations()
Gets an unmodifiable list of all
CStations which are known to
this register. |
boolean |
isMultiId(String id)
Checks whether
id could be created by CControlRegister.toMultiId(String). |
boolean |
isSingleId(String id)
Checks whether
id could be created by CControlRegister.toSingleId(String). |
List<CDockable> |
listDockablesInMode(ExtendedMode mode)
Gets a list of all visible
CDockables in the given mode. |
Set<String> |
listMultipleDockableFactories()
Gets a list of identifiers of all
MultipleCDockableFactorys
which are currently registered at this control. |
List<MultipleCDockable> |
listMultipleDockables(MultipleCDockableFactory<?,?> factory)
Gets a list of all
MultipleCDockables that are registered at this
control and whose MultipleCDockable.getFactory() method returns
factory. |
Set<String> |
listSingleBackupFactories()
Gets a list of keys for all
SingleCDockableFactorys which
are currently registered at this control. |
Set<String> |
listSingleDockables()
Gets a list of all identifiers of
SingleCDockable for which
this control has location information within the current setting. |
String |
multiToNormalId(String id)
Undoes the changes of
CControlRegister.toMultiId(String). |
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. |
String |
singleToNormalId(String id)
Undoes the changes of
CControlRegister.toSingleId(String). |
String |
toMultiId(String id)
Transforms an identifier to an identifier for a
MultipleCDockable. |
String |
toSingleId(String id)
Transforms an identifier to an identifier for a
SingleCDockable. |
public DefaultCControlRegister(CControl control)
control - the owner of this registerpublic CControl getControl()
CControlRegistergetControl in interface CControlRegisterpublic List<CDockable> getDockables()
CControlRegisterCDockables which are known to
this register. The list might or might not be updated when the contents
of this register changes.getDockables in interface CControlRegisterpublic List<MultipleCDockable> getMultipleDockables()
CControlRegisterMultipleCDockables which are known to
this register. The list might or might not be updated when the contents
of this register change.getMultipleDockables in interface CControlRegisterpublic List<SingleCDockable> getSingleDockables()
CControlRegisterSingleCDockables which are known to
this register. The list might or might not be updated when the contents
of this register changes.getSingleDockables in interface CControlRegisterpublic List<CStation<?>> getStations()
CControlRegisterCStations which are known to
this register. The list might or might not be updated when the content
of this register changes.getStations in interface CControlRegisterpublic List<CStationContainer> getStationContainers()
CControlRegisterCStationContainers known
to this register. The list might or might not be updated when the contents
of this register change.getStationContainers in interface CControlRegisterpublic CStationContainer getContainer(CStation<?> child)
CControlRegisterCStationContainer which contains child.getContainer in interface CControlRegisterchild - the child whose parent is searchedchild or nullpublic void addStationContainer(CStationContainer container)
MutableCControlRegisterCStations to this register.addStationContainer in interface MutableCControlRegistercontainer - the new set of stations, not nullpublic Set<String> listSingleBackupFactories()
SingleCDockableFactorys which
are currently registered at this control.listSingleBackupFactories in interface CControlRegisterpublic Set<String> listMultipleDockableFactories()
MultipleCDockableFactorys
which are currently registered at this control.listMultipleDockableFactories in interface CControlRegisterpublic List<MultipleCDockable> listMultipleDockables(MultipleCDockableFactory<?,?> factory)
MultipleCDockables that are registered at this
control and whose MultipleCDockable.getFactory() method returns
factory.listMultipleDockables in interface CControlRegisterfactory - the factory to look out fornull but might be emptypublic List<CDockable> listDockablesInMode(ExtendedMode mode)
CDockables in the given mode.listDockablesInMode in interface CControlRegistermode - the mode which each CDockable must haveCDockablespublic Set<String> listSingleDockables()
SingleCDockable for which
this control has location information within the current setting.listSingleDockables in interface CControlRegisternullpublic String toSingleId(String id)
CControlRegisterSingleCDockable.CControlRegister.isMultiId(String).toSingleId in interface CControlRegisterid - some identifierSingleCDockablepublic boolean isSingleId(String id)
CControlRegisterid could be created by CControlRegister.toSingleId(String).isSingleId in interface CControlRegisterid - the id to checktrue if there is an input for CControlRegister.toSingleId(String)
that would result in idpublic String singleToNormalId(String id)
CControlRegisterCControlRegister.toSingleId(String). It must be true
that singleToNormalId( toSingleId( id )) = id. The behavior
of this method is unspecified if CControlRegister.isSingleId(String) returns
false for id.singleToNormalId in interface CControlRegisterid - some id create by CControlRegister.toSingleId(String).public String toMultiId(String id)
CControlRegisterMultipleCDockable.CControlRegister.isSingleId(String).toMultiId in interface CControlRegisterid - some identifierMultipleCDockablepublic boolean isMultiId(String id)
CControlRegisterid could be created by CControlRegister.toMultiId(String).isMultiId in interface CControlRegisterid - the id to checktrue if there is an input for CControlRegister.toMultiId(String)
that would result in idpublic String multiToNormalId(String id)
CControlRegisterCControlRegister.toMultiId(String). It must be true
that multiToNormalId( toMultiId( id )) = id. The behavior
of this method is unspecified if CControlRegister.isMultiId(String) returns
false for id.multiToNormalId in interface CControlRegisterid - some id create by CControlRegister.toMultiId(String).public void addMultipleDockable(MultipleCDockable dockable)
MutableCControlRegisterdockable to this register.addMultipleDockable in interface MutableCControlRegisterdockable - the new elementpublic void addSingleDockable(SingleCDockable dockable)
MutableCControlRegisterdockable to this register.addSingleDockable in interface MutableCControlRegisterdockable - the new elementpublic SingleCDockable getSingleDockable(String id)
MutableCControlRegisterSingleCDockable whose unique id equals id.getSingleDockable in interface MutableCControlRegisterid - some id to searchpublic void addStation(CStation<?> station)
MutableCControlRegisterstation to this register.addStation in interface MutableCControlRegisterstation - the new stationpublic CommonSingleDockableFactory getBackupFactory()
MutableCControlRegisterSingleCDockables.getBackupFactory in interface MutableCControlRegisternullpublic CommonMultipleDockableFactory getCommonMultipleDockableFactory(String id)
MutableCControlRegisterid.getCommonMultipleDockableFactory in interface MutableCControlRegisterid - the id of the factorynullpublic CContentArea getDefaultContentArea()
MutableCControlRegisterCStations.getDefaultContentArea in interface MutableCControlRegisternullpublic void putCommonMultipleDockableFactory(String id, CommonMultipleDockableFactory factory)
MutableCControlRegisterfactory to this register.putCommonMultipleDockableFactory in interface MutableCControlRegisterid - the id for the factoryfactory - the new factorypublic CommonMultipleDockableFactory removeCommonMultipleDockableFactory(String id)
MutableCControlRegisterCommonMultipleDockableFactory with identifier id
rom this register.removeCommonMultipleDockableFactory in interface MutableCControlRegisterid - the identifier of the factorynullpublic boolean removeStationContainer(CStationContainer container)
MutableCControlRegistercontainer from this registry.removeStationContainer in interface MutableCControlRegistercontainer - the container to removetrue if container was known to this registry and
was removed, false otherwisepublic boolean removeMultipleDockable(MultipleCDockable dockable)
MutableCControlRegisterdockable from this register.removeMultipleDockable in interface MutableCControlRegisterdockable - the element to removetrue if dockable was removed,
false if notpublic boolean removeSingleDockable(SingleCDockable dockable)
MutableCControlRegisterdockable from this register.removeSingleDockable in interface MutableCControlRegisterdockable - the element to removetrue if dockable was removed,
false if notpublic boolean removeStation(CStation<?> station)
MutableCControlRegisterstation from this register.removeStation in interface MutableCControlRegisterstation - the station to removetrue if station was removed, false
otherwisepublic void setDefaultContentArea(CContentArea container)
MutableCControlRegisterCStations. One of this CStations will be used
to show new CDockables if they do not have a location set.setDefaultContentArea in interface MutableCControlRegistercontainer - the new containerpublic CDockable getDockable(int index)
CControlRegistergetDockable in interface CControlRegisterindex - the index of the elementpublic int getDockableCount()
CControlRegisterCDockables that are registered.getDockableCount in interface CControlRegisterpublic Map<String,MultipleCDockableFactory<?,?>> getFactories()
CControlRegisterMultipleCDockableFactorys that
are known to this register. The map may or may not be updated when the
content of this register changes.getFactories in interface CControlRegisterpublic MultipleCDockableFactory<?,?> getFactory(String id)
CControlRegisterid.getFactory in interface CControlRegisterid - the id of the factorynullCopyright © 2018. All rights reserved.