Top Description Inners Fields Constructors Methods
com.jogamp.newt.awt

public Class NewtCanvasAWT

extends Canvas
implements WindowClosingProtocol, OffscreenLayerOption, AWTPrintLifecycle
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.awt.AWTPrintLifecycle, com.jogamp.nativewindow.OffscreenLayerOption, com.jogamp.nativewindow.WindowClosingProtocol
Annotations
@SuppressWarnings:serial
Imports
java.applet.Applet, java.awt.AWTKeyStroke, .Canvas, .Component, .EventQueue, .Graphics, .Graphics2D, .GraphicsConfiguration, .GraphicsDevice, .KeyboardFocusManager, java.awt.geom.NoninvertibleTransformException, java.beans.Beans, .PropertyChangeEvent, .PropertyChangeListener, java.lang.reflect.Method, java.security.AccessController, .PrivilegedAction, java.util.Set, com.jogamp.nativewindow.CapabilitiesImmutable, .NativeWindow, .OffscreenLayerOption, .WindowClosingProtocol, com.jogamp.opengl.GLAnimatorControl, .GLAutoDrawable, .GLCapabilities, .GLCapabilitiesImmutable, .GLDrawable, .GLDrawableFactory, .GLException, .GLOffscreenAutoDrawable, javax.swing.MenuSelectionManager, jogamp.nativewindow.awt.AWTMisc, jogamp.nativewindow.jawt.JAWTUtil, jogamp.newt.Debug, .WindowImpl, jogamp.newt.awt.NewtFactoryAWT, jogamp.newt.awt.event.AWTParentWindowAdapter, jogamp.newt.driver.DriverClearFocus, jogamp.opengl.awt.AWTTilePainter, com.jogamp.common.ExceptionUtils, com.jogamp.common.util.awt.AWTEDTExecutor, com.jogamp.nativewindow.awt.AWTGraphicsConfiguration, .AWTPrintLifecycle, .AWTWindowClosingProtocol, .JAWTWindow, com.jogamp.newt.Display, .Window, com.jogamp.newt.event.KeyEvent, .KeyListener, .WindowAdapter, .WindowEvent, .WindowListener, com.jogamp.newt.event.awt.AWTAdapter, .AWTKeyAdapter, .AWTMouseAdapter, com.jogamp.opengl.util.GLDrawableUtil, .TileRenderer

AWT Canvas containing a NEWT Window using native parenting.
Offscreen Layer Remarks
setShallUseOffscreenLayer(true) maybe called to use an offscreen drawable (FBO or PBuffer) allowing the underlying JAWT mechanism to composite the image, if supported.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv class
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private static final Runnable
private final Runnable
awtClearSelectedMenuPath

Must run on AWT-EDT non-blocking, since it invokes tasks on AWT-EDT w/ waiting otherwise.

private volatile AWTGraphicsConfiguration
private final AWTAdapter
private final AWTAdapter
private final AWTParentWindowAdapter
private final AWTWindowClosingProtocol
private final WindowListener
private volatile boolean
componentAdded

Safeguard for AWTWindowClosingProtocol and 'removeNotify()' on other thread than AWT-EDT.

public static final boolean
private boolean
destroyJAWTPending

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

private static boolean
private static Method
private final NewtCanvasAWT.FocusAction
private final NewtCanvasAWT.FocusPropertyChangeListener
private final Runnable
private boolean
private boolean
private volatile JAWTWindow
private volatile KeyboardFocusManager
private Window
private boolean
private WindowClosingProtocol.WindowClosingMode
private final NewtCanvasAWT.FocusTraversalKeyListener
private volatile boolean
private GLAnimatorControl
private AWTTilePainter
private GLAutoDrawable
private final Runnable
private final Runnable
private boolean
private boolean
skipJAWTDestroy

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

private final Object

Constructor Summary

AccessConstructor and Description
public
NewtCanvasAWT()

Instantiates a NewtCanvas without a NEWT child.

public
NewtCanvasAWT(final GraphicsConfiguration gc)

Instantiates a NewtCanvas without a NEWT child.

