Creating Behaviors
AWT Event Wakeup
- A behavior can wakeup when a specified AWT event arrives:
- Mouse button press, release, drag
- Other AWT events
- To use the mouse to rotate geometry:
- Wake up a behavior on mouse press, release, and drag
- On each drag event, compute distance mouse has moved
since press and map to rotation angle
- Create a rotation transform and write to a
TransformGroup