public class NewtCanvasAWT extends Canvas implements WindowClosingProtocol, OffscreenLayerOption
Component.BaselineResizeBehavior
WindowClosingProtocol.WindowClosingMode
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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
Remove this Canvas from it's parent.
|
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) |
WindowClosingProtocol.WindowClosingMode |
setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode op) |
void |
setShallUseOffscreenLayer(boolean v)
Request an offscreen layer, if supported.
|
void |
update(Graphics g) |
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
public NewtCanvasAWT()
public NewtCanvasAWT(GraphicsConfiguration gc)
public NewtCanvasAWT(Window child)
public NewtCanvasAWT(GraphicsConfiguration gc, Window child)
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 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 valueWindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSE
public void removeNotify()
removeNotify
in class Component
public final void destroy()
destroy()
on the NEWT ChildWindow.destroy()
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
Copyright 2010 JogAmp Community.