j3d.org Code

org.j3d.renderer.java3d.overlay
Class InteractiveOverlayBase

java.lang.Object
  extended byorg.j3d.renderer.java3d.overlay.OverlayBase
      extended byorg.j3d.renderer.java3d.overlay.InteractiveOverlayBase
All Implemented Interfaces:
java.awt.event.ComponentListener, java.util.EventListener, InteractiveOverlay, Overlay, ScreenComponent, UpdatableEntity
Direct Known Subclasses:
MouseOverlay

public abstract class InteractiveOverlayBase
extends OverlayBase
implements InteractiveOverlay

An implementation of the interactive overlay.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.renderer.java3d.overlay.OverlayBase
activeBuffer, backgroundColor, backgroundMode, bottomInset, canvas, componentSize, consoleBG, consoleTG, DEFAULT_INSET, DIRTY_ACTIVE_BUFFER, DIRTY_POSITION, DIRTY_SIZE, DIRTY_VISIBLE, fieldOfView, fixedSize, leftInset, overlayBounds, overlayTexGrp, rightInset, subOverlay, topInset
 
Fields inherited from interface org.j3d.renderer.java3d.overlay.Overlay
BACKGROUND_COPY, BACKGROUND_NONE
 
Constructor Summary
protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas, java.awt.Dimension size)
          Creates a new overlay covering the given canvas bounds.
protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha)
          Constructs an overlay window that can have alpha capabilities.
protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha, UpdateManager updateManager)
          Constructs an overlay window.
protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha, UpdateManager updateManager, int numBuffers)
          Constructs an overlay window.
protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas, java.awt.Dimension size, UpdateManager manager)
          Constructs an overlay window with an update manager.
 
Method Summary
 void addKeyListener(java.awt.event.KeyListener l)
          Request that the given listener enable key events being sent.
 void addMouseListener(java.awt.event.MouseListener l)
          Request that the given listener enable mouse events being sent.
 void addMouseMotionListener(java.awt.event.MouseMotionListener l)
          Request that the given listener enable mouse motion events being sent.
 void removeKeyListener(java.awt.event.KeyListener l)
          Request that the given listener disable key events being sent.
 void removeMouseListener(java.awt.event.MouseListener l)
          Request that the given listener disable mouse events being sent.
 void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
          Request that the given listener disable mouse motion events being sent.
 void requestFocus()
          Request that keyboard focus be sent to this listener object now.
 void setInputRequester(InputRequester req)
          Set the input requestor so that the overlay may manage when it requires input events.
 
Methods inherited from class org.j3d.renderer.java3d.overlay.OverlayBase
componentHidden, componentMoved, componentResized, componentShown, contains, dirty, getBackgroundImage, getBounds, getGraphics, getRoot, getUpdateManager, initialize, isAntialiased, isVisible, paint, repaint, setActiveBuffer, setAntialiased, setBackgroundColor, setBackgroundImage, setBackgroundMode, setComponentDetails, setInsets, setInsets, setLocation, setSize, setUpdateManager, setVisible, update, updateBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.j3d.renderer.java3d.overlay.Overlay
contains, getBounds, getRoot, getUpdateManager, initialize, isAntialiased, isVisible, setAntialiased, setComponentDetails, setLocation, setSize, setUpdateManager, setVisible
 
Methods inherited from interface org.j3d.renderer.java3d.overlay.UpdatableEntity
update
 

Constructor Detail

InteractiveOverlayBase

protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas,
                                 java.awt.Dimension size)
Creates a new overlay covering the given canvas bounds. It has two buffers. Updates are managed automatically. This Overlay is not usable until you attach it to the view platform transform. If the bounds are null, then resize the overlay to fit the canvas and then track the size of the canvas.

Parameters:
canvas - Canvas being drawn onto
size - The size of the overlay in pixels

InteractiveOverlayBase

protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas,
                                 java.awt.Dimension size,
                                 UpdateManager manager)
Constructs an overlay window with an update manager. It has two buffers. This window will not be visible unless it is added to the scene under the view platform transform. If the bounds are null, then resize the overlay to fit the canvas and then track the size of the canvas.

Parameters:
canvas - The canvas the overlay is drawn on
size - The size of the overlay in pixels

InteractiveOverlayBase

protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas,
                                 java.awt.Dimension size,
                                 boolean clipAlpha,
                                 boolean blendAlpha)
Constructs an overlay window that can have alpha capabilities. This window will not be visible unless it is added to the scene under the view platform transform. If the bounds are null, then resize the overlay to fit the canvas and then track the size of the canvas.

Parameters:
canvas - The canvas the overlay is drawn on
size - The size of the overlay in pixels
clipAlpha - Should the polygon clip where alpha is zero
blendAlpha - Should we blend to background where alpha is < 1

InteractiveOverlayBase

protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas,
                                 java.awt.Dimension size,
                                 boolean clipAlpha,
                                 boolean blendAlpha,
                                 UpdateManager updateManager)
Constructs an overlay window. This window will not be visible unless it is added to the scene under the view platform transform If the bounds are null, then resize the overlay to fit the canvas and then track the size of the canvas.

Parameters:
canvas - The canvas the overlay is drawn on
size - The size of the overlay in pixels
clipAlpha - Should the polygon clip where alpha is zero
blendAlpha - Should we blend to background where alpha is < 1
updateManager - Responsible for allowing the Overlay to update between renders. If this is null a default manager is created

InteractiveOverlayBase

protected InteractiveOverlayBase(javax.media.j3d.Canvas3D canvas,
                                 java.awt.Dimension size,
                                 boolean clipAlpha,
                                 boolean blendAlpha,
                                 UpdateManager updateManager,
                                 int numBuffers)
Constructs an overlay window. This window will not be visible unless it is added to the scene under the view platform transform If the bounds are null, then resize the overlay to fit the canvas and then track the size of the canvas.

Parameters:
canvas - The canvas the overlay is drawn on
size - The size of the overlay in pixels
clipAlpha - Should the polygon clip where alpha is zero
blendAlpha - Should we blend to background where alpha is < 1
updateManager - Responsible for allowing the Overlay to update between renders. If this is null a default manager is created
numBuffers - The number of buffers to generate, the default is two
Method Detail

setInputRequester

public void setInputRequester(InputRequester req)
Set the input requestor so that the overlay may manage when it requires input events. If the system is shutting down or the overlay is being removed, the parameter value may be null to clear a previously held instance.

Specified by:
setInputRequester in interface InteractiveOverlay
Parameters:
req - The requestor instance to use or null

requestFocus

public void requestFocus()
Request that keyboard focus be sent to this listener object now.


addMouseListener

public void addMouseListener(java.awt.event.MouseListener l)
Request that the given listener enable mouse events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener l)
Request that the given listener disable mouse events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
Request that the given listener enable mouse motion events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
Request that the given listener disable mouse motion events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

addKeyListener

public void addKeyListener(java.awt.event.KeyListener l)
Request that the given listener enable key events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener l)
Request that the given listener disable key events being sent. If the listener instance is null, this request is ignored.

Parameters:
l - The listener to manage events for

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org