Type Event
RWT Scripting analoge to org.eclipse.swt.widgets.Event
Field Attributes | Field Name and Description |
---|---|
the button that was pressed or released; 1 for the first button, 2 for the
second button, and 3 for the third button, etc.
|
|
depending on the event, the character represented by the key that was
typed.
|
|
depending on the event, a flag indicating whether the operation should be
allowed.
|
|
the graphics context to use when painting.
|
|
depending on the event, the key code of the key that was typed, as defined
by the key code constants in class
SWT . |
|
depending on the event, the range of text being modified.
|
|
depending on the event, the state of the keyboard modifier keys and mouse
masks at the time the event was generated.
|
|
depending on the event, the new text that will be inserted.
|
|
the type of event, as defined by the event type constants in the SWT object.
|
|
an object representing the widget that issued the event.
|
|
x coordinate of the pointer at the time of the event
Set for MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.
|
|
y coordinate of the pointer at the time of the event
Set for MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.
|
Type Detail
<private>
Event(eventType, originalTarget, originalEvent)
Objects of this type are given to the handleEvent function (JavaScript) of
org.eclipse.rap.rwt.scripting.ClientListener (Java) instances.
- Parameters:
- eventType
- originalTarget
- originalEvent
- Since:
- 2.2
- See:
- SWT
Field Detail
button
the button that was pressed or released; 1 for the first button, 2 for the
second button, and 3 for the third button, etc.
Set for MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.
character
depending on the event, the character represented by the key that was
typed. This is the final character that results after all modifiers have
been applied. For non-printable keys (like arrow-keys) this field is not set.
Changing its value has no effect.
Set for KeyDown, KeyUp and Verify.
doit
depending on the event, a flag indicating whether the operation should be
allowed. Setting this field to false will cancel the operation.
Effective on KeyDown, KeyUp and Verify.
gc
the graphics context to use when painting.
It supports a subset of the HTML5 Canvas API.
Fields:- strokeStyle
- fillStyle
- lineWidth
- lineJoin
- lineCap
- miterLimit
- globalAlpha
- save
- restore
- beginPath
- closePath
- clearRect (Limitation: in IE 7/8 arguments are ignored, the entire canvas is cleared)
- stroke
- fill
- moveTo
- lineTo
- quadraticCurveTo
- bezierCurveTo
- rect
- arc
- drawImage
- createLinearGradient (Limitations: In IE 7/8, the gradient can be only be drawn either vertically or horizontally. Calls to "addColorStop" must be in the order of the offsets and can not overwrite previous colorsStops)
keyCode
depending on the event, the key code of the key that was typed, as defined
by the key code constants in class
SWT
. When the character
field of the event is ambiguous, this field contains the unaffected value
of the original character. For example, typing Shift+M or M result in different
characters ( 'M' and 'm' ), but the same keyCode (109, character code for 'm').
start
depending on the event, the range of text being modified. Setting these
fields has no effect.
Set for Verify.
stateMask
depending on the event, the state of the keyboard modifier keys and mouse
masks at the time the event was generated.
Set for KeyDown, KeyUp, MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.
text
depending on the event, the new text that will be inserted.
Setting this field will change the text that is about to
be inserted or deleted.
Set for Verify.
type
the type of event, as defined by the event type constants in the SWT object.
widget
an object representing the widget that issued the event.
- See:
- rap.getObject
x
x coordinate of the pointer at the time of the event
Set for MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.
y
y coordinate of the pointer at the time of the event
Set for MouseDown, MouseUp, MouseMove, MouseEvnet, MouseExit and MouseDoubleClick.