Class PanamaGLCanvasSupport

java.lang.Object
org.jzy3d.plot3d.rendering.canvas.PanamaGLCanvasSupport

public class PanamaGLCanvasSupport extends Object
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 Details

    • owner

      protected IScreenCanvas owner
    • glCanvas

      protected panamagl.canvas.GLCanvas glCanvas
    • view

      protected View view
    • renderer

      protected Renderer3D renderer
    • animator

      protected IAnimator animator
    • PENDING_RENDERING_TIMEOUT_MS

      protected static final long PENDING_RENDERING_TIMEOUT_MS
      See Also:
  • Constructor Details

  • Method Details

    • getView

      public View getView()
    • getAnimator

      public IAnimator getAnimator()
    • getRenderer

      public Renderer3D 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

      public Object screenshot()
      Return the last rendered image, once renderings requested before this call are done.
      Returns:
      a BufferedImage for AWT based canvases, or null if nothing was rendered yet.
    • screenshot

      public void screenshot(File file) throws IOException
      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

      public String getDebugInfo()
      OpenGL version, vendor and renderer of the canvas context, or null before initialization.
    • dispose

      public void dispose()