Class JoglAwtWindow

All Implemented Interfaces:
Canvas, NativeCanvas, ImageObserver, MenuContainer, Serializable, Accessible

public class JoglAwtWindow extends Frame implements NativeCanvas
A canvas implementation for use with AWT JOGL windows.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • addKeyListener

      public void addKeyListener(KeyListener l)
      Overrides:
      addKeyListener in class Component
    • addMouseListener

      public void addMouseListener(MouseListener l)
      Overrides:
      addMouseListener in class Component
    • addMouseMotionListener

      public void addMouseMotionListener(MouseMotionListener l)
      Overrides:
      addMouseMotionListener in class Component
    • addMouseWheelListener

      public void addMouseWheelListener(MouseWheelListener l)
      Overrides:
      addMouseWheelListener in class Component
    • addFocusListener

      public void addFocusListener(FocusListener l)
      Overrides:
      addFocusListener in class Component
    • init

      public void init()
      Description copied from interface: Canvas
      Do work to initialize this canvas, generally setting up the associated CanvasRenderer, etc.
      Specified by:
      init in interface Canvas
    • privateInit

      protected void privateInit()
    • draw

      public void draw(CountDownLatch latch)
      Description copied from interface: Canvas
      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.
      Specified by:
      draw in interface Canvas
      Parameters:
      latch - a counter that should be decremented once drawing has completed.
    • getCanvasRenderer

      public CanvasRenderer getCanvasRenderer()
      Specified by:
      getCanvasRenderer in interface Canvas
      Returns:
      the CanvasRenderer associated with this Canvas.
    • getMouseManager

      public MouseManager getMouseManager()
      Specified by:
      getMouseManager in interface Canvas
      Returns:
      the MouseManager associated with this Canvas, if any
    • setMouseManager

      public void setMouseManager(MouseManager manager)
      Description copied from interface: Canvas
      Sets a MouseManager to be associated with this Canvas.
      Specified by:
      setMouseManager in interface Canvas
      Parameters:
      manager - the manager to associate
    • close

      public void close()
      Description copied from interface: NativeCanvas
      close shutdowns and destroys any window contexts.
      Specified by:
      close in interface NativeCanvas
    • isActive

      public boolean isActive()
      Description copied from interface: NativeCanvas
      isActive returns true if the display is active.
      Specified by:
      isActive in interface NativeCanvas
      Overrides:
      isActive in class Window
      Returns:
      whether the display system is active.
    • isClosing

      public boolean isClosing()
      Description copied from interface: NativeCanvas
      isClosing notifies if the window is currently closing. This could be caused via the application itself or external interrupts such as alt-f4 etc.
      Specified by:
      isClosing in interface NativeCanvas
      Returns:
      true if the window is closing, false otherwise.
    • moveWindowTo

      public void moveWindowTo(int locX, int locY)
      Description copied from interface: NativeCanvas
      If running in windowed mode, move the window's position to the given display coordinates in window units.
      Specified by:
      moveWindowTo in interface NativeCanvas
      Parameters:
      locX - the x value of the location
      locY - the y value of the location
    • setIcon

      public void setIcon(Image[] iconImages)
      Description copied from interface: NativeCanvas
      Sets one or more icons for the Canvas. As a reference for usual platforms on number of icons and their sizes:
      • On Windows you should supply at least one 16x16 image and one 32x32.
      • Linux (and similar platforms) expect one 32x32 image.
      • Mac OS X should be supplied one 128x128 image.
      Images should be in format RGBA8888. If they are not ardor3d will try to convert them using ImageUtils. If that fails a Ardor3dException could be thrown.
      Specified by:
      setIcon in interface NativeCanvas
      Parameters:
      iconImages - Array of Images to be used as icons.
    • setVSyncEnabled

      public void setVSyncEnabled(boolean enabled)
      Description copied from interface: NativeCanvas
      setVSyncEnabled attempts to enable or disable monitor vertical synchronization. The method is a "best attempt" to change the monitor vertical refresh synchronization, and is not guaranteed to be successful. This is dependent on OS.
      Specified by:
      setVSyncEnabled in interface NativeCanvas
      Parameters:
      enabled - true to synchronize, false to ignore synchronization