java.awt.event
Class TextEvent
- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- java.awt.event.TextEvent
-
- All Implemented Interfaces:
- java.io.Serializable
public class TextEvent extends AWTEventA 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 everyTextListenerobject which registered to receive such events using the component'saddTextListenermethod.The object that implements the
TextListenerinterface gets thisTextEventwhen 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".An unspecified behavior will be caused if the
idparameter of any particularTextEventinstance is not in the range fromTEXT_FIRSTtoTEXT_LAST.- Since:
- 1.1
- See Also:
TextComponent,TextListener, Serialized Form
-
-
Fields Modifier and Type Field and Description 
ACTION_EVENT_MASK 
The event mask for selecting action events.
ADJUSTMENT_EVENT_MASK 
The event mask for selecting adjustment events.
COMPONENT_EVENT_MASK 
The event mask for selecting component events.
consumed 
Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not.
CONTAINER_EVENT_MASK 
The event mask for selecting container events.
FOCUS_EVENT_MASK 
The event mask for selecting focus events.
HIERARCHY_BOUNDS_EVENT_MASK 
The event mask for selecting hierarchy bounds events.
HIERARCHY_EVENT_MASK 
The event mask for selecting hierarchy events.
id 
The event's id.
INPUT_METHOD_EVENT_MASK 
The event mask for selecting input method events.
INVOCATION_EVENT_MASK 
The event mask for selecting invocation events.
ITEM_EVENT_MASK 
The event mask for selecting item events.
KEY_EVENT_MASK 
The event mask for selecting key events.
MOUSE_EVENT_MASK 
The event mask for selecting mouse events.
MOUSE_MOTION_EVENT_MASK 
The event mask for selecting mouse motion events.
MOUSE_WHEEL_EVENT_MASK 
The event mask for selecting mouse wheel events.
PAINT_EVENT_MASK 
The event mask for selecting paint events.
RESERVED_ID_MAX 
The maximum value for reserved AWT event IDs.
source 
The object on which the Event initially occurred.
TEXT_EVENT_MASK 
The event mask for selecting text events.
TEXT_FIRST 
The first number in the range of ids used for text events.
TEXT_LAST 
The last number in the range of ids used for text events.
TEXT_VALUE_CHANGED 
This event id indicates that object's text changed.
WINDOW_EVENT_MASK 
The event mask for selecting window events.
WINDOW_FOCUS_EVENT_MASK 
The event mask for selecting window focus events.
WINDOW_STATE_EVENT_MASK 
The event mask for selecting window state events.
-
Methods Modifier and Type Method and Description 
consume 
Consumes this event, if this event can be consumed.
getID 
Returns the event type.
getSource 
The object on which the Event initially occurred.
isConsumed 
Returns whether this event has been consumed.
paramString 
Returns a parameter string identifying this text event.
setSource 
Retargets an event to a new source.
toString 
Returns a String representation of this object.
-
