Package bibliothek.gui.dock.common
Interface CControlRegister
- All Known Subinterfaces:
MutableCControlRegister
- All Known Implementing Classes:
DefaultCControlRegister
public interface CControlRegister
- Author:
- Benjamin Sigg
-
Method Summary
Modifier and TypeMethodDescriptiongetContainer(CStation<?> child) Searches theCStationContainerwhich containschild.Gets the control for which this register is used.getDockable(int index) Gets the index'th dockable that is registeredintGets the number ofCDockables that are registered.Gets an unmodifiable list of allCDockables which are known to this register.Gets an unmodifiable map of allMultipleCDockableFactorys that are known to this register.getFactory(String id) Searches the factory with identifierid.Gets an unmodifiable list of allMultipleCDockables which are known to this register.Gets an unmodifiable list of allSingleCDockables which are known to this register.Gets an unmodifiable list of allCStationContainers known to this register.Gets an unmodifiable list of allCStations which are known to this register.booleanChecks whetheridcould be created bytoMultiId(String).booleanisSingleId(String id) Checks whetheridcould be created bytoSingleId(String).Gets a list of all visibleCDockables in the given mode.Gets a list of identifiers of allMultipleCDockableFactorys which are currently registered.listMultipleDockables(MultipleCDockableFactory<?, ?> factory) Gets a list of allMultipleCDockables that are registered at this control and whoseMultipleCDockable.getFactory()method returnsfactory.Gets a list of keys for allSingleCDockableFactorys which are currently registered.Gets a list of all identifiers ofSingleCDockablefor which the control has location information within the currentsetting.Undoes the changes oftoMultiId(String).Undoes the changes oftoSingleId(String).Transforms an identifier to an identifier for aMultipleCDockable.
Note that this method must never create an identifier that passesisSingleId(String).toSingleId(String id) Transforms an identifier to an identifier for aSingleCDockable.
Note that this method must never create an identifier that passesisMultiId(String).
-
Method Details
-
getControl
CControl getControl()Gets the control for which this register is used.- Returns:
- the control
-
getDockableCount
int getDockableCount()Gets the number ofCDockables that are registered.- Returns:
- the number of dockables
-
getDockable
Gets the index'th dockable that is registered- Parameters:
index- the index of the element- Returns:
- the selected dockable
-
getDockables
Gets an unmodifiable list of allCDockables which are known to this register. The list might or might not be updated when the contents of this register changes.- Returns:
- an unmodifiable list of elements
-
getSingleDockables
List<SingleCDockable> getSingleDockables()Gets an unmodifiable list of allSingleCDockables which are known to this register. The list might or might not be updated when the contents of this register changes.- Returns:
- an unmodifiable list of elements
-
getMultipleDockables
List<MultipleCDockable> getMultipleDockables()Gets an unmodifiable list of allMultipleCDockables which are known to this register. The list might or might not be updated when the contents of this register change.- Returns:
- an unmodifiable list of elements
-
getStations
Gets an unmodifiable list of allCStations which are known to this register. The list might or might not be updated when the content of this register changes.- Returns:
- an unmodifiable list of elements
-
getFactories
Map<String,MultipleCDockableFactory<?, getFactories()?>> Gets an unmodifiable map of allMultipleCDockableFactorys that are known to this register. The map may or may not be updated when the content of this register changes.- Returns:
- the unmodifiable map of factories
-
getFactory
Searches the factory with identifierid.- Parameters:
id- the id of the factory- Returns:
- the factory or
null
-
listSingleBackupFactories
Gets a list of keys for allSingleCDockableFactorys which are currently registered.- Returns:
- the list of keys
-
listMultipleDockableFactories
Gets a list of identifiers of allMultipleCDockableFactorys which are currently registered.- Returns:
- the list of factories
-
listMultipleDockables
Gets a list of allMultipleCDockables that are registered at this control and whoseMultipleCDockable.getFactory()method returnsfactory.- Parameters:
factory- the factory to look out for- Returns:
- the list of dockables, never
nullbut might be empty
-
listDockablesInMode
Gets a list of all visibleCDockables in the given mode.- Parameters:
mode- the mode which eachCDockablemust have- Returns:
- the list of
CDockables
-
listSingleDockables
Gets a list of all identifiers ofSingleCDockablefor which the control has location information within the currentsetting.- Returns:
- the list of ids, never
null
-
getStationContainers
List<CStationContainer> getStationContainers()Gets an unmodifiable list of allCStationContainers known to this register. The list might or might not be updated when the contents of this register change.- Returns:
- the unmodifiable list
-
getContainer
Searches theCStationContainerwhich containschild.- Parameters:
child- the child whose parent is searched- Returns:
- the parent of
childornull
-
toSingleId
Transforms an identifier to an identifier for aSingleCDockable.
Note that this method must never create an identifier that passesisMultiId(String).- Parameters:
id- some identifier- Returns:
- an identifier marked as being for a
SingleCDockable
-
isSingleId
Checks whetheridcould be created bytoSingleId(String).- Parameters:
id- the id to check- Returns:
trueif there is an input fortoSingleId(String)that would result inid
-
singleToNormalId
Undoes the changes oftoSingleId(String). It must betruethatsingleToNormalId( toSingleId( id )) = id. The behavior of this method is unspecified ifisSingleId(String)returnsfalseforid.- Parameters:
id- some id create bytoSingleId(String).- Returns:
- the original id
-
toMultiId
Transforms an identifier to an identifier for aMultipleCDockable.
Note that this method must never create an identifier that passesisSingleId(String).- Parameters:
id- some identifier- Returns:
- an identifier marked as being for a
MultipleCDockable
-
isMultiId
Checks whetheridcould be created bytoMultiId(String).- Parameters:
id- the id to check- Returns:
trueif there is an input fortoMultiId(String)that would result inid
-
multiToNormalId
Undoes the changes oftoMultiId(String). It must betruethatmultiToNormalId( toMultiId( id )) = id. The behavior of this method is unspecified ifisMultiId(String)returnsfalseforid.- Parameters:
id- some id create bytoMultiId(String).- Returns:
- the original id
-