public abstract class MouseBehavior extends Behavior implements MouseListener, MouseMotionListener, MouseWheelListener
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
buttonPress  | 
protected 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 WakeupOr | 
mouseCriterion  | 
protected WakeupCriterion[] | 
mouseEvents  | 
protected LinkedList | 
mouseq  | 
protected boolean | 
reset  | 
protected TransformGroup | 
transformGroup  | 
protected Transform3D | 
transformX  | 
protected 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,
             TransformGroup transformGroup)
Creates a mouse behavior that uses AWT listeners and behavior
 posts rather than WakeupOnAWTEvent. 
 | 
MouseBehavior(int format)
Initializes standard fields. 
 | 
MouseBehavior(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. 
 | 
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)
Enables or disables this Behavior. 
 | 
void | 
setTransformGroup(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, setPickableclearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toStringprotected WakeupCriterion[] mouseEvents
protected WakeupOr mouseCriterion
protected int x
protected int y
protected int x_last
protected int y_last
protected TransformGroup transformGroup
protected Transform3D transformX
protected Transform3D transformY
protected 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(TransformGroup transformGroup)
transformGroup - The transform group to be manipulated.public MouseBehavior(int format)
format - flagspublic MouseBehavior(Component c, 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(TransformGroup transformGroup)
transformGroup - The *new* transform group to be manipulated.public TransformGroup getTransformGroup()
public void initialize()
initialize in class Behaviorpublic void wakeup()
public void processMouseEvent(MouseEvent evt)
public abstract void processStimulus(Enumeration criteria)
processStimulus in class Behaviorcriteria - an enumeration of triggered wakeup criteria for this
 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)
Behaviorpublic void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenerCopyright © 2016–2022 SciJava. All rights reserved.