Package com.jme3.system
Class SystemListenerAggregator
java.lang.Object
com.jme3.system.SystemListenerAggregator
- All Implemented Interfaces:
SystemListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(SystemListener listener) voiddestroy()Callback to indicate that the context has been destroyed (either by the user or requested by the application itself).voidCalled when the application gained focus.voidhandleError(String errorMsg, Throwable t) Called when an error has occurred.voidCallback to indicate the application to initialize.voidCalled when the application lost focus.voidremoveListener(SystemListener listener) voidrequestClose(boolean esc) Called when the user requests to close the application.voidreshape(int width, int height) Called to notify the application that the resolution has changed.voidupdate()Callback to update the application state, and render the scene to the back buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.system.SystemListener
rescale
-
Constructor Details
-
SystemListenerAggregator
public SystemListenerAggregator()
-
-
Method Details
-
addListener
-
removeListener
-
initialize
public void initialize()Description copied from interface:SystemListenerCallback to indicate the application to initialize. This method is called in the GL/Rendering thread so any GL-dependent resources can be initialized.- Specified by:
initializein interfaceSystemListener
-
reshape
public void reshape(int width, int height) Description copied from interface:SystemListenerCalled to notify the application that the resolution has changed.- Specified by:
reshapein interfaceSystemListener- Parameters:
width- the new width of the display (in pixels, ≥0)height- the new height of the display (in pixels, ≥0)
-
update
public void update()Description copied from interface:SystemListenerCallback to update the application state, and render the scene to the back buffer.- Specified by:
updatein interfaceSystemListener
-
requestClose
public void requestClose(boolean esc) Description copied from interface:SystemListenerCalled when the user requests to close the application. This could happen when he clicks the X button on the window, presses the Alt-F4 combination, attempts to shut down the process from the task manager, or presses ESC.- Specified by:
requestClosein interfaceSystemListener- Parameters:
esc- If true, the user pressed ESC to close the application.
-
gainFocus
public void gainFocus()Description copied from interface:SystemListenerCalled when the application gained focus. The display implementation is not allowed to call this method before initialize() has been called or after destroy() has been called.- Specified by:
gainFocusin interfaceSystemListener
-
loseFocus
public void loseFocus()Description copied from interface:SystemListenerCalled when the application lost focus. The display implementation is not allowed to call this method before initialize() has been called or after destroy() has been called.- Specified by:
loseFocusin interfaceSystemListener
-
handleError
Description copied from interface:SystemListenerCalled when an error has occurred. This is typically invoked when an uncaught exception is thrown in the render thread.- Specified by:
handleErrorin interfaceSystemListener- Parameters:
errorMsg- The error message, if any, or null.t- Throwable object, or null.
-
destroy
public void destroy()Description copied from interface:SystemListenerCallback to indicate that the context has been destroyed (either by the user or requested by the application itself). Typically cleanup of native resources should happen here. This method is called in the GL/Rendering thread.- Specified by:
destroyin interfaceSystemListener
-