Package com.jme3.system
Class AWTFrameProcessor
java.lang.Object
com.jme3.system.AWTFrameProcessor
- All Implemented Interfaces:
- SceneProcessor,- PropertyChangeListener,- EventListener
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ComponentThe destination of jMe frames.protected PropertyChangeListenerThe height listener.protected PropertyChangeListenerThe ration listener.protected PropertyChangeListenerThe width listener.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbind(Component destination, Application application) Bind this processor.voidbind(Component destination, Application application, ViewPort viewPort) Bind this processor.voidbind(Component destination, Application application, ViewPort viewPort, boolean main) Bind this processor.protected voidbindDestination(Application application, Component destination) Bind this processor.protected voidvoidcleanup()Called when the SP is removed from the RM.protected AWTComponentRenderercreateFrameTransfer(FrameBuffer frameBuffer, int width, int height) Create a new frame transfer.protected ApplicationGets the application.protected intGets camera angle.protected ComponentGets the current destination.protected intGets destination height.protected intGets destination width.protected AWTComponentRendererGets the frame transfer.protected RenderManagerGets the render manager.protected ViewPortGets the view port.protected booleanChecks of existing application.protected booleanChecks of existing destination.voidinitialize(RenderManager rm, ViewPort vp) Called in the render thread to initialize the scene processor.booleanbooleanbooleanisMain()protected booleanIs preserve ratio.protected voidnotifyChangedHeight(Number newValue) Notify about that the height was changed.protected voidnotifyChangedRatio(Boolean newValue) Notify about that the ratio was changed.protected voidnotifyChangedWidth(Number newValue) Notify about that the width was changed.protected voidnotifyComponentResized(int newWidth, int newHeight, boolean fixAspect) Handle resizing.voidpostFrame(FrameBuffer out) Called after a frame has been rendered and the queue flushed.voidpostQueue(RenderQueue rq) Called after the scene graph has been queued, but before it is flushed.voidpreFrame(float tpf) Called before a framevoidvoidreshape()voidCalled when the resolution of the viewport has been changed.protected voidreshapeCurrentViewPort(int width, int height) Reshape the current view port.protected AWTComponentRendererreshapeInThread(int width, int height, boolean fixAspect) Reshape the current frame transfer for the new size.protected voidsetApplication(Application application) Sets the application.protected voidsetDestination(Component destination) Sets the destination.voidsetEnabled(boolean enabled) protected voidsetFrameTransfer(AWTComponentRenderer frameTransfer) Sets the frame transfer.voidsetProfiler(AppProfiler profiler) Sets a profiler Instance for this processor.voidsetTransferMode(AWTFrameProcessor.TransferMode transferMode) voidunbind()Unbind this processor from its current destination.protected voidUnbind this processor from destination.protected voidMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessorrescale
- 
Field Details- 
widthListenerThe width listener.
- 
heightListenerThe height listener.
- 
rationListenerThe ration listener.
- 
destinationThe destination of jMe frames.
 
- 
- 
Constructor Details- 
AWTFrameProcessorpublic AWTFrameProcessor()
 
- 
- 
Method Details- 
initializeDescription copied from interface:SceneProcessorCalled in the render thread to initialize the scene processor.- Specified by:
- initializein interface- SceneProcessor
- Parameters:
- rm- The render manager to which the SP was added to
- vp- The viewport to which the SP is assigned
 
- 
reshapeDescription copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
- reshapein interface- SceneProcessor
- Parameters:
- vp- the affected ViewPort
- w- the new width (in pixels)
- h- the new height (in pixels)
 
- 
isInitializedpublic boolean isInitialized()- Specified by:
- isInitializedin interface- SceneProcessor
- Returns:
- True if initialize() has been called on this SceneProcessor, false if otherwise.
 
- 
preFramepublic void preFrame(float tpf) Description copied from interface:SceneProcessorCalled before a frame- Specified by:
- preFramein interface- SceneProcessor
- Parameters:
- tpf- Time per frame
 
- 
postQueueDescription copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
- postQueuein interface- SceneProcessor
- Parameters:
- rq- The render queue
 
