public class InteractiveGLDisplayCanvas<C extends Component & com.jogamp.opengl.GLAutoDrawable> extends Object implements bdv.viewer.InteractiveDisplay
Component (either GLJPanel or GLCanvas) that
is used to display rendered images using JOGL.
InteractiveGLDisplay has a TransformEventHandler that is
notified when the component size is changed.
addHandler(java.lang.Object)/removeHandler(java.lang.Object) provide simplified adding/removing
of handlers that implement MouseListener, KeyListener, etc.
| Modifier and Type | Class and Description |
|---|---|
static interface |
InteractiveGLDisplayCanvas.CanvasSizeListener
Receive notifications about changes of the canvas size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGLEventListener(com.jogamp.opengl.GLEventListener listener) |
void |
addHandler(Object h)
Add new event handler.
|
org.scijava.listeners.Listeners<InteractiveGLDisplayCanvas.CanvasSizeListener> |
canvasSizeListeners()
CanvasSizeListeners can be added/removed here.
|
static InteractiveGLDisplayCanvas<com.jogamp.opengl.awt.GLCanvas> |
createGLCanvas(int width,
int height)
Create a new
InteractiveDisplayCanvas with a GLCanvas. |
static InteractiveGLDisplayCanvas<com.jogamp.opengl.awt.GLJPanel> |
createGLJPanel(int width,
int height)
Create a new
InteractiveDisplayCanvas with a GLJPanel. |
void |
display() |
C |
getComponent()
Implementing classes extend
Component and return this. |
int |
getHeight() |
Dimension |
getSize() |
int |
getWidth() |
org.scijava.listeners.Listeners<bdv.viewer.OverlayRenderer> |
overlays() |
void |
removeHandler(Object h)
Remove an event handler.
|
boolean |
requestFocusInWindow() |
void |
setTransformEventHandler(bdv.TransformEventHandler transformEventHandler)
Set the
TransformEventHandler that will be notified when component is resized. |
boolean |
yAxisFlipped() |
public static InteractiveGLDisplayCanvas<com.jogamp.opengl.awt.GLCanvas> createGLCanvas(int width, int height)
InteractiveDisplayCanvas with a GLCanvas.width - preferred component width.height - preferred component height.public static InteractiveGLDisplayCanvas<com.jogamp.opengl.awt.GLJPanel> createGLJPanel(int width, int height)
InteractiveDisplayCanvas with a GLJPanel.width - preferred component width.height - preferred component height.public org.scijava.listeners.Listeners<InteractiveGLDisplayCanvas.CanvasSizeListener> canvasSizeListeners()
public org.scijava.listeners.Listeners<bdv.viewer.OverlayRenderer> overlays()
overlays in interface bdv.viewer.InteractiveDisplaypublic void addHandler(Object h)
handler calls Component.addKeyListener(KeyListener),
Component.addMouseListener(MouseListener),
Component.addMouseMotionListener(MouseMotionListener),
Component.addMouseWheelListener(MouseWheelListener).addHandler in interface bdv.viewer.InteractiveDisplayh - handler to removepublic void removeHandler(Object h)
handler calls
Component.removeKeyListener(KeyListener),
Component.removeMouseListener(MouseListener),
Component.removeMouseMotionListener(MouseMotionListener),
Component.removeMouseWheelListener(MouseWheelListener).removeHandler in interface bdv.viewer.InteractiveDisplayh - handler to removepublic void setTransformEventHandler(bdv.TransformEventHandler transformEventHandler)
TransformEventHandler that will be notified when component is resized.transformEventHandler - handler to usepublic boolean yAxisFlipped()
public void addGLEventListener(com.jogamp.opengl.GLEventListener listener)
public void display()
public boolean requestFocusInWindow()
public int getWidth()
public int getHeight()
public Dimension getSize()
Copyright © 2018–2025 BigDataViewer. All rights reserved.