Class FrameHandler

java.lang.Object
com.ardor3d.framework.FrameHandler

public final class FrameHandler extends Object
Does the work needed in a given frame.
  • Constructor Details

    • FrameHandler

      public FrameHandler(Timer timer)
  • Method Details

    • updateFrame

      public void updateFrame()
    • addUpdater

      public void addUpdater(Updater updater)
      Add an updater to the frame handler.

      The frame handler calls the update method of each updater that has been added to it once per frame, before rendering begins.

      Note: that is the frame handler has already been initialized then the updater will not have it's init method called automatically, it is up to the client code to perform any initialization explicitly under this scenario.

      Parameters:
      updater - the updater to add.
    • removeUpdater

      public boolean removeUpdater(Updater updater)
      Remove an updater from the frame handler.
      Parameters:
      updater - the updater to remove.
      Returns:
      true if the updater was removed, false otherwise (which will happen if, for example, the updater had not previously been added to the frame handler).
    • addCanvas

      public void addCanvas(Canvas canvas)
      Add a canvas to the frame handler.

      The frame handler calls the Canvas.draw(java.util.concurrent.CountDownLatch) draw} method of each canvas that has been added to it once per frame, after updating is complete.

      Note: that is the frame handler has already been initialized then the canvas will not have it's init method called automatically, it is up to the client code to perform any initialization explicitly under this scenario.

      Parameters:
      canvas - the canvas to add.
    • removeCanvas

      public boolean removeCanvas(Canvas canvas)
      Remove a canvas from the frame handler.
      Parameters:
      canvas - the canvas to remove.
      Returns:
      true if the canvas was removed, false otherwise (which will happen if, for example, the canvas had not previously been added to the frame handler).
    • init

      public void init()
    • getTimeoutSeconds

      public long getTimeoutSeconds()
    • setTimeoutSeconds

      public void setTimeoutSeconds(long timeoutSeconds)
    • getTimer

      public Timer getTimer()