com.jogamp.newt.awt
Class NewtCanvasAWT

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.jogamp.newt.awt.NewtCanvasAWT
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, WindowClosingProtocol

public class NewtCanvasAWT
extends Canvas
implements WindowClosingProtocol

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
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 javax.media.nativewindow.WindowClosingProtocol
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE
 
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(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 Remove this Canvas from it's parent.
 int getDefaultCloseOperation()
           
 NativeWindow getNativeWindow()
           
 Window getNEWTChild()
           
 void paint(Graphics g)
           
 void removeNotify()
           
 void requestFocus()
           
 boolean requestFocus(boolean temporary)
           
 boolean requestFocusInWindow()
           
 boolean requestFocusInWindow(boolean temporary)
           
 int setDefaultCloseOperation(int op)
           
 void update(Graphics g)
           
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
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, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Constructor Detail

NewtCanvasAWT

public NewtCanvasAWT()
Instantiates a NewtCanvas without a NEWT child.


NewtCanvasAWT

public NewtCanvasAWT(Window child)
Instantiates a NewtCanvas with a NEWT child.

Method Detail

getNEWTChild

public Window getNEWTChild()
Returns:
the current NEWT child

getNativeWindow

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

getDefaultCloseOperation

public int getDefaultCloseOperation()
Specified by:
getDefaultCloseOperation in interface WindowClosingProtocol
Returns:
the current close operation value
See Also:
WindowClosingProtocol.DISPOSE_ON_CLOSE, WindowClosingProtocol.DO_NOTHING_ON_CLOSE

setDefaultCloseOperation

public int setDefaultCloseOperation(int op)
Specified by:
setDefaultCloseOperation in interface WindowClosingProtocol
Parameters:
op - the new close operation value
Returns:
the previous close operation value
See Also:
WindowClosingProtocol.DISPOSE_ON_CLOSE, WindowClosingProtocol.DO_NOTHING_ON_CLOSE

addNotify

public void addNotify()
Overrides:
addNotify in class Canvas

removeNotify

public void removeNotify()
Overrides:
removeNotify in class Component

destroy

public final void destroy()
Destroys this resource:

See Also:
Window.destroy()

paint

public void paint(Graphics g)
Overrides:
paint in class Canvas

update

public void update(Graphics g)
Overrides:
update in class Canvas

requestFocus

public void requestFocus()
Overrides:
requestFocus in class Component

requestFocus

public boolean requestFocus(boolean temporary)
Overrides:
requestFocus in class Component

requestFocusInWindow

public boolean requestFocusInWindow()
Overrides:
requestFocusInWindow in class Component

requestFocusInWindow

public boolean requestFocusInWindow(boolean temporary)
Overrides:
requestFocusInWindow in class Component


Copyright 2010 JogAmp Community.