Package com.jme3.app.state
Class AWTComponentAppState
java.lang.Object
com.jme3.app.state.AbstractAppState
com.jme3.app.state.AWTComponentAppState
- All Implemented Interfaces:
- AppState
An app state dedicated to the rendering of a JMonkey application within an AWT component.
- 
Field SummaryFields inherited from class com.jme3.app.state.AbstractAppStateinitialized
- 
Constructor SummaryConstructorsConstructorDescriptionAWTComponentAppState(Component component) Create a new app state dedicated to the rendering of a JMonkey application within the given AWTcomponent.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanup()Called byAppStateManagerwhen transitioning thisAppStatefrom terminating to detached.Get the AWT component that is used as rendering output.Get thetransfer modethat is used by the underlying frame processor.voidinitialize(AppStateManager stateManager, Application app) Called byAppStateManagerwhen transitioning thisAppStatefrom initializing to running.
 This will happen on the next iteration through the update loop afterAppStateManager.attach(com.jme3.app.state.AppState)was called.voidsetComponent(Component component) Set the AWT component that is used as rendering output.voidsetEnabled(boolean enabled) Enable or disable the functionality of theAppState.voidSet thetransfer modethat is used by the underlying frame processor.voidstateAttached(AppStateManager stateManager) Called byAppStateManager.attach(com.jme3.app.state.AppState)when transitioning thisAppStatefrom detached to initializing.voidupdate(float tpf) Called to update theAppState.Methods inherited from class com.jme3.app.state.AbstractAppStategetId, isEnabled, isInitialized, postRender, render, setId, stateDetached
- 
Constructor Details- 
AWTComponentAppStateCreate a new app state dedicated to the rendering of a JMonkey application within the given AWTcomponent.- Parameters:
- component- the component that is used as rendering output.
 
 
- 
- 
Method Details- 
initializeDescription copied from interface:AppStateCalled byAppStateManagerwhen transitioning thisAppStatefrom initializing to running.
 This will happen on the next iteration through the update loop afterAppStateManager.attach(com.jme3.app.state.AppState)was called.AppStateManagerwill call this only from the update loop inside the rendering thread. This means is it safe to modify the scene graph from this method.- Specified by:
- initializein interface- AppState
- Overrides:
- initializein class- AbstractAppState
- Parameters:
- stateManager- The state manager
- app- The application
 
- 
stateAttachedDescription copied from interface:AppStateCalled byAppStateManager.attach(com.jme3.app.state.AppState)when transitioning thisAppStatefrom detached to initializing.There is no assumption about the thread from which this function is called, therefore it is unsafe to modify the scene graph from this method. Please use AppState.initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)instead.- Specified by:
- stateAttachedin interface- AppState
- Overrides:
- stateAttachedin class- AbstractAppState
- Parameters:
- stateManager- State manager to which the state was attached to.
 
- 
setEnabledpublic void setEnabled(boolean enabled) Description copied from interface:AppStateEnable or disable the functionality of theAppState. The effect of this call depends on implementation. AnAppStatestarts as being enabled by default. A disabledAppStates does not get calls toAppState.update(float),AppState.render(RenderManager), orAppState.postRender()from itsAppStateManager.- Specified by:
- setEnabledin interface- AppState
- Overrides:
- setEnabledin class- AbstractAppState
- Parameters:
- enabled- activate the AppState or not.
 
- 
updatepublic void update(float tpf) Description copied from interface:AppStateCalled to update theAppState. This method will be called every render pass if theAppStateis both attached and enabled.- Specified by:
- updatein interface- AppState
- Overrides:
- updatein class- AbstractAppState
- Parameters:
- tpf- Time since the last call to update(), in seconds.
 
- 
cleanuppublic void cleanup()Description copied from interface:AppStateCalled byAppStateManagerwhen transitioning thisAppStatefrom terminating to detached. This method is called the following render pass after theAppStatehas been detached and is always called once and only once for each timeinitialize()is called. Either when theAppStateis detached or when the application terminates (if it terminates normally).- Specified by:
- cleanupin interface- AppState
- Overrides:
- cleanupin class- AbstractAppState
 
- 
getComponentGet the AWT component that is used as rendering output.- Returns:
- the AWT component that is used as rendering output.
- See Also:
 
- 
setComponentSet the AWT component that is used as rendering output.- Parameters:
- component- the AWT component that is used as rendering output.
- See Also:
 
- 
getTransferModeGet thetransfer modethat is used by the underlying frame processor.- Returns:
- the transfer modethat is used by the underlying frame processor.
- See Also:
 
- 
setTransferModeSet thetransfer modethat is used by the underlying frame processor.- Parameters:
- mode- the- transfer modethat is used by the underlying frame processor.
- See Also:
 
 
-