public class CanvasNewtAwt extends Panel implements IScreenCanvas
Panel
.
Newt is supposed to be faster than any other canvas, either for AWT or Swing.
If a non AWT panel where required, follow the guidelines given in
IScreenCanvas
documentation.Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected com.jogamp.opengl.util.Animator |
animator |
protected com.jogamp.newt.awt.NewtCanvasAWT |
canvas |
protected Renderer3d |
renderer |
protected View |
view |
protected com.jogamp.newt.opengl.GLWindow |
window |
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
CanvasNewtAwt(IChartComponentFactory factory,
Scene scene,
Quality quality,
com.jogamp.opengl.GLCapabilitiesImmutable glci) |
CanvasNewtAwt(IChartComponentFactory factory,
Scene scene,
Quality quality,
com.jogamp.opengl.GLCapabilitiesImmutable glci,
boolean traceGL,
boolean debugGL) |
Modifier and Type | Method and Description |
---|---|
void |
addKeyController(Object o)
A generic interface for mouse listener to remain Windowing toolkit
independant. * Implementation of this method should simply cast the input
assuming it will correspond to canvas-compatible mouse listener.
|
void |
addKeyListener(com.jogamp.newt.event.KeyListener l) |
void |
addMouseController(Object o)
A generic interface for mouse listener to remain Windowing toolkit
independant. * Implementation of this method should simply cast the input
assuming it will correspond to canvas-compatible mouse listener.
|
void |
addMouseListener(com.jogamp.newt.event.MouseListener l) |
void |
display() |
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).
|
com.jogamp.opengl.GLAnimatorControl |
getAnimator() |
com.jogamp.newt.awt.NewtCanvasAWT |
getCanvas() |
String |
getDebugInfo() |
com.jogamp.opengl.GLDrawable |
getDrawable()
Returns the GLDrawable associated with the canvas
|
Renderer3d |
getRenderer() |
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.
|
com.jogamp.newt.opengl.GLWindow |
getWindow() |
void |
removeKeyController(Object o)
A generic interface for key listener to remain Windowing toolkit
independant. * Implementation of this method should simply cast the input
assuming it will correspond to canvas-compatible key listener.
|
void |
removeKeyListener(com.jogamp.newt.event.KeyListener l) |
void |
removeMouseController(Object o)
A generic interface for key listener to remain Windowing toolkit
independant. * Implementation of this method should simply cast the input
assuming it will correspond to canvas-compatible key listener.
|
void |
removeMouseListener(com.jogamp.newt.event.MouseListener l) |
com.jogamp.opengl.util.texture.TextureData |
screenshot()
Returns an image with the current renderer's size
|
com.jogamp.opengl.util.texture.TextureData |
screenshot(File file) |
void |
setPixelScale(float[] scale)
Defines pixel scale.
|
addNotify, getAccessibleContext
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected View view
protected Renderer3d renderer
protected com.jogamp.opengl.util.Animator animator
protected com.jogamp.newt.opengl.GLWindow window
protected com.jogamp.newt.awt.NewtCanvasAWT canvas
public CanvasNewtAwt(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci)
public CanvasNewtAwt(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci, boolean traceGL, boolean debugGL)
public void setPixelScale(float[] scale)
ICanvas
Camera.screenToModel(com.jogamp.opengl.GL, com.jogamp.opengl.glu.GLU, org.jzy3d.maths.Coord3d)
output wrong result.
When running on Retina display, those two options fixed buggy mouse
selections on Retina:
setPixelScale
in interface ICanvas
ScalableSurface#setSurfaceScale(float[])} in JOGL javadoc for
more informations
public com.jogamp.newt.opengl.GLWindow getWindow()
public com.jogamp.newt.awt.NewtCanvasAWT getCanvas()
public com.jogamp.opengl.GLDrawable getDrawable()
ICanvas
getDrawable
in interface ICanvas
public void dispose()
ICanvas
public void display()
display
in interface IScreenCanvas
public void forceRepaint()
ICanvas
forceRepaint
in interface ICanvas
public com.jogamp.opengl.GLAnimatorControl getAnimator()
getAnimator
in interface IScreenCanvas
public com.jogamp.opengl.util.texture.TextureData screenshot()
ICanvas
screenshot
in interface ICanvas
public com.jogamp.opengl.util.texture.TextureData screenshot(File file) throws IOException
screenshot
in interface ICanvas
IOException
public String getDebugInfo()
getDebugInfo
in interface ICanvas
public int getRendererWidth()
getRendererWidth
in interface ICanvas
public int getRendererHeight()
getRendererHeight
in interface ICanvas
public Renderer3d getRenderer()
getRenderer
in interface ICanvas
public View getView()
public void addKeyListener(com.jogamp.newt.event.KeyListener l)
public void addMouseListener(com.jogamp.newt.event.MouseListener l)
public void removeMouseListener(com.jogamp.newt.event.MouseListener l)
public void removeKeyListener(com.jogamp.newt.event.KeyListener l)
public void addMouseController(Object o)
ICanvas
addMouseController
in interface ICanvas
public void addKeyController(Object o)
ICanvas
addKeyController
in interface ICanvas
public void removeMouseController(Object o)
ICanvas
removeMouseController
in interface ICanvas
public void removeKeyController(Object o)
ICanvas
removeKeyController
in interface ICanvas
Copyright © 2016. All rights reserved.