de.fhg.igd.earth.view.behavior
Class VPMouseBehavior

java.lang.Object
  extended byjavax.media.j3d.SceneGraphObject
      extended byjavax.media.j3d.Node
          extended byjavax.media.j3d.Leaf
              extended byjavax.media.j3d.Behavior
                  extended bycom.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
                      extended byde.fhg.igd.earth.view.behavior.VPMouseBehavior
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
Direct Known Subclasses:
CubeBehavior, SphereBehavior

public abstract class VPMouseBehavior
extends com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
implements MouseListener, MouseMotionListener

Abstract class which implements much of the event tracking and state updating

Since:
Java 3D 1.2.1

Field Summary
(package private)  javax.media.j3d.WakeupCriterion bpDrag
           
(package private)  javax.media.j3d.WakeupCriterion bpPress
           
(package private)  javax.media.j3d.WakeupCriterion bpRelease
           
private static boolean DEBUG
           
(package private)  javax.media.j3d.WakeupCriterion ef
           
protected  boolean motion
          Boolean for whether the mouse is in motion
protected  javax.media.j3d.WakeupOr mouseCriterion
          The Or of the different criterion for the behavior to wakeup
protected  javax.media.j3d.WakeupCriterion[] mouseEvents
          The different criterion for the behavior to wakeup
(package private)  LinkedList mouseq
           
protected  javax.media.j3d.Transform3D targetTransform
          The target Transform3D for this behavior
 
Fields inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
homeTransform, targetTG, vp
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Fields inherited from class javax.media.j3d.SceneGraphObject
 
Constructor Summary
VPMouseBehavior(javax.media.j3d.Canvas3D c)
          Constructs a new VPMouseBehavior
 
Method Summary
 void initialize()
          Initializes the behavior.
(package private) abstract  void integrateTransforms()
          Called once per frame (if the view is moving) to calculate the new view platform transform
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
(package private)  void processAWTEvents(AWTEvent[] events)
           
(package private) abstract  void processMouseEvent(MouseEvent evt)
          Process the mouse events, this is called every time an event arrives
 void processStimulus(Enumeration en)
          Process a stimulus meant for this behavior.
 
Methods inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
getHomeTransform, getViewingPlatform, goHome, setHomeTransform, setViewingPlatform
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

mouseEvents

protected javax.media.j3d.WakeupCriterion[] mouseEvents
The different criterion for the behavior to wakeup


mouseCriterion

protected javax.media.j3d.WakeupOr mouseCriterion
The Or of the different criterion for the behavior to wakeup


bpDrag

javax.media.j3d.WakeupCriterion bpDrag

bpPress

javax.media.j3d.WakeupCriterion bpPress

bpRelease

javax.media.j3d.WakeupCriterion bpRelease

ef

javax.media.j3d.WakeupCriterion ef

targetTransform

protected javax.media.j3d.Transform3D targetTransform
The target Transform3D for this behavior


motion

protected boolean motion
Boolean for whether the mouse is in motion


mouseq

LinkedList mouseq
Constructor Detail

VPMouseBehavior

public VPMouseBehavior(javax.media.j3d.Canvas3D c)
Constructs a new VPMouseBehavior

Parameters:
c - The Canvas3D to add the behavior to
Method Detail

initialize

public void initialize()
Initializes the behavior. NOTE: Applications should not call this method. It is called by the Java 3D behavior scheduler.


processStimulus

public void processStimulus(Enumeration en)
Process a stimulus meant for this behavior. NOTE: Applications should not call this method. It is called by the Java 3D behavior scheduler.


processAWTEvents

void processAWTEvents(AWTEvent[] events)

processMouseEvent

abstract void processMouseEvent(MouseEvent evt)
Process the mouse events, this is called every time an event arrives


integrateTransforms

abstract void integrateTransforms()
Called once per frame (if the view is moving) to calculate the new view platform transform


mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.