org.wings.event
Class SDocumentEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by org.wings.event.SDocumentEvent
All Implemented Interfaces:
Serializable

public class SDocumentEvent
extends AWTEvent

A document event fire on any document change (i.e. change of a text in a STextField).

Author:
hengels
See Also:
Serialized Form

Field Summary
static int CHANGE
          An style attribute changed.
static int INSERT
          A string has been inserted.
static int REMOVE
          A string has been removed.
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SDocumentEvent(SDocument document, int offset, int length, int type)
           
 
Method Summary
 SDocument getDocument()
          Gets the source document of the change event.
 int getLength()
          Returns the length of the change.
 int getOffset()
          Returns the offset where the change in the document starts.
 int getType()
          Gets the type of the Event.
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANGE

public static final int CHANGE
An style attribute changed. DO NOT EXPECT CHARACTER CHANGES HERE! This event type will not occur inside wings!

See Also:
Constant Field Values

INSERT

public static final int INSERT
A string has been inserted.

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
A string has been removed.

See Also:
Constant Field Values
Constructor Detail

SDocumentEvent

public SDocumentEvent(SDocument document,
                      int offset,
                      int length,
                      int type)
Method Detail

getDocument

public SDocument getDocument()
Gets the source document of the change event.

Returns:
the document

getOffset

public int getOffset()
Returns the offset where the change in the document starts.

Returns:
Offset where remove/insert occured (0 = first letter)

getLength

public int getLength()
Returns the length of the change.

Returns:
The length of the insert/remove

getType

public int getType()
Gets the type of the Event.

Returns:
INSERT or REMOVE


wingS Swings ;-)