java.awt.event
Class TextEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent 
          extended by java.awt.event.TextEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class TextEvent
extends AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent

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".

Since:
1.1
See Also:
TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent , TextListener sample code for java.awt.event.TextListener definition code for java.awt.event.TextListener , Tutorial: Writing a Text Listener, Reference: The Java Class Libraries (update file), Serialized Form

Field Summary
static int TEXT_FIRST sample code for java.awt.event.TextEvent.TEXT_FIRST definition code for java.awt.event.TextEvent.TEXT_FIRST
          The first number in the range of ids used for text events.
static int TEXT_LAST sample code for java.awt.event.TextEvent.TEXT_LAST definition code for java.awt.event.TextEvent.TEXT_LAST
          The last number in the range of ids used for text events.
static int TEXT_VALUE_CHANGED sample code for java.awt.event.TextEvent.TEXT_VALUE_CHANGED definition code for java.awt.event.TextEvent.TEXT_VALUE_CHANGED
          This event id indicates that object's text changed.
 
Fields inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
ACTION_EVENT_MASK sample code for java.awt.AWTEvent.ACTION_EVENT_MASK definition code for java.awt.AWTEvent.ACTION_EVENT_MASK , ADJUSTMENT_EVENT_MASK sample code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK definition code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK , COMPONENT_EVENT_MASK sample code for java.awt.AWTEvent.COMPONENT_EVENT_MASK definition code for java.awt.AWTEvent.COMPONENT_EVENT_MASK , consumed sample code for java.awt.AWTEvent.consumed definition code for java.awt.AWTEvent.consumed , CONTAINER_EVENT_MASK sample code for java.awt.AWTEvent.CONTAINER_EVENT_MASK definition code for java.awt.AWTEvent.CONTAINER_EVENT_MASK , FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.FOCUS_EVENT_MASK , HIERARCHY_BOUNDS_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK , HIERARCHY_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK , id sample code for java.awt.AWTEvent.id definition code for java.awt.AWTEvent.id , INPUT_METHOD_EVENT_MASK sample code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK definition code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK , INVOCATION_EVENT_MASK sample code for java.awt.AWTEvent.INVOCATION_EVENT_MASK definition code for java.awt.AWTEvent.INVOCATION_EVENT_MASK , ITEM_EVENT_MASK sample code for java.awt.AWTEvent.ITEM_EVENT_MASK definition code for java.awt.AWTEvent.ITEM_EVENT_MASK , KEY_EVENT_MASK sample code for java.awt.AWTEvent.KEY_EVENT_MASK definition code for java.awt.AWTEvent.KEY_EVENT_MASK , MOUSE_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_EVENT_MASK , MOUSE_MOTION_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK , MOUSE_WHEEL_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK , PAINT_EVENT_MASK sample code for java.awt.AWTEvent.PAINT_EVENT_MASK definition code for java.awt.AWTEvent.PAINT_EVENT_MASK , RESERVED_ID_MAX sample code for java.awt.AWTEvent.RESERVED_ID_MAX definition code for java.awt.AWTEvent.RESERVED_ID_MAX , TEXT_EVENT_MASK sample code for java.awt.AWTEvent.TEXT_EVENT_MASK definition code for java.awt.AWTEvent.TEXT_EVENT_MASK , WINDOW_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_EVENT_MASK , WINDOW_FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK , WINDOW_STATE_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
TextEvent sample code for java.awt.event.TextEvent.TextEvent(java.lang.Object, int) definition code for java.awt.event.TextEvent.TextEvent(java.lang.Object, int) (Object sample code for java.lang.Object definition code for java.lang.Object  source, int id)
          Constructs a TextEvent object.
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String paramString sample code for java.awt.event.TextEvent.paramString() definition code for java.awt.event.TextEvent.paramString() ()
          Returns a parameter string identifying this text event.
 
Methods inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
consume sample code for java.awt.AWTEvent.consume() definition code for java.awt.AWTEvent.consume() , getID sample code for java.awt.AWTEvent.getID() definition code for java.awt.AWTEvent.getID() , isConsumed sample code for java.awt.AWTEvent.isConsumed() definition code for java.awt.AWTEvent.isConsumed() , setSource sample code for java.awt.AWTEvent.setSource(java.lang.Object) definition code for java.awt.AWTEvent.setSource(java.lang.Object) , toString sample code for java.awt.AWTEvent.toString() definition code for java.awt.AWTEvent.toString()
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

TEXT_FIRST sample code for java.awt.event.TextEvent.TEXT_FIRST

public static final int TEXT_FIRST
The first number in the range of ids used for text events.

See Also:
Constant Field Values

TEXT_LAST sample code for java.awt.event.TextEvent.TEXT_LAST

public static final int TEXT_LAST
The last number in the range of ids used for text events.

See Also:
Constant Field Values

TEXT_VALUE_CHANGED sample code for java.awt.event.TextEvent.TEXT_VALUE_CHANGED

public static final int TEXT_VALUE_CHANGED
This event id indicates that object's text changed.

See Also:
Constant Field Values
Constructor Detail

TextEvent sample code for java.awt.event.TextEvent(java.lang.Object, int) definition code for java.awt.event.TextEvent(java.lang.Object, int)

public TextEvent(Object sample code for java.lang.Object definition code for java.lang.Object  source,
                 int id)
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 that originated the event
id - an integer that identifies the event type
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if source is null
Method Detail

paramString sample code for java.awt.event.TextEvent.paramString() definition code for java.awt.event.TextEvent.paramString()

public String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a parameter string identifying this text event. This method is useful for event-logging and for debugging.

Overrides:
paramString sample code for java.awt.AWTEvent.paramString() definition code for java.awt.AWTEvent.paramString() in class AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
Returns:
a string identifying the event and its attributes