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 TypeMethodDescriptionboolean
canLoad
(ComponentManager mng, Component fragment) Check if the component can be loaded by this loader.int
load
(ComponentManager mng, Component fragment, Runnable markReady) Load the component in the given component manager.void
unload
(ComponentManager mng, Component fragment) Frees up resources and configurations for the component in the given component manager.
-
Constructor Details
-
AppComponentLoader
-
-
Method Details
-
load
Description copied from interface:ComponentLoader
Load the component in the given component manager. This method is called after the component is initialized- Specified by:
load
in 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:ComponentLoader
Check 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:
canLoad
in 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:ComponentLoader
Frees up resources and configurations for the component in the given component manager.- Specified by:
unload
in interfaceComponentLoader
- Parameters:
mng
- the component managerfragment
- the component to cleanup
-