public
NewtCanvasAWT(final Window child)

Instantiates a NewtCanvas with a NEWT child.

public
NewtCanvasAWT(final GraphicsConfiguration gc, final Window child)

Instantiates a NewtCanvas with a NEWT child.

Method Summary

Modifier and TypeMethod and Description
public void
addNotify()

Overrides java.awt.Canvas.addNotify.

Creates the peer of the canvas.
private final void
private final void
configureNewtChild(final boolean attach)

protected static String
public final void
destroy()

Destroys this resource:

  • Make the NEWT Child invisible
  • Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL
  • Issues destroy() on the NEWT Child
  • Remove reference to the NEWT Child
private final void
destroyImpl(final boolean removeNotify, final boolean windowClosing)

private final void
private final void
private void
public WindowClosingProtocol.WindowClosingMode
private final GLAutoDrawable
public GraphicsConfiguration
getGraphicsConfiguration()

Overrides java.awt.Component.getGraphicsConfiguration.

Gets the GraphicsConfiguration associated with this Component.
public NativeWindow

Returns:

this AWT Canvas NativeWindow representation, may be null in case removeNotify() has been called, or addNotify() hasn't been called yet.
getNativeWindow
()

public Window

Returns:

the current NEWT child
getNEWTChild
()

public final boolean
public final boolean
private static String
public final boolean
isApplet()

Returns true if the AWT component is parented to an java.applet.Applet, otherwise false.

public final boolean
isAWTEventPassThrough()

Returns true if Key and Mouse input events will be passed through AWT, otherwise only the NEWT child will receive them.

private final boolean
public final boolean
isOffscreenLayerSurfaceEnabled()

Implements com.jogamp.nativewindow.OffscreenLayerOption.isOffscreenLayerSurfaceEnabled.

Returns true if this instance uses an offscreen layer, otherwise false.
private final boolean
pack-priv static String
public void
paint(final Graphics
the specified Graphics context
g
)

Overrides java.awt.Canvas.paint.

Paints this canvas.
public void
public void
removeNotify()

Overrides java.awt.Component.removeNotify.

Makes this Component undisplayable by destroying it native screen resource.
private final void
public void
reshape(final int
the x coordinate of the upper left corner of the rectangle
x
,
final int
the y coordinate of the upper left corner of the rectangle
y
,
final int
the width of the rectangle
width
,
final int
the height of the rectangle
height
)

Overrides java.awt.Component.reshape.

Reshapes the bounding rectangle for this component.
private void
public WindowClosingProtocol.WindowClosingMode
public Window

Returns:

the previous attached newt child.
setNEWTChild
(final Window newChild)

Sets a new NEWT child, provoking reparenting.

public void
setShallUseOffscreenLayer(final boolean v)

Implements com.jogamp.nativewindow.OffscreenLayerOption.setShallUseOffscreenLayer.

Request an offscreen layer, if supported.
public final void
setSkipJAWTDestroy(final boolean v)

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

public void
setupPrint(final double
Graphics2D scaling factor, i.e. rendering 1/scaleMatX * width pixels
scaleMatX
,
final double
Graphics2D scaling factor, i.e. rendering 1/scaleMatY * height pixels
scaleMatY
,
final int
multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples
numSamples
,
final int
custom tile width for tile renderer, pass -1 for default.
tileWidth
,
final int
custom tile height for tile renderer, pass -1 for default. FIXME: Add border size !
tileHeight
)

Implements com.jogamp.nativewindow.awt.AWTPrintLifecycle.setupPrint.

Shall be called before PrinterJob#print().
pack-priv static String
toHexString(final long l)

public void
update(final Graphics
the specified Graphics context
g
)

Overrides java.awt.Canvas.update.

Updates this canvas.
private final void
private final boolean
private final boolean
validateComponent(final boolean attachNewtChild)

Inherited from java.awt.Canvas:
createBufferStrategycreateBufferStrategygetAccessibleContextgetBufferStrategy

Field Detail

awtClearGlobalFocusOwnerback to summary
private static final Runnable awtClearGlobalFocusOwner
awtClearSelectedMenuPathback to summary
private final Runnable awtClearSelectedMenuPath

