Top Description Fields Constructors Methods
org.eclipse.swt.events

public Class SelectionEvent

extends TypedEvent
Class Inheritance
Known Direct Subclasses
org.eclipse.swt.events.TreeEvent, org.eclipse.swt.events.ExpandEvent
Imports
org.eclipse.swt.widgets.*

Instances of this class are sent as a result of widgets being selected.

Note

The fields that are filled in depend on the widget.

See Also
SelectionListener, Sample code and further information

Field Summary

Modifier and TypeField and Description
public int
detail

Extra detail information about the selection, depending on the widget.

public boolean
doit

A flag indicating whether the operation should be allowed.

public int
height

The height of selected area.

public Widget
item

The item that was selected.

pack-priv static final long
public int
stateMask

The state of the keyboard modifier keys and mouse masks at the time the event was generated.

public String
text

The text of the hyperlink that was selected.

public int
width

The width of selected area.

public int
x

The x location of the selected area.

public int
y

The y location of selected area.

Inherited from org.eclipse.swt.events.TypedEvent:
datadisplaytimewidget

Constructor Summary

AccessConstructor and Description
public
SelectionEvent(Event
the untyped event containing the information
e
)

Constructs a new instance of this class based on the information in the given untyped event.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string representation of the event
toString
()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.
Inherited from org.eclipse.swt.events.TypedEvent:
getName

Field Detail

detailback to summary
public int detail

Extra detail information about the selection, depending on the widget.

Sash

ScrollBar and Slider

Table and Tree

Text

CoolItem and ToolItem

doitback to summary
public boolean doit

A flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation, depending on the widget.

heightback to summary
public int height

The height of selected area.

itemback to summary
public Widget item

The item that was selected.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.eclipse.swt.events.TypedEvent.serialVersionUID.

stateMaskback to summary
public int stateMask

The state of the keyboard modifier keys and mouse masks at the time the event was generated.

Note

Mouse button states are currently not included consistently for all widgets on all platforms. Clients should be prepared to receive button states, but should not rely on getting them everywhere.

See Also
org.eclipse.swt.SWT#MODIFIER_MASK, org.eclipse.swt.SWT#BUTTON_MASK
textback to summary
public String text

The text of the hyperlink that was selected. This will be either the text of the hyperlink or the value of its HREF, if one was specified.

Since
3.1
See Also
org.eclipse.swt.widgets.Link#setText(String)
widthback to summary
public int width

The width of selected area.

xback to summary
public int x

The x location of the selected area.

yback to summary
public int y

The y location of selected area.

Constructor Detail

SelectionEventback to summary
public SelectionEvent(Event e)

Constructs a new instance of this class based on the information in the given untyped event.

Parameters
e:Event

the untyped event containing the information

Method Detail

toStringback to summary
public String toString()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.

Returns:String

a string representation of the event

Annotations
@Override