Package org.ngengine.components.jme3
Class AppComponentLoader
java.lang.Object
org.ngengine.components.jme3.AppComponentLoader
- All Implemented Interfaces:
ComponentLoader
load components by connecting them to JME3 application resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanLoad(ComponentManager mng, Component fragment) Check if the component can be loaded by this loader.intload(ComponentManager mng, Component fragment, Runnable markReady) Load the component in the given component manager.protected voidvoidunload(ComponentManager mng, Component fragment) Frees up resources and configurations for the component in the given component manager.
-
Constructor Details
-
AppComponentLoader
-
-
Method Details
-
preload
-
load
Description copied from interface:ComponentLoaderLoad the component in the given component manager. This method is called after the component is initialized- Specified by:
loadin interfaceComponentLoader- Parameters:
mng- the component managerfragment- the component to loadmarkReady- a runnable that should be called when the loading is complete- Returns:
- how many times the markReady callback is expected to be called to mark the complete loading.
-
canLoad
Description copied from interface:ComponentLoaderCheck if the component can be loaded by this loader. This is used to determine if the component is compatible with this loader and can be initialized without issues. If the component is not compatible, the next available loader in the chain.- Specified by:
canLoadin interfaceComponentLoader- Parameters:
mng- the component managerfragment- the component to check- Returns:
- true if the component can be initialized, false otherwise
-
unload
Description copied from interface:ComponentLoaderFrees up resources and configurations for the component in the given component manager.- Specified by:
unloadin interfaceComponentLoader- Parameters:
mng- the component managerfragment- the component to cleanup
-