|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas javax.media.opengl.GLCanvas org.jzy3d.plot3d.rendering.canvas.CanvasAWT
public class CanvasAWT
A ICanvas
embed an OpenGL 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 Canvas3d 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 Canvas silently adds a Renderer3d
as its GLEventListener and
hide its management for the user.
The Canvas3d last provide an animator that is explicitely stopped when Canvas3d 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.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
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,
boolean traceGL,
boolean debugGL)
Initialize a Canvas3d 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. |
java.awt.image.BufferedImage |
screenshot()
Returns an image with the current renderer's size |
Methods inherited from class javax.media.opengl.GLCanvas |
---|
addGLEventListener, addNotify, createContext, display, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getGL, paint, removeGLEventListener, removeNotify, reshape, setAutoSwapBufferMode, setGL, setRealized, swapBuffers, update |
Methods inherited from class java.awt.Canvas |
---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jzy3d.plot3d.rendering.canvas.IScreenCanvas |
---|
display |
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.GLAutoDrawable |
---|
repaint |
Methods inherited from interface javax.media.opengl.GLDrawable |
---|
getHeight, getWidth, setSize |
Methods inherited from interface javax.media.opengl.ComponentEvents |
---|
addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public CanvasAWT(Scene scene, Quality quality)
public CanvasAWT(Scene scene, Quality quality, boolean traceGL, boolean debugGL)
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 java.awt.image.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 |