Must run on AWT-EDT non-blocking, since it invokes tasks on AWT-EDT w/ waiting otherwise.

awtConfigback to summary
private volatile AWTGraphicsConfiguration awtConfig
awtKeyAdapterback to summary
private final AWTAdapter awtKeyAdapter
awtMouseAdapterback to summary
private final AWTAdapter awtMouseAdapter
awtWinAdapterback to summary
private final AWTParentWindowAdapter awtWinAdapter
awtWindowClosingProtocolback to summary
private final AWTWindowClosingProtocol awtWindowClosingProtocol
clearAWTMenusOnNewtFocusback to summary
private final WindowListener clearAWTMenusOnNewtFocus
componentAddedback to summary
private volatile boolean componentAdded

Safeguard for AWTWindowClosingProtocol and 'removeNotify()' on other thread than AWT-EDT.

DEBUGback to summary
public static final boolean DEBUG
destroyJAWTPendingback to summary
private boolean destroyJAWTPending

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

disableBackgroundEraseInitializedback to summary
private static boolean disableBackgroundEraseInitialized
disableBackgroundEraseMethodback to summary
private static Method disableBackgroundEraseMethod
focusActionback to summary
private final NewtCanvasAWT.FocusAction focusAction
focusPropertyChangeListenerback to summary
private final NewtCanvasAWT.FocusPropertyChangeListener focusPropertyChangeListener
forceRelayoutback to summary
private final Runnable forceRelayout
isAppletback to summary
private boolean isApplet
isOnscreenback to summary
private boolean isOnscreen
jawtWindowback to summary
private volatile JAWTWindow jawtWindow
keyboardFocusManagerback to summary
private volatile KeyboardFocusManager keyboardFocusManager
newtChildback to summary
private Window newtChild
newtChildAttachedback to summary
private boolean newtChildAttached
newtChildCloseOpback to summary
private WindowClosingProtocol.WindowClosingMode newtChildCloseOp
newtFocusTraversalKeyListenerback to summary
private final NewtCanvasAWT.FocusTraversalKeyListener newtFocusTraversalKeyListener
printActiveback to summary
private volatile boolean printActive
printAnimatorback to summary
private GLAnimatorControl printAnimator
printAWTTilesback to summary
private AWTTilePainter printAWTTiles
printGLADback to summary
private GLAutoDrawable printGLAD
releasePrintOnEDTback to summary
private final Runnable releasePrintOnEDT
setupPrintOnEDTback to summary
private final Runnable setupPrintOnEDT
shallUseOffscreenLayerback to summary
private boolean shallUseOffscreenLayer
skipJAWTDestroyback to summary
private boolean skipJAWTDestroy

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

syncback to summary
private final Object sync

Constructor Detail

NewtCanvasAWTback to summary
public NewtCanvasAWT()

Instantiates a NewtCanvas without a NEWT child.

NewtCanvasAWTback to summary
public NewtCanvasAWT(final GraphicsConfiguration gc)

Instantiates a NewtCanvas without a NEWT child.

NewtCanvasAWTback to summary
public NewtCanvasAWT(final Window child)

Instantiates a NewtCanvas with a NEWT child.

NewtCanvasAWTback to summary
public NewtCanvasAWT(final GraphicsConfiguration gc, final Window child)

Instantiates a NewtCanvas with a NEWT child.

Method Detail

addNotifyback to summary
public void addNotify()

Overrides java.awt.Canvas.addNotify.

Doc from java.awt.Canvas.addNotify.

Creates the peer of the canvas. This peer allows you to change the user interface of the canvas without changing its functionality.

Annotations
@Override
attachNewtChildback to summary
private final void attachNewtChild()
configureNewtChildback to summary
private final void configureNewtChild(final boolean attach)
currentThreadNameback to summary
protected static String currentThreadName()
destroyback to summary
public final void destroy()

Destroys this resource:

  • Make the NEWT Child invisible
  • Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL
  • Issues destroy() on the NEWT Child
  • Remove reference to the NEWT Child
