|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
javax.media.opengl.awt.GLCanvas
org.jzy3d.plot3d.rendering.canvas.CanvasAWT
public class CanvasAWT
A ICanvas
embed a Renderer3d
for handling GL events,
a mouse and keyboard controllers for setting the viewpoint
(inheriting ViewPointController
), and a Scene
storing
the actual Graph
and View
s.
The CanvasAWT
allows getting rid of GL and AWT events by offering a
direct registration of a View
from the referenced Scene.
The View
may be retrieved in order to attach it to a ViewController,
either one of those held by the current canvas, or an other controller
(autonomous, or held by another Canvas).
The CanvasAWT
silently adds a Renderer3d
as its GLEventListener and
hide its management for the user.
The CanvasAWT
last provide an animator that is explicitely stopped
when CanvasAWT
disposes.
This offers the alternative of repaint-on-demand-model based on
Controllers, and repaint-continuously model based on the Animator.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Canvas |
---|
Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Nested classes/interfaces inherited from interface javax.media.nativewindow.WindowClosingProtocol |
---|
javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode |
Field Summary | |
---|---|
protected com.jogamp.opengl.util.Animator |
animator
|
protected Renderer3d |
renderer
|
protected View |
view
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.media.opengl.GLAutoDrawable |
---|
SCREEN_CHANGE_ACTION_ENABLED |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CanvasAWT(Scene scene,
Quality quality)
|
|
CanvasAWT(Scene scene,
Quality quality,
javax.media.opengl.GLCapabilitiesImmutable glci)
|
|
CanvasAWT(Scene scene,
Quality quality,
javax.media.opengl.GLCapabilitiesImmutable glci,
boolean traceGL,
boolean debugGL)
Initialize a CanvasAWT attached to a Scene , with a given rendering Quality . |
Method Summary | |
---|---|
void |
dispose()
Performs all required cleanup when destroying a Canvas. |
void |
forceRepaint()
Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed). |
int |
getRendererHeight()
Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event. |
int |
getRendererWidth()
Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event. |
View |
getView()
Provide a reference to the View that renders into this canvas. |
BufferedImage |
screenshot()
Returns an image with the current renderer's size |
Methods inherited from class javax.media.opengl.awt.GLCanvas |
---|
addGLEventListener, addGLEventListener, addNotify, createContext, destroy, display, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDefaultCloseOperation, getFactory, getGL, getGLProfile, getGraphicsConfiguration, getHandle, getNativeSurface, getRequestedGLCapabilities, getShallUseOffscreenLayer, getThreadName, getUpstreamWidget, invoke, isOffscreenLayerSurfaceEnabled, isRealized, main, paint, removeGLEventListener, removeGLEventListener, removeNotify, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setGL, setRealized, setShallUseOffscreenLayer, swapBuffers, toString, update |
Methods inherited from class java.awt.Canvas |
---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jzy3d.plot3d.rendering.canvas.IScreenCanvas |
---|
display, getAnimator |
Methods inherited from interface org.jzy3d.plot3d.rendering.canvas.ICanvas |
---|
addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener |
Methods inherited from interface javax.media.opengl.awt.AWTGLAutoDrawable |
---|
repaint, setSize |
Methods inherited from interface javax.media.opengl.GLDrawable |
---|
getHeight, getWidth |
Methods inherited from interface javax.media.opengl.awt.ComponentEvents |
---|
addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
protected View view
protected Renderer3d renderer
protected com.jogamp.opengl.util.Animator animator
Constructor Detail |
---|
public CanvasAWT(Scene scene, Quality quality)
public CanvasAWT(Scene scene, Quality quality, javax.media.opengl.GLCapabilitiesImmutable glci)
public CanvasAWT(Scene scene, Quality quality, javax.media.opengl.GLCapabilitiesImmutable glci, boolean traceGL, boolean debugGL)
CanvasAWT
attached to a Scene
, with a given rendering Quality
.
Method Detail |
---|
public void dispose()
ICanvas
dispose
in interface ICanvas
public void forceRepaint()
ICanvas
forceRepaint
in interface ICanvas
public BufferedImage screenshot()
ICanvas
screenshot
in interface ICanvas
public View getView()
getView
in interface ICanvas
public int getRendererWidth()
getRendererWidth
in interface ICanvas
public int getRendererHeight()
getRendererHeight
in interface ICanvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |