Interface Canvas

All Known Subinterfaces:
NativeCanvas
All Known Implementing Classes:
JoglAwtCanvas, JoglAwtWindow, JoglNewtAwtCanvas, JoglNewtSwtCanvas, JoglNewtWindow, JoglSwingCanvas, JoglSwtCanvas, SwtCanvas

public interface Canvas
This interface defines the View, and should maybe be called the ViewUpdater. It owns the rendering phase, and controls all interactions with the Renderer.
  • Method Details

    • init

      void init()
      Do work to initialize this canvas, generally setting up the associated CanvasRenderer, etc.
    • draw

      void draw(CountDownLatch latch)
      Ask the canvas to render itself. Note that this may occur in another thread and therefore a latch is given so the caller may know when the draw has completed.
      Parameters:
      latch - a counter that should be decremented once drawing has completed.
    • getCanvasRenderer

      CanvasRenderer getCanvasRenderer()
      Returns:
      the CanvasRenderer associated with this Canvas.
    • getMouseManager

      MouseManager getMouseManager()
      Returns:
      the MouseManager associated with this Canvas, if any
    • setMouseManager

      void setMouseManager(MouseManager manager)
      Sets a MouseManager to be associated with this Canvas.
      Parameters:
      manager - the manager to associate