Eclipse Platform
2.0

org.eclipse.swt.widgets
Class Event

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Event

public class Event
extends Object

Instances of this class provide a description of a particular event which occurred within SWT. The SWT untyped listener API uses these instances for all event dispatching.

Note: For a given event, only the fields which are appropriate will be filled in. The contents of the fields which are not used by the event are unspecified.

See Also:
Listener, TypedEvent

Field Summary
 int button
           
 char character
           
 int count
           
 Object data
           
 int detail
           
 Display display
          the display where the event occurred
 boolean doit
           
 int end
           
 GC gc
           
 int height
           
 Widget item
           
 int keyCode
           
 int start
           
 int stateMask
           
 String text
           
 int time
           
 int type
          the type of event, as defined by the event type constants in class SWT
 Widget widget
          the widget that the event occurred in
 int width
           
 int x
           
 int y
           
 
Constructor Summary
Event()
           
 
Method Summary
 Rectangle getBounds()
          Gets the bounds.
 void setBounds(Rectangle rect)
          Sets the bounds.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type
the type of event, as defined by the event type constants in class SWT

See Also:
SWT

display

public Display display
the display where the event occurred

Since:
2.0

widget

public Widget widget
the widget that the event occurred in


item

public Widget item

gc

public GC gc

detail

public int detail

x

public int x

y

public int y

width

public int width

height

public int height

time

public int time

count

public int count

button

public int button

keyCode

public int keyCode

stateMask

public int stateMask

character

public char character

start

public int start

end

public int end

text

public String text

doit

public boolean doit

data

public Object data
Constructor Detail

Event

public Event()
Method Detail

getBounds

public Rectangle getBounds()
Gets the bounds.

Returns:
a rectangle that is the bounds.

setBounds

public void setBounds(Rectangle rect)
Sets the bounds.


toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.