java.awt.event

Class TextEvent

public class TextEvent extends AWTEvent

This event is generated when a text box changes contents. This is an abstraction that distills a large number of individual mouse or keyboard events into a simpler "text changed" event.

Since: 1.1

See Also: TextComponent TextListener

UNKNOWN: updated to 1.4

Field Summary
static intTEXT_FIRST
This is the first id in the range of event ids used by this class.
static intTEXT_LAST
This is the last id in the range of event ids used by this class.
static intTEXT_VALUE_CHANGED
This event id indicates that the text of an object has changed.
Constructor Summary
TextEvent(Object source, int id)
Initializes a new instance of TextEvent with the specified source and id.
Method Summary
StringparamString()
Returns a string identifying this event.

Field Detail

TEXT_FIRST

public static final int TEXT_FIRST
This is the first id in the range of event ids used by this class.

TEXT_LAST

public static final int TEXT_LAST
This is the last id in the range of event ids used by this class.

TEXT_VALUE_CHANGED

public static final int TEXT_VALUE_CHANGED
This event id indicates that the text of an object has changed.

Constructor Detail

TextEvent

public TextEvent(Object source, int id)
Initializes a new instance of TextEvent with the specified source and id. Note that an invalid id leads to unspecified results.

Parameters: source the (TextComponent) object that generated this event id the event id

Throws: IllegalArgumentException if source is null

Method Detail

paramString

public String paramString()
Returns a string identifying this event. This is "TEXT_VALUE_CHANGED".

Returns: a string identifying this event