public class ClosureMouseMotionListener extends Attributable implements java.awt.event.MouseMotionListener
MouseMotionListener
.DEBUG
Constructor and Description |
---|
ClosureMouseMotionListener() |
Modifier and Type | Method and Description |
---|---|
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
setMouseAction(int type,
Closure fun)
Specifies the closure to be used to handle the given mouse motion event.
|
_getAttribute, _setAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsChar, getAttributeAsClosure, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsShort, getAttributeAsString, getKeys, getStaticAttribute, getStaticKeys, isAttribute, isStaticAttribute, removeAllAttributes, removeAllStaticAttributes, removeAttribute, removeStaticAttribute, setAttribute, setStaticAttribute, showAttributes, showAttributes
public void setMouseAction(int type, Closure fun)
type
- an integer representing the mouse action, these are the static final
constant from the MouseEvent
class.fun
- the closure should be of arity two.
The first argument as usual is the this
object, and the
second argument is the mouse motion event being handled.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