- 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
public class CodeRoot<D extends CodeRootDelegate> extends CodeComponent<D> implements Root
ARootcomponent instance that is rewritable at runtime. The CodeRoot itself remains constant, but passes most responsibility to aCodeRoot.Contextwrapping aCodeRootDelegate(user code). This component handles switching from one context to the next. A CodeRoot cannot be created directly - seeCodeFactory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LookupgetLookup()Get the Lookup from this Provider.voidhierarchyChanged()Notify the component that a change has happened in its component hierarchy.Root.Controllerinitialize(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
-
-
-
-
Method Detail
-
initialize
public Root.Controller initialize(String ID, RootHub hub)
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
public Lookup getLookup()
Description copied from interface:Lookup.ProviderGet the Lookup from this Provider.- Specified by:
getLookupin interfaceLookup.Provider- Returns:
- lookup
-
parentNotify
public void parentNotify(Container parent) throws VetoException
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>- 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>
-
-