java.lang.Object
org.praxislive.code.CodeComponent<D>
org.praxislive.code.CodeRoot<D>
- Type Parameters:
D- wrapped delegate type
- All Implemented Interfaces:
Component,Lookup.Provider,Root
- Direct Known Subclasses:
CodeRootContainer
A
Root component instance that is rewritable at runtime. The CodeRoot
itself remains constant, but passes most responsibility to a CodeRoot.Context
wrapping a CodeRootDelegate (user code). This component handles
switching from one context to the next. A CodeRoot cannot be created directly
- see CodeFactory.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCodeRoot.Connector<D extends CodeRootDelegate>CodeConnector subclass for CodeRoots.static classCodeRoot.Context<D extends CodeRootDelegate>CodeContext subclass for CodeRoots.Nested classes/interfaces inherited from interface org.praxislive.core.Root
Root.Controller -
Method Summary
Modifier and TypeMethodDescriptionGet the Lookup from this Provider.voidNotify the component that a change has happened in its component hierarchy.initialize(String ID, RootHub hub) Method used by the RootHub to initialize the Root and obtain a Controller.voidparentNotify(Container parent) Notify the Component that it has been added to the supplied Container, or removed from its parent if the supplied argument is null.Methods inherited from class org.praxislive.code.CodeComponent
getControl, getInfo, getParent, getPort, write
-
Method Details
-
initialize
Description copied from interface:RootMethod used by the RootHub to initialize the Root and obtain a Controller. Root implementations will ensure this method can only be invoked once.- Specified by:
initializein interfaceRoot- Parameters:
ID- the unique ID of this Roothub- the RootHub the Root resides within- Returns:
- Controller for use by the RootHub instance
-
getLookup
Description copied from interface:Lookup.ProviderGet the Lookup from this Provider.- Specified by:
getLookupin interfaceLookup.Provider- Returns:
- lookup
-
parentNotify
Description copied from interface:ComponentNotify the Component that it has been added to the supplied Container, or removed from its parent if the supplied argument is null. The Component may throw a VetoException if it should not be added to the Container provided. It should also throw this exception if a parent is already set.- Specified by:
parentNotifyin interfaceComponent- Overrides:
parentNotifyin classCodeComponent<D extends CodeRootDelegate>- Parameters:
parent-- Throws:
VetoException
-
hierarchyChanged
public void hierarchyChanged()Description copied from interface:ComponentNotify the component that a change has happened in its component hierarchy. For example its direct parent or an ancestor has changed. This method will be called after parentNotify() if the result of an immediate parent change.- Specified by:
hierarchyChangedin interfaceComponent- Overrides:
hierarchyChangedin classCodeComponent<D extends CodeRootDelegate>
-