See Also
Window#destroy()
destroyImplback to summary
private final void destroyImpl(final boolean removeNotify, final boolean windowClosing)
detachNewtChildback to summary
private final void detachNewtChild(final Container cont)
determineIfAppletback to summary
private final void determineIfApplet()
disableBackgroundEraseback to summary
private void disableBackgroundErase()
getDefaultCloseOperationback to summary
public WindowClosingProtocol.WindowClosingMode getDefaultCloseOperation()

Implements com.jogamp.nativewindow.WindowClosingProtocol.getDefaultCloseOperation.

Returns:WindowClosingProtocol.WindowClosingMode

Doc from com.jogamp.nativewindow.WindowClosingProtocol.getDefaultCloseOperation.

the current close operation value

Annotations
@Override
getGLADback to summary
private final GLAutoDrawable getGLAD()
getGraphicsConfigurationback to summary
public GraphicsConfiguration getGraphicsConfiguration()

Overrides java.awt.Component.getGraphicsConfiguration.

Doc from java.awt.Component.getGraphicsConfiguration.

Gets the GraphicsConfiguration associated with this Component. If the Component has not been assigned a specific GraphicsConfiguration, the GraphicsConfiguration of the Component object's top-level container is returned. If the Component has been created, but not yet added to a Container, this method returns null.

Overridden to choose a GraphicsConfiguration from a parent container's GraphicsDevice.

Method also intercepts GraphicsConfiguration changes regarding to its capabilities and its GraphicsDevice. This may happen in case the display changes its configuration or the component is moved to another screen.

Returns:GraphicsConfiguration

the GraphicsConfiguration used by this Component or null

Annotations
@Override
getNativeWindowback to summary
public NativeWindow getNativeWindow()
Returns:NativeWindow

this AWT Canvas NativeWindow representation, may be null in case removeNotify() has been called, or addNotify() hasn't been called yet.

getNEWTChildback to summary
public Window getNEWTChild()
Returns:Window

the current NEWT child

getShallUseOffscreenLayerback to summary
public final boolean getShallUseOffscreenLayer()

Implements com.jogamp.nativewindow.OffscreenLayerOption.getShallUseOffscreenLayer.

Doc from com.jogamp.nativewindow.OffscreenLayerOption.getShallUseOffscreenLayer.

Returns the property set by setShallUseOffscreenLayer(boolean).

Annotations
@Override
getSkipJAWTDestroyback to summary
public final boolean getSkipJAWTDestroy()

See setSkipJAWTDestroy(boolean).

getThreadNameback to summary
private static String getThreadName()
isAppletback to summary
public final boolean isApplet()

Returns true if the AWT component is parented to an java.applet.Applet, otherwise false. This information is valid only after addNotify() is issued.

isAWTEventPassThroughback to summary
public final boolean isAWTEventPassThrough()

Returns true if Key and Mouse input events will be passed through AWT, otherwise only the NEWT child will receive them.

Normally only the NEWT child will receive Key and Mouse input events. In offscreen mode, e.g. OSX/CALayer, the AWT events will be received and translated into NEWT events and delivered to the NEWT child window.

Note

AWT key events will consumed in pass-through mode.

isFullscreenback to summary
private final boolean isFullscreen()
isOffscreenLayerSurfaceEnabledback to summary
public final boolean isOffscreenLayerSurfaceEnabled()

Implements com.jogamp.nativewindow.OffscreenLayerOption.isOffscreenLayerSurfaceEnabled.

Doc from com.jogamp.nativewindow.OffscreenLayerOption.isOffscreenLayerSurfaceEnabled.

Returns true if this instance uses an offscreen layer, otherwise false.

This instance is an offscreen layer, if setShallUseOffscreenLayer(true) has been called before it's realization and first lock and the underlying implementation supports it.

The return value is undefined before issuing the first NativeWindow#lockSurface().
Annotations
@Override
isParentback to summary
private final boolean isParent()
newtWinHandleToHexStringback to summary
pack-priv static String newtWinHandleToHexString(final Window w)
paintback to summary
public void paint(final Graphics g)

Overrides java.awt.Canvas.paint.

