|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.jogamp.newt.awt.NewtCanvasAWT
public class NewtCanvasAWT
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.BaselineResizeBehavior |
Nested classes/interfaces inherited from interface javax.media.nativewindow.WindowClosingProtocol |
---|
WindowClosingProtocol.WindowClosingMode |
Field Summary | |
---|---|
static boolean |
DEBUG
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NewtCanvasAWT()
Instantiates a NewtCanvas without a NEWT child. |
|
NewtCanvasAWT(GraphicsConfiguration gc)
Instantiates a NewtCanvas without a NEWT child. |
|
NewtCanvasAWT(GraphicsConfiguration gc,
Window child)
Instantiates a NewtCanvas with a NEWT child. |
|
NewtCanvasAWT(Window child)
Instantiates a NewtCanvas with a NEWT child. |
Method Summary | |
---|---|
void |
addNotify()
|
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
|
WindowClosingProtocol.WindowClosingMode |
getDefaultCloseOperation()
|
NativeWindow |
getNativeWindow()
|
Window |
getNEWTChild()
|
boolean |
getShallUseOffscreenLayer()
Returns the property set by OffscreenLayerOption.setShallUseOffscreenLayer(boolean) . |
boolean |
isApplet()
Returns true if the AWT component is parented to an Applet ,
otherwise false. |
boolean |
isOffscreenLayerSurfaceEnabled()
Returns true if this instance uses an offscreen layer, otherwise false. |
void |
paint(Graphics g)
|
void |
removeNotify()
|
void |
requestFocus()
|
boolean |
requestFocus(boolean temporary)
|
boolean |
requestFocusInWindow()
|
boolean |
requestFocusInWindow(boolean temporary)
|
void |
reshape(int x,
int y,
int width,
int height)
|
WindowClosingProtocol.WindowClosingMode |
setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode op)
|
Window |
setNEWTChild(Window newChild)
Sets a new NEWT child, provoking reparenting. |
void |
setShallUseOffscreenLayer(boolean v)
Request an offscreen layer, if supported. |
void |
update(Graphics g)
|
Methods inherited from class java.awt.Canvas |
---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
Constructor Detail |
---|
public NewtCanvasAWT()
public NewtCanvasAWT(GraphicsConfiguration gc)
public NewtCanvasAWT(Window child)
public NewtCanvasAWT(GraphicsConfiguration gc, Window child)
Method Detail |
---|
public void setShallUseOffscreenLayer(boolean v)
OffscreenLayerOption
Shall be called before the first NativeSurface.lockSurface()
,
and hence before realization.
setShallUseOffscreenLayer
in interface OffscreenLayerOption
OffscreenLayerOption.getShallUseOffscreenLayer()
,
OffscreenLayerOption.isOffscreenLayerSurfaceEnabled()
public final boolean getShallUseOffscreenLayer()
OffscreenLayerOption
OffscreenLayerOption.setShallUseOffscreenLayer(boolean)
.
getShallUseOffscreenLayer
in interface OffscreenLayerOption
public final boolean isOffscreenLayerSurfaceEnabled()
OffscreenLayerOption
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.
NativeSurface.lockSurface()
.
isOffscreenLayerSurfaceEnabled
in interface OffscreenLayerOption
OffscreenLayerOption.setShallUseOffscreenLayer(boolean)
public boolean isApplet()
Applet
,
otherwise false. This information is valid only after addNotify()
is issued,
ie. before adding the component to the AWT tree and make it visible.
public Window setNEWTChild(Window newChild)
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.
public Window getNEWTChild()
public NativeWindow getNativeWindow()
removeNotify()
has been called,
or addNotify()
hasn't been called yet.public WindowClosingProtocol.WindowClosingMode getDefaultCloseOperation()
getDefaultCloseOperation
in interface WindowClosingProtocol
WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSE
public WindowClosingProtocol.WindowClosingMode setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode op)
setDefaultCloseOperation
in interface WindowClosingProtocol
op
- the new close operation value
WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSE
public void addNotify()
addNotify
in class Canvas
public void removeNotify()
removeNotify
in class Component
public final void destroy()
destroy()
on the NEWT Child
Window.destroy()
public void paint(Graphics g)
paint
in class Canvas
public void update(Graphics g)
update
in class Canvas
public void reshape(int x, int y, int width, int height)
reshape
in class Component
public void requestFocus()
requestFocus
in class Component
public boolean requestFocus(boolean temporary)
requestFocus
in class Component
public boolean requestFocusInWindow()
requestFocusInWindow
in class Component
public boolean requestFocusInWindow(boolean temporary)
requestFocusInWindow
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |