Back to:
Bean Index,
SceneBeans Documentation.
MouseMotion
An input bean that converts the movement of the mouse into positional
and angular behaviours, mapping from device space to its own coordinate
space.
Features
| XML Element |
XML Type |
Java Class |
| input |
mouseMotion |
uk.ac.ic.doc.scenebeans.MouseMotion |
Properties
| Name |
Type |
Default Value |
Getter Method |
Setter Method |
Description |
| active |
boolean |
true |
isActive
|
setActive
|
Whether the bean is updating its behaviour listeners or not. Setting
this property to false "turns off" the behaviours; setting it to true
turns them on again.
|
| dragged |
boolean |
true |
isDragged
|
setDragged
|
Whether the bean is updates its behaviour only when the user drags the
mouse with a button pressed (true), or all the time,
irrespective of the state of the mouse buttons (false).
|
Behaviour Facets
| Name |
Behaviour Type |
Getter Method |
Description |
| angle |
double |
getAngleFacet |
The angle from the origin of the coordinate space of the MouseClick bean
to the position of the mouse pointer.
|
| x |
double |
getxFacet |
The x coordinate of the mouse pointer in the coordinate space of
the MouseClick bean.
|
| y |
double |
getyFacet |
The y coordinate of the mouse pointer in the coordinate space of
the MouseClick bean.
|
| position |
java.awt.geom. Point2D |
getPositionFacet |
The position of the mouse pointer in the coordinate space of the
MouseClick bean.
|
Example XML
<input type="mouseMotion" id="drag">
<param name="active" value="false"/>
<transform type="translate">
<param name="translation" value="(32,32)"/>
<animate param="translation" behaviour="drag" facet="position"/>
<primitive type="circle">
<param name="radius" value="16"/>
</primitive>
</transform>
</input>