| |
|
| java.awt.AWTEvent java.awt.event.TextEvent
TextEvent | public class TextEvent extends AWTEvent (Code) | | A semantic event which indicates that an object's text changed.
This high-level event is generated by an object (such as a TextComponent)
when its text changes. The event is passed to
every TextListener object which registered to receive such
events using the component's addTextListener method.
The object that implements the TextListener interface gets
this TextEvent when the event occurs. The listener is
spared the details of processing individual mouse movements and key strokes
Instead, it can process a "meaningful" (semantic) event like "text changed".
author: Georges Saab version: 1.26 06/05/07 See Also: java.awt.TextComponent See Also: TextListener See Also: Tutorial: Writing a Text Listener since: 1.1 |
Field Summary | |
final public static int | TEXT_FIRST The first number in the range of ids used for text events. | final public static int | TEXT_LAST The last number in the range of ids used for text events. | final public static int | TEXT_VALUE_CHANGED This event id indicates that object's text changed. |
Constructor Summary | |
public | TextEvent(Object source, int id) Constructs a TextEvent object.
Note that passing in an invalid id results in
unspecified behavior. |
Method Summary | |
public String | paramString() Returns a parameter string identifying this text event. |
TEXT_FIRST | final public static int TEXT_FIRST(Code) | | The first number in the range of ids used for text events.
|
TEXT_LAST | final public static int TEXT_LAST(Code) | | The last number in the range of ids used for text events.
|
TEXT_VALUE_CHANGED | final public static int TEXT_VALUE_CHANGED(Code) | | This event id indicates that object's text changed.
|
TextEvent | public TextEvent(Object source, int id)(Code) | | Constructs a TextEvent object.
Note that passing in an invalid id results in
unspecified behavior. This method throws an
IllegalArgumentException if source
is null .
Parameters: source - the (TextComponent ) object thatoriginated the event Parameters: id - an integer that identifies the event type throws: IllegalArgumentException - if source is null |
paramString | public String paramString()(Code) | | Returns a parameter string identifying this text event.
This method is useful for event-logging and for debugging.
a string identifying the event and its attributes |
|
|
|