- 
postFrameDescription copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
- postFramein interface- SceneProcessor
- Parameters:
- out- The FB to which the scene was rendered.
 
- 
cleanuppublic void cleanup()Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
- cleanupin interface- SceneProcessor
 
- 
setProfilerDescription copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
- setProfilerin interface- SceneProcessor
- Parameters:
- profiler- the profiler instance.
 
- 
propertyChange- Specified by:
- propertyChangein interface- PropertyChangeListener
 
- 
notifyChangedRatioNotify about that the ratio was changed.- Parameters:
- newValue- the new value of the ratio.
 
- 
notifyChangedHeightNotify about that the height was changed.- Parameters:
- newValue- the new value of the height.
 
- 
notifyChangedWidthNotify about that the width was changed.- Parameters:
- newValue- the new value of the width.
 
- 
getApplicationGets the application.- Returns:
- the application.
 
- 
setApplicationSets the application.- Parameters:
- application- the application.
 
- 
getDestinationGets the current destination.- Returns:
- the current destination.
 
- 
setDestinationSets the destination.- Parameters:
- destination- the destination.
 
- 
hasDestinationprotected boolean hasDestination()Checks of existing destination.- Returns:
- true if destination is exists.
 
- 
hasApplicationprotected boolean hasApplication()Checks of existing application.- Returns:
- true if destination is exists.
 
- 
getFrameTransferGets the frame transfer.- Returns:
- the file transfer.
 
- 
setFrameTransferSets the frame transfer.- Parameters:
- frameTransfer- the file transfer.
 
- 
getViewPortGets the view port.- Returns:
- the view port.
 
- 
getRenderManagerGets the render manager.- Returns:
- the render manager.
 
- 
isMainpublic boolean isMain()
- 
isEnabledpublic boolean isEnabled()
- 
setEnabledpublic void setEnabled(boolean enabled) 
- 
notifyComponentResizedprotected void notifyComponentResized(int newWidth, int newHeight, boolean fixAspect) Handle resizing.- Parameters:
- newWidth- the new width.
- newHeight- the new height.
- fixAspect- true to fix the aspect ratio.
 
- 
reshapepublic void reshape()
- 
isPreserveRatioprotected boolean isPreserveRatio()Is preserve ratio.- Returns:
- is preserve ratio.
 
- 
getDestinationWidthprotected int getDestinationWidth()Gets destination width.- Returns:
- the destination width.
 
- 
getDestinationHeightprotected int getDestinationHeight()Gets destination height.- Returns:
- the destination height.
 
- 
bindBind this processor.- Parameters:
- destination- the destination.
- application- the application.
 
- 
bindBind this processor.- Parameters:
- destination- the destination.
- application- the application.
- viewPort- the view port.
 
- 
bindBind this processor.- Parameters:
- destination- the destination.
- application- the application.
- viewPort- the view port.
- main- true if this processor is main.
 
- 
unbindpublic void unbind()Unbind this processor from its current destination.
- 
bindDestinationBind this processor.- Parameters:
- application- the application.
- destination- the destination.
 
- 
unbindDestinationprotected void unbindDestination()Unbind this processor from destination.
- 
bindListenersprotected void bindListeners()
- 
unbindListenersprotected void unbindListeners()
- 
reshapeInThreadReshape the current frame transfer for the new size.- Parameters:
- width- the width.
- height- the height.
- fixAspect- true to fix the aspect ratio.
- Returns:
- the new frame transfer.
 
- 
createFrameTransferCreate a new frame transfer.- Parameters:
- frameBuffer- the frame buffer.
- width- the width.
- height- the height.
- Returns:
- the new frame transfer.
 
- 
reshapeCurrentViewPortprotected void reshapeCurrentViewPort(int width, int height) Reshape the current view port.- Parameters:
- width- the width.
- height- the height.
 
- 
getCameraAngleprotected int getCameraAngle()Gets camera angle.- Returns:
- the camera angle.
 
- 
getTransferMode
- 
setTransferMode
 
-