Package org.ngengine.components.jme3
Class AppComponentInitializer
java.lang.Object
org.ngengine.components.jme3.AppComponentInitializer
- All Implemented Interfaces:
ComponentInitializer
Initializes components by connecting them to JME3 application resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanInitialize(ComponentManager mng, Component fragment) Check if the component can be initialized by this initializer.voidcleanup(ComponentManager mng, Component fragment) Cleanup the component in the given component manager.intdeprecatedInitialize(ComponentManager mng, Component fragment, Runnable markReady) Deprecated, for removal: This API element is subject to removal in a future version.intinitialize(ComponentManager mng, Component fragment, Runnable markReady) Initialize the component in the given component manager.
-
Constructor Details
-
AppComponentInitializer
-
-
Method Details
-
deprecatedInitialize
@Deprecated(forRemoval=true) public int deprecatedInitialize(ComponentManager mng, Component fragment, Runnable markReady) Deprecated, for removal: This API element is subject to removal in a future version. -
initialize
Description copied from interface:ComponentInitializerInitialize the component in the given component manager. This method is called when the component is added to the component manager.- Specified by:
initializein interfaceComponentInitializer- Parameters:
mng- the component managerfragment- the component to initializemarkReady- a runnable that should be called when the initialization is complete- Returns:
- how many times the markReady callback is expected to be called to mark the complete initialization.
-
cleanup
Description copied from interface:ComponentInitializerCleanup the component in the given component manager. This method is called when the component is removed from the component manager.- Specified by:
cleanupin interfaceComponentInitializer- Parameters:
mng- the component managerfragment- the component to cleanup
-
canInitialize
Description copied from interface:ComponentInitializerCheck if the component can be initialized by this initializer. This is used to determine if the component is compatible with this initializer and can be initialized without issues. If the component is not compatible, it will not be initialized and the component manager will call the next available initializer in the chain.- Specified by:
canInitializein interfaceComponentInitializer- Parameters:
mng- the component managerfragment- the component to check- Returns:
- true if the component can be initialized, false otherwise
-