Class JoglSwtCanvas

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.opengl.swt.GLCanvas
com.ardor3d.framework.jogl.swt.JoglSwtCanvas
All Implemented Interfaces:
Canvas, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLSharedContextSetter, org.eclipse.swt.graphics.Drawable

public class JoglSwtCanvas extends com.jogamp.opengl.swt.GLCanvas implements Canvas
Ardor3D JOGL SWT heavyweight canvas, SWT control for the OpenGL rendering of Ardor3D with JOGL that supports the SWT input system directly and its abstraction in Ardor3D (com.ardor3d.input.swt)
  • 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

    Fields inherited from interface com.jogamp.opengl.GLAutoDrawable

    SCREEN_CHANGE_ACTION_ENABLED
  • Constructor Summary

    Constructors
    Constructor
    Description
    JoglSwtCanvas(DisplaySettings settings, JoglCanvasRenderer canvasRenderer, CapsUtil capsUtil, org.eclipse.swt.widgets.Composite composite, int style)
     
    JoglSwtCanvas(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.
     
     
    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.opengl.swt.GLCanvas

    addGLEventListener, addGLEventListener, areAllGLEventListenerInitialized, create, createContext, destroy, display, dispose, disposeGLEventListener, flushGLRunnables, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getHandle, getNativeSurface, getRequestedGLCapabilities, getSurfaceHeight, getSurfaceWidth, getUpstreamLock, getUpstreamWidget, invoke, invoke, isGLOriented, isRealized, isThreadGLCapable, main, removeGLEventListener, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setExclusiveContextThread, setGL, setGLEventListenerInitState, setRealized, setSharedAutoDrawable, setSharedContext, swapBuffers, toString, update, updateSizeCheck, validateDrawableAndContextWithCheck

    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, forceFocus, 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, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, 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

    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
    • setVSyncEnabled

      public void setVSyncEnabled(boolean enabled)