public class NewtSwtGlimpseCanvas extends org.eclipse.swt.widgets.Composite implements NewtGlimpseCanvas
Constructor and Description |
---|
NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent,
javax.media.opengl.GLContext context,
int options) |
NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent,
javax.media.opengl.GLProfile glProfile,
javax.media.opengl.GLContext context,
int options)
Deprecated.
Use
NewtSwtGlimpseCanvas(Composite, GLContext, int) instead. The context implicitly provides a GLProfile. |
NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent,
javax.media.opengl.GLProfile profile,
int options) |
NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent,
String profile,
javax.media.opengl.GLContext context,
int options)
Deprecated.
Use
NewtSwtGlimpseCanvas(Composite, GLContext, int) instead. The context implicitly provides a GLProfile. |
Modifier and Type | Method and Description |
---|---|
void |
addDisposeListener(javax.media.opengl.GLRunnable runnable)
Called when
GLEventListener.dispose(GLAutoDrawable) event is fired by the GLAutoDrawable associated with the
GlimpseCanvas. |
void |
addDisposeListener(org.eclipse.swt.widgets.Shell shell,
javax.media.opengl.GLAutoDrawable sharedContextSource) |
void |
addLayout(GlimpseLayout layout)
Adds a sub-layout to this GlimpseTarget which will only paint in a region of this GlimpseTarget
based on its layout constraints.
|
void |
addLayout(GlimpseLayout layout,
int zOrder) |
void |
destroy()
Destroys the native surface which this canvas draws to.
|
void |
dispose()
A convenience method which is equivalent to:
disposeAttached( );
destroy( );
|
void |
disposeAttached()
Disposes native resources of GlimpseLayouts and GlimpsePainters associated with the GlimpseCanvas.
|
void |
disposePainter(GlimpsePainter painter)
Calls
GlimpsePainter.dispose(GlimpseContext) the next time the GLContext associated with
this GlimpseCanvas is active. |
com.jogamp.newt.swt.NewtCanvasSWT |
getCanvas() |
Dimension |
getDimension() |
javax.media.opengl.GLContext |
getGLContext() |
javax.media.opengl.GLAutoDrawable |
getGLDrawable() |
GlimpseContext |
getGlimpseContext() |
javax.media.opengl.GLProfile |
getGLProfile() |
com.jogamp.newt.opengl.GLWindow |
getGLWindow() |
int[] |
getSurfaceScale()
Returns the scale factors needed to convert the _native_ pixel coordinates to
the _window_ pixel coordinates.
|
GlimpseBounds |
getTargetBounds() |
GlimpseBounds |
getTargetBounds(GlimpseTargetStack stack)
Returns the cached or calculated bounds of this GlimpseTarget for a particular context.
|
List<GlimpseTarget> |
getTargetChildren() |
void |
init(org.eclipse.swt.widgets.Composite parent,
javax.media.opengl.GLProfile glProfile,
javax.media.opengl.GLContext context,
int options) |
boolean |
isDestroyed() |
boolean |
isEventConsumer()
Sets whether this GlimpseTarget hides events from GlimpseTargets under it.
|
boolean |
isEventGenerator()
Sets whether this GlimpseTarget generates GlimpseMouseEvents.
|
void |
paint()
Lays out any
GlimpseLayout instances
attached to the GlimpseCanvas and paints all
GlimpsePainter instances attached
to the GlimpseLayouts. |
void |
removeAllLayouts()
Clears the canvas, removing all attached GlimpseLayouts.
|
void |
removeLayout(GlimpseLayout layout)
Removes a previously added layout from this GlimpseTarget.
|
void |
setEventConsumer(boolean consume)
Set whether or not this GlimpseTarget will consume or pass through mouse events.
|
void |
setEventGenerator(boolean generate)
Set whether or not this GlimpseTarget will generate GlimpseMouseEvents.
|
void |
setLookAndFeel(LookAndFeel laf)
Sets the LookAndFeel for this GlimpseTarget and all child GlimpseTargets.
|
void |
setZOrder(GlimpseLayout layout,
int zOrder) |
String |
toString() |
changed, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getBorderWidth, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, 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, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isVisible
public NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent, javax.media.opengl.GLProfile profile, int options)
public NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent, javax.media.opengl.GLContext context, int options)
@Deprecated public NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent, javax.media.opengl.GLProfile glProfile, javax.media.opengl.GLContext context, int options)
NewtSwtGlimpseCanvas(Composite, GLContext, int)
instead. The context implicitly provides a GLProfile.@Deprecated public NewtSwtGlimpseCanvas(org.eclipse.swt.widgets.Composite parent, String profile, javax.media.opengl.GLContext context, int options)
NewtSwtGlimpseCanvas(Composite, GLContext, int)
instead. The context implicitly provides a GLProfile.public void init(org.eclipse.swt.widgets.Composite parent, javax.media.opengl.GLProfile glProfile, javax.media.opengl.GLContext context, int options)
public void addDisposeListener(org.eclipse.swt.widgets.Shell shell, javax.media.opengl.GLAutoDrawable sharedContextSource)
public com.jogamp.newt.swt.NewtCanvasSWT getCanvas()
public javax.media.opengl.GLProfile getGLProfile()
getGLProfile
in interface GlimpseCanvas
public javax.media.opengl.GLAutoDrawable getGLDrawable()
getGLDrawable
in interface GlimpseCanvas
public com.jogamp.newt.opengl.GLWindow getGLWindow()
getGLWindow
in interface NewtGlimpseCanvas
public GlimpseContext getGlimpseContext()
getGlimpseContext
in interface GlimpseCanvas
public void setLookAndFeel(LookAndFeel laf)
GlimpseTarget
setLookAndFeel
in interface GlimpseTarget
public void addLayout(GlimpseLayout layout)
GlimpseTarget
addLayout
in interface GlimpseTarget
public void addLayout(GlimpseLayout layout, int zOrder)
addLayout
in interface GlimpseTarget
public void setZOrder(GlimpseLayout layout, int zOrder)
setZOrder
in interface GlimpseTarget
public void removeLayout(GlimpseLayout layout)
GlimpseTarget
removeLayout
in interface GlimpseTarget
public void removeAllLayouts()
GlimpseTarget
removeAllLayouts
in interface GlimpseTarget
public List<GlimpseTarget> getTargetChildren()
getTargetChildren
in interface GlimpseTarget
public Dimension getDimension()
public GlimpseBounds getTargetBounds(GlimpseTargetStack stack)
GlimpseTarget
getTargetBounds
in interface GlimpseTarget
public GlimpseBounds getTargetBounds()
getTargetBounds
in interface GlimpseCanvas
public void paint()
GlimpseCanvas
GlimpseLayout
instances
attached to the GlimpseCanvas and paints all
GlimpsePainter
instances attached
to the GlimpseLayouts.paint
in interface GlimpseCanvas
public javax.media.opengl.GLContext getGLContext()
getGLContext
in interface GlimpseCanvas
public String toString()
toString
in class org.eclipse.swt.widgets.Widget
public boolean isEventConsumer()
GlimpseTarget
isEventConsumer
in interface GlimpseTarget
public void setEventConsumer(boolean consume)
GlimpseTarget
setEventConsumer
in interface GlimpseTarget
public boolean isEventGenerator()
GlimpseTarget
GlimpseTarget.isEventConsumer()
).isEventGenerator
in interface GlimpseTarget
public void setEventGenerator(boolean generate)
GlimpseTarget
setEventGenerator
in interface GlimpseTarget
public boolean isDestroyed()
isDestroyed
in interface GlimpseCanvas
#dispose()
has been successfully called. Once true, this GlimpseCanvas is no longer valid for rendering.public void destroy()
GlimpseCanvas
#disposeAttached()
.destroy
in interface GlimpseCanvas
GlimpseCanvas.disposeAttached()
public void addDisposeListener(javax.media.opengl.GLRunnable runnable)
GlimpseCanvas
GLEventListener.dispose(GLAutoDrawable)
event is fired by the GLAutoDrawable
associated with the
GlimpseCanvas. This can happen for reasons other than the window containing the GlimpseCanvas being closed (for example, moving
the window between physical monitors or moving the container between docks in a docking framework). Thus, GlimpsePainters and
GlimpseLayouts attached to this GlimpseCanvas should generally not be disposed when this callback occurs.addDisposeListener
in interface GlimpseCanvas
public void dispose()
GlimpseCanvas
disposeAttached( );
destroy( );
dispose
in interface GlimpseCanvas
dispose
in class org.eclipse.swt.widgets.Widget
public void disposeAttached()
GlimpseCanvas
disposeAttached
in interface GlimpseCanvas
GlimpseCanvas.destroy()
public void disposePainter(GlimpsePainter painter)
GlimpseCanvas
Calls GlimpsePainter.dispose(GlimpseContext)
the next time the GLContext associated with
this GlimpseCanvas is active. Generally this call is equivalent to:
this.getGLDrawable( ).invoke( false, new GLRunnable( )
{
disposePainter
in interface GlimpseCanvas
public int[] getSurfaceScale()
GlimpseCanvas
getSurfaceScale
in interface GlimpseCanvas
Copyright © 2016 Metron, Inc.. All rights reserved.