public abstract class MouseBehavior extends javax.media.j3d.Behavior implements MouseListener, MouseMotionListener, MouseWheelListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
buttonPress |
protected javax.media.j3d.Transform3D |
currXform |
protected boolean |
enable |
protected int |
flags |
protected boolean |
invert |
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.
|
protected javax.media.j3d.WakeupOr |
mouseCriterion |
protected javax.media.j3d.WakeupCriterion[] |
mouseEvents |
protected LinkedList |
mouseq |
protected boolean |
reset |
protected javax.media.j3d.TransformGroup |
transformGroup |
protected javax.media.j3d.Transform3D |
transformX |
protected javax.media.j3d.Transform3D |
transformY |
protected boolean |
wakeUp |
protected int |
x |
protected int |
x_last |
protected int |
y |
protected int |
y_last |
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 and Description |
|---|
MouseBehavior(Component c,
int format)
Creates a mouse behavior that uses AWT listeners and behavior
posts rather than WakeupOnAWTEvent.
|
MouseBehavior(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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(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(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) |
void |
mouseWheelMoved(MouseWheelEvent e) |
void |
processMouseEvent(MouseEvent evt)
Handles mouse events
|
abstract void |
processStimulus(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.
|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOncloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableprotected javax.media.j3d.WakeupCriterion[] mouseEvents
protected javax.media.j3d.WakeupOr mouseCriterion
protected int x
protected int y
protected int x_last
protected int y_last
protected javax.media.j3d.TransformGroup transformGroup
protected javax.media.j3d.Transform3D transformX
protected javax.media.j3d.Transform3D transformY
protected javax.media.j3d.Transform3D currXform
protected boolean buttonPress
protected boolean reset
protected boolean invert
protected boolean wakeUp
protected int flags
protected LinkedList mouseq
protected boolean enable
public static final int MANUAL_WAKEUP
public static final int INVERT_INPUT
public MouseBehavior(javax.media.j3d.TransformGroup transformGroup)
transformGroup - The transform group to be manipulated.public MouseBehavior(int format)
format - flagspublic MouseBehavior(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(Component c, int format)
format - interesting flags (wakeup conditions).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.Behaviorpublic void wakeup()
public void processMouseEvent(MouseEvent evt)
public abstract void processStimulus(Enumeration criteria)
processStimulus in class javax.media.j3d.Behaviorpublic void addListener(Component c)
c - The component to add the MouseListener, MouseWheelListener and
MouseMotionListener to.IllegalStateException - if the behavior was not created
as a listenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void setEnable(boolean state)
setEnable in class javax.media.j3d.Behaviorpublic void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenerCopyright © 2015. All rights reserved.