|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Leaf
javax.media.j3d.Behavior
com.sun.j3d.utils.behaviors.mouse.MouseBehavior
public abstract class MouseBehavior
Base class for all mouse manipulators (see MouseRotate, MouseZoom and MouseTranslate for examples of how to extend this base class).
Field Summary | |
---|---|
static int |
INVERT_INPUT
Set this flag if you want to invert the inputs. |
static int |
MANUAL_WAKEUP
Set this flag if you want to manually wakeup the behavior. |
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_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
---|---|
MouseBehavior(java.awt.Component c,
int format)
Creates a mouse behavior that uses AWT listeners and behavior posts rather than WakeupOnAWTEvent. |
|
MouseBehavior(java.awt.Component c,
javax.media.j3d.TransformGroup transformGroup)
Creates a mouse behavior that uses AWT listeners and behavior posts rather than WakeupOnAWTEvent. |
|
MouseBehavior(int format)
Initializes standard fields. |
|
MouseBehavior(javax.media.j3d.TransformGroup transformGroup)
Creates a mouse behavior object with a given transform group. |
Method Summary | |
---|---|
void |
addListener(java.awt.Component c)
Adds this behavior as a MouseListener, mouseWheelListener and MouseMotionListener to the specified component. |
javax.media.j3d.TransformGroup |
getTransformGroup()
Return the transformGroup on which this node is operating |
void |
initialize()
Initializes the behavior. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
processMouseEvent(java.awt.event.MouseEvent evt)
Handles mouse events |
abstract void |
processStimulus(java.util.Enumeration criteria)
All mouse manipulators must implement this. |
void |
setEnable(boolean state)
|
void |
setTransformGroup(javax.media.j3d.TransformGroup transformGroup)
Swap a new transformGroup replacing the old one. |
void |
wakeup()
Manually wake up the behavior. |
Methods inherited from class javax.media.j3d.Behavior |
---|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences |
Methods inherited from class javax.media.j3d.Node |
---|
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
---|
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MANUAL_WAKEUP
public static final int INVERT_INPUT
Constructor Detail |
---|
public MouseBehavior(javax.media.j3d.TransformGroup transformGroup)
transformGroup
- The transform group to be manipulated.public MouseBehavior(int format)
format
- flagspublic MouseBehavior(java.awt.Component c, javax.media.j3d.TransformGroup transformGroup)
c
- The Component to add the MouseListener and
MouseMotionListener to.transformGroup
- The TransformGroup to operate on.public MouseBehavior(java.awt.Component c, int format)
format
- interesting flags (wakeup conditions).Method Detail |
---|
public void setTransformGroup(javax.media.j3d.TransformGroup transformGroup)
transformGroup
- The *new* transform group to be manipulated.public javax.media.j3d.TransformGroup getTransformGroup()
public void initialize()
initialize
in class javax.media.j3d.Behavior
public void wakeup()
public void processMouseEvent(java.awt.event.MouseEvent evt)
public abstract void processStimulus(java.util.Enumeration criteria)
processStimulus
in class javax.media.j3d.Behavior
public void addListener(java.awt.Component c)
c
- The component to add the MouseListener, MouseWheelListener and
MouseMotionListener to.
java.lang.IllegalStateException
- if the behavior was not created
as a listenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void setEnable(boolean state)
setEnable
in class javax.media.j3d.Behavior
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |