Home » openjdk-7 » java » awt » event » [javadoc | source]
java.awt.event
public class: TextEvent [javadoc | source]
java.lang.Object
   java.util.EventObject
      java.awt.AWTEvent
         java.awt.event.TextEvent

All Implemented Interfaces:
    Serializable

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

An unspecified behavior will be caused if the {@code id} parameter of any particular {@code TextEvent} instance is not in the range from {@code TEXT_FIRST} to {@code TEXT_LAST}.

Field Summary
public static final  int TEXT_FIRST    The first number in the range of ids used for text events. 
public static final  int TEXT_LAST    The last number in the range of ids used for text events. 
public static final  int TEXT_VALUE_CHANGED    This event id indicates that object's text changed. 
Fields inherited from java.awt.AWTEvent:
id,  consumed,  focusManagerIsDispatching,  isPosted,  COMPONENT_EVENT_MASK,  CONTAINER_EVENT_MASK,  FOCUS_EVENT_MASK,  KEY_EVENT_MASK,  MOUSE_EVENT_MASK,  MOUSE_MOTION_EVENT_MASK,  WINDOW_EVENT_MASK,  ACTION_EVENT_MASK,  ADJUSTMENT_EVENT_MASK,  ITEM_EVENT_MASK,  TEXT_EVENT_MASK,  INPUT_METHOD_EVENT_MASK,  INPUT_METHODS_ENABLED_MASK,  PAINT_EVENT_MASK,  INVOCATION_EVENT_MASK,  HIERARCHY_EVENT_MASK,  HIERARCHY_BOUNDS_EVENT_MASK,  MOUSE_WHEEL_EVENT_MASK,  WINDOW_STATE_EVENT_MASK,  WINDOW_FOCUS_EVENT_MASK,  RESERVED_ID_MAX
Fields inherited from java.util.EventObject:
source
Constructor:
 public TextEvent(Object source,
    int id) 
    Constructs a TextEvent object.

    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. For information on allowable values, see the class description for TextEvent
    Throws:
    IllegalArgumentException - if source is null
    Also see:
    getSource()
    getID()
Method from java.awt.event.TextEvent Summary:
paramString
Methods from java.awt.AWTEvent:
consume,   convertToOld,   copyPrivateDataInto,   dispatched,   getAccessControlContext,   getID,   isConsumed,   paramString,   setSource,   toString
Methods from java.util.EventObject:
getSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.event.TextEvent Detail:
 public String paramString() 
    Returns a parameter string identifying this text event. This method is useful for event-logging and for debugging.