public class AWTFrameProcessor extends java.lang.Object implements SceneProcessor, java.beans.PropertyChangeListener
| Modifier and Type | Class and Description | 
|---|---|
| static class  | AWTFrameProcessor.TransferMode | 
| Modifier and Type | Field and Description | 
|---|---|
| protected java.awt.Component | destinationThe destination of jMe frames. | 
| protected java.beans.PropertyChangeListener | heightListenerThe height listener. | 
| protected java.beans.PropertyChangeListener | rationListenerThe ration listener. | 
| protected java.beans.PropertyChangeListener | widthListenerThe width listener. | 
| Constructor and Description | 
|---|
| AWTFrameProcessor() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | bind(java.awt.Component destination,
    Application application)Bind this processor. | 
| void | bind(java.awt.Component destination,
    Application application,
    ViewPort viewPort)Bind this processor. | 
| void | bind(java.awt.Component destination,
    Application application,
    ViewPort viewPort,
    boolean main)Bind this processor. | 
| protected void | bindDestination(Application application,
               java.awt.Component destination)Bind this processor. | 
| protected void | bindListeners() | 
| void | cleanup()Called when the SP is removed from the RM. | 
| protected AWTComponentRenderer | createFrameTransfer(FrameBuffer frameBuffer,
                   int width,
                   int height)Create a new frame transfer. | 
| protected Application | getApplication()Gets the application. | 
| protected int | getCameraAngle()Gets camera angle. | 
| protected java.awt.Component | getDestination()Gets the current destination. | 
| protected int | getDestinationHeight()Gets destination height. | 
| protected int | getDestinationWidth()Gets destination width. | 
| protected AWTComponentRenderer | getFrameTransfer()Gets the frame transfer. | 
| protected RenderManager | getRenderManager()Gets the render manager. | 
| AWTFrameProcessor.TransferMode | getTransferMode() | 
| protected ViewPort | getViewPort()Gets the view port. | 
| protected boolean | hasApplication()Checks of existing application. | 
| protected boolean | hasDestination()Checks of existing destination. | 
| void | initialize(RenderManager rm,
          ViewPort vp)Called in the render thread to initialize the scene processor. | 
| boolean | isEnabled() | 
| boolean | isInitialized() | 
| boolean | isMain() | 
| protected boolean | isPreserveRatio()Is preserve ratio. | 
| protected void | notifyChangedHeight(java.lang.Number newValue)Notify about that the height was changed. | 
| protected void | notifyChangedRatio(java.lang.Boolean newValue)Notify about that the ratio was changed. | 
| protected void | notifyChangedWidth(java.lang.Number newValue)Notify about that the width was changed. | 
| protected void | notifyComponentResized(int newWidth,
                      int newHeight,
                      boolean fixAspect)Handle resizing. | 
| void | postFrame(FrameBuffer out)Called after a frame has been rendered and the queue flushed. | 
| void | postQueue(RenderQueue rq)Called after the scene graph has been queued, but before it is flushed. | 
| void | preFrame(float tpf)Called before a frame | 
| void | propertyChange(java.beans.PropertyChangeEvent evt) | 
| void | reshape() | 
| void | reshape(ViewPort vp,
       int w,
       int h)Called when the resolution of the viewport has been changed. | 
| protected void | reshapeCurrentViewPort(int width,
                      int height)Reshape the current view port. | 
| protected AWTComponentRenderer | reshapeInThread(int width,
               int height,
               boolean fixAspect)Reshape the current frame transfer for the new size. | 
| protected void | setApplication(Application application)Sets the application. | 
| protected void | setDestination(java.awt.Component destination)Sets the destination. | 
| void | setEnabled(boolean enabled) | 
| protected void | setFrameTransfer(AWTComponentRenderer frameTransfer)Sets the frame transfer. | 
| void | setProfiler(AppProfiler profiler)Sets a profiler Instance for this processor. | 
| void | setTransferMode(AWTFrameProcessor.TransferMode transferMode) | 
| void | unbind()Unbind this processor from its current destination. | 
| protected void | unbindDestination()Unbind this processor from destination. | 
| protected void | unbindListeners() | 
protected java.beans.PropertyChangeListener widthListener
protected java.beans.PropertyChangeListener heightListener
protected java.beans.PropertyChangeListener rationListener
protected volatile java.awt.Component destination
public void initialize(RenderManager rm, ViewPort vp)
SceneProcessorinitialize in interface SceneProcessorrm - The render manager to which the SP was added tovp - The viewport to which the SP is assignedpublic void reshape(ViewPort vp, int w, int h)
SceneProcessorreshape in interface SceneProcessorvp - the affected ViewPortw - the new width (in pixels)h - the new height (in pixels)public boolean isInitialized()
isInitialized in interface SceneProcessorpublic void preFrame(float tpf)
SceneProcessorpreFrame in interface SceneProcessortpf - Time per framepublic void postQueue(RenderQueue rq)
SceneProcessorpostQueue in interface SceneProcessorrq - The render queuepublic void postFrame(FrameBuffer out)
SceneProcessorpostFrame in interface SceneProcessorout - The FB to which the scene was rendered.public void cleanup()
SceneProcessorcleanup in interface SceneProcessorpublic void setProfiler(AppProfiler profiler)
SceneProcessorsetProfiler in interface SceneProcessorprofiler - the profiler instance.public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerprotected void notifyChangedRatio(java.lang.Boolean newValue)
newValue - the new value of the ratio.protected void notifyChangedHeight(java.lang.Number newValue)
newValue - the new value of the height.protected void notifyChangedWidth(java.lang.Number newValue)
newValue - the new value of the width.protected Application getApplication()
protected void setApplication(Application application)
application - the application.protected java.awt.Component getDestination()
protected void setDestination(java.awt.Component destination)
destination - the destination.protected boolean hasDestination()
protected boolean hasApplication()
protected AWTComponentRenderer getFrameTransfer()
protected void setFrameTransfer(AWTComponentRenderer frameTransfer)
frameTransfer - the file transfer.protected ViewPort getViewPort()
protected RenderManager getRenderManager()
public boolean isMain()
public boolean isEnabled()
public void setEnabled(boolean enabled)
protected void notifyComponentResized(int newWidth,
                                      int newHeight,
                                      boolean fixAspect)
newWidth - the new width.newHeight - the new height.fixAspect - true to fix the aspect ratio.public void reshape()
protected boolean isPreserveRatio()
protected int getDestinationWidth()
protected int getDestinationHeight()
public void bind(java.awt.Component destination,
                 Application application)
destination - the destination.application - the application.public void bind(java.awt.Component destination,
                 Application application,
                 ViewPort viewPort)
destination - the destination.application - the application.viewPort - the view port.public void bind(java.awt.Component destination,
                 Application application,
                 ViewPort viewPort,
                 boolean main)
destination - the destination.application - the application.viewPort - the view port.main - true if this processor is main.public void unbind()
protected void bindDestination(Application application, java.awt.Component destination)
application - the application.destination - the destination.protected void unbindDestination()
protected void bindListeners()
protected void unbindListeners()
protected AWTComponentRenderer reshapeInThread(int width, int height, boolean fixAspect)
width - the width.height - the height.fixAspect - true to fix the aspect ratio.protected AWTComponentRenderer createFrameTransfer(FrameBuffer frameBuffer, int width, int height)
frameBuffer - the frame buffer.width - the width.height - the height.protected void reshapeCurrentViewPort(int width,
                                      int height)
width - the width.height - the height.protected int getCameraAngle()
public AWTFrameProcessor.TransferMode getTransferMode()
public void setTransferMode(AWTFrameProcessor.TransferMode transferMode)