RasterMouseEvent

Object passed to a mouse move or drag-and-drop event handler. The object has the following properties:
event    The assoiated DOM event object.
type     A string that indicates the type of event.
value    Value being dragged, set when RasterMouse.startDrag()
         was invoked.
data     Free-format data structure specified when
         RasterMouse.startDrag() was invoked.
context  Empty object used to store data during a drag and
         drop operation.
control  The RasterControl currently under the mouse.
x        Mouse pointer's current X coordinate.
y        Mouse pointer's current Y coordinate.
ctrl     True if the CONTROL key is pressed, false otherwise.
alt      True if the ALT key is pressed, false otherwise.
shift    True if the SHIFT key is pressed, false otherwise.
button   Number indicating the mouse button being pressed.
initial  A data structure containing the initial mouse and
         control keys state.
The type property indicates what the event does. The following table lists event types sent to event handlers specified via the RasterControl.setDropHandler() method:

Event Type Description enter A drag operation entered the control. Use this event to initialize any data structures your control may need to perform the drag and drop operation while the mouse is moving over the control. You may store your data structures (if any) as expandos of the context property. over A value is being dragged over a control. The control property points to your control instance, currently under the mouse pointer. The value property contains the value being dragged over the control. At this time, you may use RasterMouse methods like: RasterMouse.setCursor(), RasterMouse.showDropBorder(), RasterMouse.showDropLine(), RasterMouse.showShadeBox(), etc. to highlight possible drop targets in your control. out A drag operation is left the control. All drawings made by RasterMouse methods are automatically cleared. You can use this event however, to do any other clean up. You do not need to clear any expandos added to the context property. You may need them again if the mouse enters back in the control. drop The value was dropped over the control. This is fired when the user releases the mouse button while over your control. cancel The drag operation was cancelled while the mouse was over your control. This event may occur if the user pressed the ESC key or RasterMouse.cancelDrag() was invoked.

The following table lists event types sent to a mouseListener specified in the arguments of the RasterMouse.startDrag() method:

Event Type Description move Invoked when the mouse moves. up The mouse button was released. cancel The drag operation has ended because the user pressed the ESC key or RasterMouse.cancelDrag() was invoked. In Internet Explorer, if "mouse capture" feature was not used, the drag operation is cancelled if the mouse leave the browser window. end The drag operation has ended. This event always fires at the end of the drag operation, regardless of the "cancel" occuring. This is useful to perform cleanup of any resources used up during the drag operation.

The following table lists event types sent to a callback function specified in the arguments of the RasterMouse.addTimerListener() method:

Event Type Description timer Occurs at periodic intervals during a drag operation. This is an event that allow your control to implement auto-scrolling when the mouse is near the edge of the control.

See Also

Home Examples Download License
 
Copyright © 2010-2017 Edwin R. López