Class PanamaGLCanvasSupport
java.lang.Object
org.jzy3d.plot3d.rendering.canvas.PanamaGLCanvasSupport
Toolkit-agnostic composition helper shared by all
IPanamaGLCanvas
implementations (Swing, JavaFX, SWT). It holds the non-UI state of a
PanamaGL canvas (view, renderer, animator, GLCanvas) and exposes the
lifecycle operations that do not depend on the hosting component.
Toolkit-specific canvases compose with this class to avoid duplicating
the view/renderer/animator wiring.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IAnimatorprotected panamagl.canvas.GLCanvasprotected IScreenCanvasprotected static final longprotected Renderer3Dprotected View -
Constructor Summary
ConstructorsConstructorDescriptionPanamaGLCanvasSupport(IScreenCanvas owner, IChartFactory factory, Scene scene, Quality quality, panamagl.canvas.GLCanvas glCanvas) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplay()voiddispose()voidOpenGL version, vendor and renderer of the canvas context, or null before initialization.panamagl.canvas.GLCanvaspanamagl.GLEventListenergetView()Return the last rendered image, once renderings requested before this call are done.voidscreenshot(File file) Write the last rendered image to a PNG file.voidsetGLEventListener(panamagl.GLEventListener listener) voidWait until the renderings that were requested before this call are done, by queuing a task on the thread rendering the canvas.
-
Field Details
-
owner
-
glCanvas
protected panamagl.canvas.GLCanvas glCanvas -
view
-
renderer
-
animator
-
PENDING_RENDERING_TIMEOUT_MS
protected static final long PENDING_RENDERING_TIMEOUT_MS- See Also:
-
-
Constructor Details
-
PanamaGLCanvasSupport
public PanamaGLCanvasSupport(IScreenCanvas owner, IChartFactory factory, Scene scene, Quality quality, panamagl.canvas.GLCanvas glCanvas)
-
-
Method Details
-
getView
-
getAnimator
-
getRenderer
-
getGLCanvas
public panamagl.canvas.GLCanvas getGLCanvas() -
getGLEventListener
public panamagl.GLEventListener getGLEventListener() -
setGLEventListener
public void setGLEventListener(panamagl.GLEventListener listener) -
display
public void display() -
forceRepaint
public void forceRepaint() -
screenshot
Return the last rendered image, once renderings requested before this call are done.- Returns:
- a
BufferedImagefor AWT based canvases, or null if nothing was rendered yet.
-
screenshot
Write the last rendered image to a PNG file.- Throws:
IOException
-
waitForPendingRendering
public void waitForPendingRendering()Wait until the renderings that were requested before this call are done, by queuing a task on the thread rendering the canvas. Return immediately if called from that thread. -
getDebugInfo
OpenGL version, vendor and renderer of the canvas context, or null before initialization. -
dispose
public void dispose()
-