Class JoglNewtSwtCanvas

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
com.jogamp.newt.swt.NewtCanvasSWT
com.ardor3d.framework.jogl.swt.JoglNewtSwtCanvas
All Implemented Interfaces:
Canvas, NewtWindowContainer, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.nativewindow.NativeWindowHolder, com.jogamp.nativewindow.WindowClosingProtocol, org.eclipse.swt.graphics.Drawable

public class JoglNewtSwtCanvas extends com.jogamp.newt.swt.NewtCanvasSWT implements Canvas, NewtWindowContainer
Ardor3D JOGL SWT lightweight canvas, SWT control for the OpenGL rendering of Ardor3D with JOGL that supports both NEWT and SWT input systems directly and their abstractions in Ardor3D (com.ardor3d.input.jogl and com.ardor3d.input.swt)
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.jogamp.nativewindow.WindowClosingProtocol

    com.jogamp.nativewindow.WindowClosingProtocol.WindowClosingMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected MouseManager
     

    Fields inherited from class org.eclipse.swt.widgets.Composite

    embeddedHandle

    Fields inherited from class org.eclipse.swt.widgets.Widget

    handle
  • Constructor Summary

    Constructors
    Constructor
    Description
    JoglNewtSwtCanvas(DisplaySettings settings, JoglCanvasRenderer canvasRenderer, CapsUtil capsUtil, org.eclipse.swt.widgets.Composite composite, int style)
     
    JoglNewtSwtCanvas(DisplaySettings settings, JoglCanvasRenderer canvasRenderer, org.eclipse.swt.widgets.Composite composite, int style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Ask the canvas to render itself.
     
     
    com.jogamp.newt.opengl.GLWindow
     
    void
    Do work to initialize this canvas, generally setting up the associated CanvasRenderer, etc.
    void
    Sets a MouseManager to be associated with this Canvas.
    void
    setVSyncEnabled(boolean enabled)
     

    Methods inherited from class com.jogamp.newt.swt.NewtCanvasSWT

    create, dispose, forceFocus, getDefaultCloseOperation, getNativeSurface, getNativeWindow, getNEWTChild, isNativeValid, setBounds, setDefaultCloseOperation, setNEWTChild, setParent, update, updatePosSizeCheck, validateNative

    Methods inherited from class org.eclipse.swt.widgets.Canvas

    drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME

    Methods inherited from class org.eclipse.swt.widgets.Composite

    changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList

    Methods inherited from class org.eclipse.swt.widgets.Scrollable

    computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar

    Methods inherited from class org.eclipse.swt.widgets.Control

    addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse

    Methods inherited from class org.eclipse.swt.widgets.Widget

    addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.swt.graphics.Drawable

    isAutoScalable
  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • 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 JoglCanvasRenderer 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
    • getNewtWindow

      public com.jogamp.newt.opengl.GLWindow getNewtWindow()
      Specified by:
      getNewtWindow in interface NewtWindowContainer
    • setVSyncEnabled

      public void setVSyncEnabled(boolean enabled)