PCanvas3D

org.interactivemesh.pivot.wtk.j3d
Class PCanvas3D

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.interactivemesh.pivot.wtk.j3d.PCanvas3D
All Implemented Interfaces:
org.apache.pivot.wtk.ConstrainedVisual, org.apache.pivot.wtk.Visual

public class PCanvas3D
extends org.apache.pivot.wtk.Component

A Pivot component that Java 3D can render into.


Nested Class Summary
 class PCanvas3D.PCanvas3DSkin
           
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
org.apache.pivot.wtk.Component.DecoratorSequence, org.apache.pivot.wtk.Component.StyleDictionary, org.apache.pivot.wtk.Component.UserDataDictionary
 
Constructor Summary
PCanvas3D()
          Constructs and initializes a new PCanvas3D object that Java 3D can render into.
PCanvas3D(javax.media.j3d.GraphicsConfigTemplate3D template)
          Constructs and initializes a new PCanvas3D object that Java 3D can render into, using the specified template.
PCanvas3D(javax.media.j3d.GraphicsConfigTemplate3D template, java.awt.GraphicsDevice device)
          Constructs and initializes a new FXCanvas3DImage object, using the specified template and graphics device.
PCanvas3D(java.awt.GraphicsDevice device)
          Constructs and initializes a new PCanvas3D object that Java 3D can render into, using the specified graphics device.
 
Method Summary
 void disableWakeupOnAWTEvents(long eventMasks)
          Disables calling event process-methods on the underlying heavyweight canvas for the specified AWT event masks.
 void enableWakeupOnAWTEvents(long eventMasks)
          Sets the AWT event masks for which this PCanvas3D object will call the corresponding process-methods on the underlying heavyweight canvas.
 javax.media.j3d.Canvas3D getOffscreenCanvas3D()
          Returns the offscreen heavyweight canvas of this lightweight component.
 void setApplicationDisplay(org.apache.pivot.wtk.Display display)
          Sets the Display object for this PCanvas3D object.
 
Methods inherited from class org.apache.pivot.wtk.Component
clear, clearFocus, contains, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipDelay, getTooltipText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, load, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, paint, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setParent, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setVisible, setWidth, setWidthLimits, setWidthLimits, setX, setY, store, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PCanvas3D

public PCanvas3D()
Constructs and initializes a new PCanvas3D object that Java 3D can render into. The screen device is obtained from GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(), which might not be the one you should use if you are in a multiscreen environment. The PCanvas3D is constructed using the following default parameters:
double buffer enable : false
stereo enable : false


PCanvas3D

public PCanvas3D(java.awt.GraphicsDevice device)
Constructs and initializes a new PCanvas3D object that Java 3D can render into, using the specified graphics device.

Parameters:
device - the screen graphics device that will be used to construct a GraphicsConfiguration.

PCanvas3D

public PCanvas3D(javax.media.j3d.GraphicsConfigTemplate3D template)
Constructs and initializes a new PCanvas3D object that Java 3D can render into, using the specified template. The screen device is obtained from GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(), which might not be the one you should use if you are in a multiscreen environment.

Parameters:
template - The template that will be used to construct a GraphicsConfiguration. The stereo and doublebuffer properties are forced to UNNECESSARY.

PCanvas3D

public PCanvas3D(javax.media.j3d.GraphicsConfigTemplate3D template,
                 java.awt.GraphicsDevice device)
Constructs and initializes a new FXCanvas3DImage object, using the specified template and graphics device.

Parameters:
template - The template that will be used to construct a GraphicsConfiguration. The stereo and doublebuffer properties are forced to UNNECESSARY.
device - the screen graphics device that will be used to construct a GraphicsConfiguration in conjunction with the template.
Method Detail

setApplicationDisplay

public void setApplicationDisplay(org.apache.pivot.wtk.Display display)
Sets the Display object for this PCanvas3D object. The top level AWT container is retrieved from this Diplay object and returned to Java 3D as 'parent' of the underlying heavyweight offscreen canvas.

Parameters:
display - Display object of the application

enableWakeupOnAWTEvents

public void enableWakeupOnAWTEvents(long eventMasks)
Sets the AWT event masks for which this PCanvas3D object will call the corresponding process-methods on the underlying heavyweight canvas.

This is required only when Java 3D WakeupOnAWTEvents are specified in subclasses of Behavior.

No event mask is set per default.

Parameters:
eventMasks - ored AWT event masks: AWTEvent.COMPONENT_EVENT_MASK, AWTEvent.FOCUS_EVENT_MASK, AWTEvent.KEY_EVENT_MASK, AWTEvent.MOUSE_EVENT_MASK, AWTEvent.MOUSE_MOTION_EVENT_MASK, AWTEvent.MOUSE_WHEEL_EVENT_MASK.

disableWakeupOnAWTEvents

public void disableWakeupOnAWTEvents(long eventMasks)
Disables calling event process-methods on the underlying heavyweight canvas for the specified AWT event masks.

Parameters:
eventMasks - ored AWT event masks: AWTEvent.COMPONENT_EVENT_MASK, AWTEvent.FOCUS_EVENT_MASK, AWTEvent.KEY_EVENT_MASK, AWTEvent.MOUSE_EVENT_MASK, AWTEvent.MOUSE_MOTION_EVENT_MASK, AWTEvent.MOUSE_WHEEL_EVENT_MASK

getOffscreenCanvas3D

public javax.media.j3d.Canvas3D getOffscreenCanvas3D()
Returns the offscreen heavyweight canvas of this lightweight component.

Returns:
the heavyweight canvas.

PCanvas3D