Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing.event
Interface DocumentEvent

All Known Implementing Classes:
  AbstractDocument.DefaultDocumentEvent

public abstract interface DocumentEvent

Interface for document change notifications.

Inner Class Summary
`static interface` | `DocumentEvent.ElementChange` Describes changes made to an element.
`static class` | `DocumentEvent.EventType` Typesafe enumeration for document event types

Method Summary
`DocumentEvent.ElementChange` | `getChange(Element elem)` Gets the change information for the given element.
`Document` | `getDocument()` Gets the document that sourced the change event.
`int` | `getLength()` Returns the length of the change.
`int` | `getOffset()` Returns the offset within the document of the start of the change.
`DocumentEvent.EventType` | `getType()` Gets the type of event.

Method Detail

### getOffset

    public int getOffset()

  Returns the offset within the document of the start of the change.
  Returns:
    the offset >= 0

### getLength

    public int getLength()

  Returns the length of the change.
  Returns:
    the length >= 0

### getDocument

    public Document getDocument()

  Gets the document that sourced the change event.

### getType

    public DocumentEvent.EventType getType()

  Gets the type of event.
  Returns:
    the type

### getChange

    public DocumentEvent.ElementChange getChange(Element elem)

  Gets the change information for the given element. The change information describes what elements were added and removed and the location. If there were no changes, null is returned.
  Parameters:
    `elem` - the element
  Returns:
    the change information, or null if the element was not modified

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.