Doc from java.awt.Canvas.paint.

Paints this canvas.

Most applications that subclass Canvas should override this method in order to perform some useful operation (typically, custom painting of the canvas). The default operation is simply to clear the canvas. Applications that override this method need not call super.paint(g).

Parameters
g:Graphics

the specified Graphics context

Annotations
@Override
releasePrintback to summary
public void releasePrint()

Implements com.jogamp.nativewindow.awt.AWTPrintLifecycle.releasePrint.

Doc from com.jogamp.nativewindow.awt.AWTPrintLifecycle.releasePrint.

Shall be called after PrinterJob#print().

See Usage.

Annotations
@Override
removeNotifyback to summary
public void removeNotify()

Overrides java.awt.Component.removeNotify.

Doc from java.awt.Component.removeNotify.

Makes this Component undisplayable by destroying it native screen resource.

This method is called by the toolkit internally and should not be called directly by programs. Code overriding this method should call super.removeNotify as the first line of the overriding method.

Annotations
@Override
requestFocusNEWTChildback to summary
private final void requestFocusNEWTChild()
reshapeback to summary
public void reshape(final int x, final int y, final int width, final int height)

Overrides java.awt.Component.reshape.

Doc from java.awt.Component.reshape.

Reshapes the bounding rectangle for this component.

Parameters
x:int

the x coordinate of the upper left corner of the rectangle

y:int

the y coordinate of the upper left corner of the rectangle

width:int

the width of the rectangle

height:int

the height of the rectangle

Annotations
@SuppressWarnings:deprecation
@Override
setAWTGraphicsConfigurationback to summary
private void setAWTGraphicsConfiguration(final AWTGraphicsConfiguration config)
setDefaultCloseOperationback to summary
public WindowClosingProtocol.WindowClosingMode setDefaultCloseOperation(final WindowClosingProtocol.WindowClosingMode op)

Implements com.jogamp.nativewindow.WindowClosingProtocol.setDefaultCloseOperation.

Parameters
op:WindowClosingProtocol.WindowClosingMode

Doc from com.jogamp.nativewindow.WindowClosingProtocol.setDefaultCloseOperation.

the new close operation value

Returns:WindowClosingProtocol.WindowClosingMode

Doc from com.jogamp.nativewindow.WindowClosingProtocol.setDefaultCloseOperation.

the previous close operation value

Annotations
@Override
setNEWTChildback to summary
public Window setNEWTChild(final Window newChild)

Sets a new NEWT child, provoking reparenting.

A previously detached newChild will be released to top-level status and made invisible.

Note

When switching NEWT child's, detaching the previous first via setNEWTChild(null) produced much cleaner visual results.

Returns:Window

the previous attached newt child.

setShallUseOffscreenLayerback to summary
public void setShallUseOffscreenLayer(final boolean v)

Implements com.jogamp.nativewindow.OffscreenLayerOption.setShallUseOffscreenLayer.

Doc from com.jogamp.nativewindow.OffscreenLayerOption.setShallUseOffscreenLayer.

Request an offscreen layer, if supported.

Shall be called before the first NativeWindow#lockSurface(), and hence before realization.

Annotations
@Override
setSkipJAWTDestroyback to summary
public final void setSkipJAWTDestroy(final boolean v)

Mitigates Bug 910 (IcedTea-Web), i.e. crash via removeNotify() invoked before Applet.destroy().

skipJAWTDestroy defaults to false. Due to above IcedTea-Web issue the Applet code needs to avoid JAWT destruction before Applet.destroy() is reached by setting skipJAWTDestroy to true. Afterwards the value should be reset to false and destroy() needs to be called, which finally will perform the pending JAWT destruction.

setupPrintback to summary
public void setupPrint(final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight)

Implements com.jogamp.nativewindow.awt.AWTPrintLifecycle.setupPrint.

Doc from com.jogamp.nativewindow.awt.AWTPrintLifecycle.setupPrint.

Shall be called before PrinterJob#print().

See Usage.

Parameters
scaleMatX:double

Graphics2D scaling factor, i.e. rendering 1/scaleMatX * width pixels

