net.pacbell.jfai.toh.ui
Class Canvas3D

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by javax.media.j3d.Canvas3D
              extended by net.pacbell.jfai.toh.ui.Canvas3D
All Implemented Interfaces:
FocusListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class Canvas3D
extends Canvas3D
implements FocusListener

A Canvas3D with these special features:

Author:
Jürgen Failenschmid
See Also:
Serialized Form

Nested Class Summary
static interface Canvas3D.IPaintListener
          Interface for listeners interested in notifications when the canvas is painted the very first time.
 
Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.media.j3d.Canvas3D
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT
 
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
Canvas3D(GraphicsConfiguration arg1)
          Creates an instance for the graphics configuration.
Canvas3D(GraphicsConfiguration arg1, boolean arg2)
          Creates an instance for the graphics configuration and off-screen flag.
 
Method Summary
 void addPaintListener(Canvas3D.IPaintListener listener)
          Adds a listener for notification.
 void focusGained(FocusEvent e)
          Invoked when a component gains the keyboard focus.
 void focusLost(FocusEvent e)
          Invoked when a component loses the keyboard focus.
 boolean isFocusable()
          
 void paint(Graphics g)
          After painting the canvas, notifies any registered listener if this is the very first time that this method was invoked.
 void removePaintListener(Canvas3D.IPaintListener listener)
          Removes the listener for notification.
 
Methods inherited from class javax.media.j3d.Canvas3D
addNotify, getBounds, getBounds, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getHeight, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocation, getLocation, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getSize, getSize, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, getWidth, getX, getY, isOffScreen, isRendererRunning, postRender, postSwap, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
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, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, 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, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Canvas3D

public Canvas3D(GraphicsConfiguration arg1)
Creates an instance for the graphics configuration.

See Also:
Canvas3D.Canvas3D(java.awt.GraphicsConfiguration)

Canvas3D

public Canvas3D(GraphicsConfiguration arg1,
                boolean arg2)
Creates an instance for the graphics configuration and off-screen flag.

See Also:
Canvas3D.Canvas3D(java.awt.GraphicsConfiguration, boolean)
Method Detail

addPaintListener

public void addPaintListener(Canvas3D.IPaintListener listener)
Adds a listener for notification.

This implementation only supports one listener at any one time.

Parameters:
listener - the listener

focusGained

public void focusGained(FocusEvent e)
Invoked when a component gains the keyboard focus. Move focus to the next component that can accept focus. CAUTION: This causes a loop if the canvas is the only component in a focus chain.

Specified by:
focusGained in interface FocusListener
Parameters:
e - a focus event

focusLost

public void focusLost(FocusEvent e)
Invoked when a component loses the keyboard focus. No action needed.

Specified by:
focusLost in interface FocusListener
Parameters:
e - a focus event

isFocusable

public boolean isFocusable()

Overrides:
isFocusable in class Component
See Also:
Component.isFocusable()

paint

public void paint(Graphics g)
After painting the canvas, notifies any registered listener if this is the very first time that this method was invoked.

Overrides:
paint in class Canvas3D
See Also:
Component.paint(java.awt.Graphics)

removePaintListener

public void removePaintListener(Canvas3D.IPaintListener listener)
Removes the listener for notification.

Parameters:
listener - the listener