NCSA Portfolio

ncsa.j3d.ui.tools
Class MouseTool

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.Node
              |
              +--javax.media.j3d.Leaf
                    |
                    +--javax.media.j3d.Behavior
                          |
                          +--ncsa.j3d.ui.tools.MouseTool

public class MouseTool
extends javax.media.j3d.Behavior
implements ToolInterface

This mimics the way the mouse works in a windowing system. Rays are cast through the eyepoint and the output from a Fake2DInputDevice. The closest object to the eyepoint is grabbed when the first button is pressed and can be moved. The object is moved along the ray that is cast at the same distance from the eyepoint.


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_PICK, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
MouseTool()
          The default contructor
 
Method Summary
 java.lang.String describe()
          Used to identify the tool by name.
 java.lang.String describeFunctionality()
          Used to describe the functionality of the tool.
 void initialize()
           
 boolean notify(java.util.EventObject o)
          This function accepts events from portfolio or one of its event grabbers.
 void processStimulus(java.util.Enumeration criteria)
           
 void setToolManager(ToolManagerInterface m)
          This function allows specifying the tool manager that this tool is owned by.
 
Methods inherited from class javax.media.j3d.Behavior
duplicateNode, getEnable, getSchedulingBoundingLeaf, getSchedulingBounds, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, updateNodeReferences
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseTool

public MouseTool()
The default contructor
Method Detail

initialize

public void initialize()
Overrides:
initialize in class javax.media.j3d.Behavior

processStimulus

public void processStimulus(java.util.Enumeration criteria)
Overrides:
processStimulus in class javax.media.j3d.Behavior

describe

public java.lang.String describe()
Used to identify the tool by name. Useful for populating menus with the names of tools.
Specified by:
describe in interface ToolInterface
Returns:
The name of the tool.

describeFunctionality

public java.lang.String describeFunctionality()
Used to describe the functionality of the tool. This should detail the different modes of the tool and the exact keystrokes (and other events) used within the tool.
Specified by:
describeFunctionality in interface ToolInterface
Returns:
String A string describing the functionality of the tool.

setToolManager

public void setToolManager(ToolManagerInterface m)
Description copied from interface: ToolInterface
This function allows specifying the tool manager that this tool is owned by. Typically there is only 1 toolmanager.
Specified by:
setToolManager in interface ToolInterface
Tags copied from interface: ToolInterface
Parameters:
ToolManagerInterface - the interface to talk to

notify

public boolean notify(java.util.EventObject o)
Description copied from interface: PortfolioEventReceiver
This function accepts events from portfolio or one of its event grabbers.
Tags copied from interface: PortfolioEventReceiver
Parameters:
EventObject - The event to be processed.

NCSA Portfolio

NCSA Portfolio, Copyright 1997-1999, National Center for Supercomputing Applications, University of Illinois Urbana-Champaign, All Rights Reserved