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.AccessibleAWTPanelContainer.AccessibleAWTContainerComponent.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_ALIGNMENTABORT, 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, getAccessibleContextadd, 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, validateTreeaction, 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, transferFocusUpCycleprotected 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)
ICanvasCamera.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 ICanvasScalableSurface#setSurfaceScale(float[])} in JOGL javadoc for
more informationspublic com.jogamp.newt.opengl.GLWindow getWindow()
public com.jogamp.newt.awt.NewtCanvasAWT getCanvas()
public com.jogamp.opengl.GLDrawable getDrawable()
ICanvasgetDrawable in interface ICanvaspublic void dispose()
ICanvaspublic void display()
display in interface IScreenCanvaspublic void forceRepaint()
ICanvasforceRepaint in interface ICanvaspublic com.jogamp.opengl.GLAnimatorControl getAnimator()
getAnimator in interface IScreenCanvaspublic com.jogamp.opengl.util.texture.TextureData screenshot()
ICanvasscreenshot in interface ICanvaspublic com.jogamp.opengl.util.texture.TextureData screenshot(File file) throws IOException
screenshot in interface ICanvasIOExceptionpublic String getDebugInfo()
getDebugInfo in interface ICanvaspublic int getRendererWidth()
getRendererWidth in interface ICanvaspublic int getRendererHeight()
getRendererHeight in interface ICanvaspublic Renderer3d getRenderer()
getRenderer in interface ICanvaspublic 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)
ICanvasaddMouseController in interface ICanvaspublic void addKeyController(Object o)
ICanvasaddKeyController in interface ICanvaspublic void removeMouseController(Object o)
ICanvasremoveMouseController in interface ICanvaspublic void removeKeyController(Object o)
ICanvasremoveKeyController in interface ICanvasCopyright © 2016. All rights reserved.