|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
AWT Canvas containing a NEWT Window using native parenting.
More...
Classes | |
| class | FocusAction |
| class | FocusPropertyChangeListener |
| class | FocusTraversalKeyListener |
Public Member Functions | |
| NewtCanvasAWT () | |
| Instantiates a NewtCanvas without a NEWT child. More... | |
| NewtCanvasAWT (final GraphicsConfiguration gc) | |
| Instantiates a NewtCanvas without a NEWT child. More... | |
| NewtCanvasAWT (final Window child) | |
| Instantiates a NewtCanvas with a NEWT child. More... | |
| NewtCanvasAWT (final GraphicsConfiguration gc, final Window child) | |
| Instantiates a NewtCanvas with a NEWT child. More... | |
| void | setShallUseOffscreenLayer (final boolean v) |
| Request an offscreen layer, if supported. More... | |
| final boolean | getShallUseOffscreenLayer () |
Returns the property set by setShallUseOffscreenLayer(boolean). More... | |
| final boolean | isOffscreenLayerSurfaceEnabled () |
| Returns true if this instance uses an offscreen layer, otherwise false. More... | |
| final boolean | isApplet () |
Returns true if the AWT component is parented to an java.applet.Applet, otherwise false. More... | |
| Window | setNEWTChild (final Window newChild) |
| Sets a new NEWT child, provoking reparenting. More... | |
| Window | getNEWTChild () |
| NativeWindow | getNativeWindow () |
Returns the associated NativeWindow of this NativeWindowHolder, which is identical to getNativeSurface(). More... | |
| NativeSurface | getNativeSurface () |
Returns the associated NativeSurface of this NativeSurfaceHolder. More... | |
| WindowClosingMode | getDefaultCloseOperation () |
| WindowClosingMode | setDefaultCloseOperation (final WindowClosingMode op) |
| final void | setSkipJAWTDestroy (final boolean v) |
| Mitigates Bug 910 (IcedTea-Web), i.e. More... | |
| final boolean | getSkipJAWTDestroy () |
See setSkipJAWTDestroy(boolean). More... | |
| GraphicsConfiguration | getGraphicsConfiguration () |
| void | addNotify () |
| void | removeNotify () |
| final void | destroy () |
| Destroys this resource: More... | |
| void | paint (final Graphics g) |
| void | update (final Graphics g) |
| void | reshape (final int x, final int y, final int width, final int height) |
| void | setupPrint (final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) |
Shall be called before PrinterJob#print(). More... | |
| void | releasePrint () |
Shall be called after PrinterJob#print(). More... | |
| void | print (final Graphics graphics) |
| final boolean | isAWTEventPassThrough () |
Returns true if Key and Mouse input events will be passed through AWT, otherwise only the NEWT child will receive them. More... | |
| NativeWindow | getNativeWindow () |
Returns the associated NativeWindow of this NativeWindowHolder, which is identical to getNativeSurface(). More... | |
| NativeSurface | getNativeSurface () |
Returns the associated NativeSurface of this NativeSurfaceHolder. More... | |
| WindowClosingMode | getDefaultCloseOperation () |
| WindowClosingMode | setDefaultCloseOperation (WindowClosingMode op) |
| void | setShallUseOffscreenLayer (boolean v) |
| Request an offscreen layer, if supported. More... | |
| boolean | getShallUseOffscreenLayer () |
Returns the property set by setShallUseOffscreenLayer(boolean). More... | |
| boolean | isOffscreenLayerSurfaceEnabled () |
| Returns true if this instance uses an offscreen layer, otherwise false. More... | |
| void | setupPrint (double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) |
Shall be called before PrinterJob#print(). More... | |
| void | releasePrint () |
Shall be called after PrinterJob#print(). More... | |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("Window") |
Static Public Attributes inherited from com.jogamp.nativewindow.awt.AWTPrintLifecycle | |
| static final int | DEFAULT_PRINT_TILE_SIZE = 1024 |
Static Protected Member Functions | |
| static String | currentThreadName () |
AWT Canvas containing a NEWT Window using native parenting.
setShallUseOffscreenLayer(true) maybe called to use an offscreen drawable (FBO or PBuffer) allowing the underlying JAWT mechanism to composite the image, if supported.
Definition at line 102 of file NewtCanvasAWT.java.
| com.jogamp.newt.awt.NewtCanvasAWT.NewtCanvasAWT | ( | ) |
Instantiates a NewtCanvas without a NEWT child.
Definition at line 149 of file NewtCanvasAWT.java.
| com.jogamp.newt.awt.NewtCanvasAWT.NewtCanvasAWT | ( | final GraphicsConfiguration | gc | ) |
Instantiates a NewtCanvas without a NEWT child.
Definition at line 160 of file NewtCanvasAWT.java.
| com.jogamp.newt.awt.NewtCanvasAWT.NewtCanvasAWT | ( | final Window | child | ) |
Instantiates a NewtCanvas with a NEWT child.
Definition at line 171 of file NewtCanvasAWT.java.
| com.jogamp.newt.awt.NewtCanvasAWT.NewtCanvasAWT | ( | final GraphicsConfiguration | gc, |
| final Window | child | ||
| ) |
Instantiates a NewtCanvas with a NEWT child.
Definition at line 183 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.addNotify | ( | ) |
|
staticprotected |
Definition at line 1121 of file NewtCanvasAWT.java.
| final void com.jogamp.newt.awt.NewtCanvasAWT.destroy | ( | ) |
Destroys this resource:
destroy() on the NEWT Child Definition at line 692 of file NewtCanvasAWT.java.
| WindowClosingMode com.jogamp.newt.awt.NewtCanvasAWT.getDefaultCloseOperation | ( | ) |
Implements com.jogamp.nativewindow.WindowClosingProtocol.
Definition at line 441 of file NewtCanvasAWT.java.
| GraphicsConfiguration com.jogamp.newt.awt.NewtCanvasAWT.getGraphicsConfiguration | ( | ) |
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.
Definition at line 496 of file NewtCanvasAWT.java.
| NativeSurface com.jogamp.newt.awt.NewtCanvasAWT.getNativeSurface | ( | ) |
Returns the associated NativeSurface of this NativeSurfaceHolder.
NativeSurface representation, may be null in case removeNotify() has been called, or addNotify() hasn't been called yet. Implements com.jogamp.nativewindow.NativeSurfaceHolder.
Definition at line 438 of file NewtCanvasAWT.java.
| NativeWindow com.jogamp.newt.awt.NewtCanvasAWT.getNativeWindow | ( | ) |
Returns the associated NativeWindow of this NativeWindowHolder, which is identical to getNativeSurface().
NativeWindow representation, may be null in case removeNotify() has been called, or addNotify() hasn't been called yet. Implements com.jogamp.nativewindow.NativeWindowHolder.
Definition at line 430 of file NewtCanvasAWT.java.
| Window com.jogamp.newt.awt.NewtCanvasAWT.getNEWTChild | ( | ) |
Definition at line 420 of file NewtCanvasAWT.java.
| final boolean com.jogamp.newt.awt.NewtCanvasAWT.getShallUseOffscreenLayer | ( | ) |
Returns the property set by setShallUseOffscreenLayer(boolean).
Implements com.jogamp.nativewindow.OffscreenLayerOption.
Definition at line 198 of file NewtCanvasAWT.java.
| final boolean com.jogamp.newt.awt.NewtCanvasAWT.getSkipJAWTDestroy | ( | ) |
See setSkipJAWTDestroy(boolean).
Definition at line 462 of file NewtCanvasAWT.java.
| final boolean com.jogamp.newt.awt.NewtCanvasAWT.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.
Definition at line 212 of file NewtCanvasAWT.java.
| final boolean com.jogamp.newt.awt.NewtCanvasAWT.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.
Definition at line 1033 of file NewtCanvasAWT.java.
| final boolean com.jogamp.newt.awt.NewtCanvasAWT.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().
Implements com.jogamp.nativewindow.OffscreenLayerOption.
Definition at line 203 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.paint | ( | final Graphics | g | ) |
| void com.jogamp.newt.awt.NewtCanvasAWT.print | ( | final Graphics | graphics | ) |
| void com.jogamp.newt.awt.NewtCanvasAWT.releasePrint | ( | ) |
Shall be called after PrinterJob#print().
See Usage.
Implements com.jogamp.nativewindow.awt.AWTPrintLifecycle.
Definition at line 885 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.removeNotify | ( | ) |
| void com.jogamp.newt.awt.NewtCanvasAWT.reshape | ( | final int | x, |
| final int | y, | ||
| final int | width, | ||
| final int | height | ||
| ) |
Definition at line 757 of file NewtCanvasAWT.java.
| WindowClosingMode com.jogamp.newt.awt.NewtCanvasAWT.setDefaultCloseOperation | ( | final WindowClosingMode | op | ) |
| op | the new close operation value |
Implements com.jogamp.nativewindow.WindowClosingProtocol.
Definition at line 446 of file NewtCanvasAWT.java.
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.
Definition at line 387 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.setShallUseOffscreenLayer | ( | final boolean | v | ) |
Request an offscreen layer, if supported.
Shall be called before the first NativeWindow#lockSurface(), and hence before realization.
Implements com.jogamp.nativewindow.OffscreenLayerOption.
Definition at line 193 of file NewtCanvasAWT.java.
| final void com.jogamp.newt.awt.NewtCanvasAWT.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.
Definition at line 460 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.setupPrint | ( | final double | scaleMatX, |
| final double | scaleMatY, | ||
| final int | numSamples, | ||
| final int | tileWidth, | ||
| final int | tileHeight | ||
| ) |
Shall be called before PrinterJob#print().
See Usage.
| scaleMatX | Graphics2D scaling factor, i.e. rendering 1/scaleMatX * width pixels |
| scaleMatY | Graphics2D scaling factor, i.e. rendering 1/scaleMatY * height pixels |
| numSamples | multisampling value: < 0 turns off, == 0 leaves as-is, > 0 enables using given num samples |
| tileWidth | custom tile width for tile renderer, pass -1 for default. |
| tileHeight | custom tile height for tile renderer, pass -1 for default. FIXME: Add border size ! |
Implements com.jogamp.nativewindow.awt.AWTPrintLifecycle.
Definition at line 788 of file NewtCanvasAWT.java.
| void com.jogamp.newt.awt.NewtCanvasAWT.update | ( | final Graphics | g | ) |
Definition at line 751 of file NewtCanvasAWT.java.
|
static |
Definition at line 103 of file NewtCanvasAWT.java.