- All Superinterfaces:
Component,Lookup.Provider
- All Known Implementing Classes:
AbstractContainer,AbstractContainer.Delegate,AbstractRootContainer,CodeContainer,CodeRootContainer
Extension to the Component interface for components that can contain other
components as children.
-
Method Summary
Modifier and TypeMethodDescriptionchildren()Get a Stream of the child IDs that this container makes publicly visible.getAddress(Component child) Get the address for the provided child component, or null if the component is not a child of this container.Get child component with specific ID.default ComponentTypeGet theComponentTypeof the provided child.default voidwrite(TreeWriter writer) If supported, write the state of this container to the providedTreeWriter.Methods inherited from interface org.praxislive.core.Component
getControl, getInfo, getParent, getPort, hierarchyChanged, parentNotifyMethods inherited from interface org.praxislive.core.Lookup.Provider
getLookup
-
Method Details
-
getChild
Get child component with specific ID.- Parameters:
id-- Returns:
- Component, or null if no component with that ID exists.
-
children
Get a Stream of the child IDs that this container makes publicly visible. Containers may have hidden children that can be returned fromgetChild(java.lang.String)but are not listed here. All IDs returned should correspond to valid components, and (if provided) match the implementation ofContainerProtocol.A Stream is returned allowing flexibility in implementation.
- Returns:
- stream of public child IDs
-
getAddress
Get the address for the provided child component, or null if the component is not a child of this container.- Parameters:
child- component- Returns:
- address, or null of component is not a child of this container.
-
write
If supported, write the state of this container to the providedTreeWriter. This should allow for the container, and its children, to be recreated in as close to its current state as possible.To fully support this method, the Container should write its type, component info, property values, children and connections, in that order. It may also add custom annotations.
The default implementation of this method does nothing.
-
getType
Get theComponentTypeof the provided child. The default implementation looks forComponentInfo.KEY_COMPONENT_TYPEin the child's info. Container's may override to provide a more efficient or suitable result.The default implementation does not check if the provided component is actually a child of this container.
- Parameters:
child- child component- Returns:
- component type, or null if unavailable
-