scaleMatY:double

Graphics2D scaling factor, i.e. rendering 1/scaleMatY * height pixels

numSamples:int

multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples

tileWidth:int

custom tile width for tile renderer, pass -1 for default.

tileHeight:int

custom tile height for tile renderer, pass -1 for default. FIXME: Add border size !

Annotations
@Override
toHexStringback to summary
pack-priv static String toHexString(final long l)
updateback to summary
public void update(final Graphics g)

Overrides java.awt.Canvas.update.

Doc from java.awt.Canvas.update.

Updates this canvas.

This method is called in response to a call to repaint. The canvas is first cleared by filling it with the background color, and then completely redrawn by calling this canvas's paint method.

Note

applications that override this method should either call super.update(g) or incorporate the functionality described above into their own code.

Parameters
g:Graphics

the specified Graphics context

Annotations
@Override
updateLayoutSizeback to summary
private final void updateLayoutSize()
updatePixelScaleback to summary
private final boolean updatePixelScale(final GraphicsConfiguration gc)
validateComponentback to summary
private final boolean validateComponent(final boolean attachNewtChild)
com.jogamp.newt.awt back to summary

private Class NewtCanvasAWT.ClearFocusOwner

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ClearFocusOwnerback to summary
private ClearFocusOwner()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
com.jogamp.newt.awt back to summary

pack-priv Class NewtCanvasAWT.FocusAction

extends Object
implements FocusRunnable
Class Inheritance
All Implemented Interfaces
com.jogamp.newt.Window.FocusRunnable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FocusActionback to summary
pack-priv FocusAction()

Method Detail

runback to summary
public boolean run()

Implements com.jogamp.newt.Window.FocusRunnable.run.

Returns:boolean

Doc from com.jogamp.newt.Window.FocusRunnable.run.

false if NEWT shall proceed requesting the focus, true if NEWT shall not request the focus.

Annotations
@Override
com.jogamp.newt.awt back to summary

pack-priv Class NewtCanvasAWT.FocusPropertyChangeListener

extends Object
implements PropertyChangeListener
Class Inheritance
  • java.lang.Object
  • com.jogamp.newt.awt.NewtCanvasAWT.FocusPropertyChangeListener
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
propertyChange(final PropertyChangeEvent
A PropertyChangeEvent object describing the event source and the property that has changed.
evt
)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FocusPropertyChangeListenerback to summary
pack-priv FocusPropertyChangeListener()

Method Detail

propertyChangeback to summary
public void propertyChange(final PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Parameters
evt:PropertyChangeEvent

A PropertyChangeEvent object describing the event source and the property that has changed.

Annotations
@Override
com.jogamp.newt.awt back to summary

pack-priv Class NewtCanvasAWT.FocusTraversalKeyListener

extends Object
implements KeyListener
Class Inheritance
All Implemented Interfaces
com.jogamp.newt.event.KeyListener, com.jogamp.newt.event.NEWTEventListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
handleKey(final KeyEvent evt, final boolean onRelease)

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FocusTraversalKeyListenerback to summary
pack-priv FocusTraversalKeyListener()

Method Detail

handleKeyback to summary
pack-priv void handleKey(final KeyEvent evt, final boolean onRelease)
keyPressedback to summary
public void keyPressed(final KeyEvent e)

Implements com.jogamp.newt.event.KeyListener.keyPressed.

Doc from com.jogamp.newt.event.KeyListener.keyPressed.

A key has been pressed, excluding auto-repeat modifier keys. See KeyEvent.

Annotations
@Override
keyReleasedback to summary
public void keyReleased(final KeyEvent e)

Implements com.jogamp.newt.event.KeyListener.keyReleased.

Doc from com.jogamp.newt.event.KeyListener.keyReleased.

A key has been released, excluding auto-repeat modifier keys. See KeyEvent.

To simulated the removed keyTyped(KeyEvent e) semantics, simply apply the following constraints upfront and bail out if not matched, i.e.:

       if( !e.isPrintableKey() || e.isAutoRepeat() ) {
           return;
       }

Annotations
@Override