Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Class DocumentEvent

java.lang.Object
  extended by 
org.eclipse.jface.text.DocumentEvent
Direct Known Subclasses:
SlaveDocumentEvent

public class DocumentEvent
extends Object

Specification of changes applied to documents. All changes are represented as replace commands, i.e. specifying a document range whose text gets replaced with different text. In addition to this information, the event also contains the changed document.

See Also:
IDocument

Field Summary
  IDocument fDocument
          The changed document
 int fLength
          Length of the replaced document text
 long fModificationStamp
          The modification stamp of the document when firing this event.
 int fOffset
          The document offset
  String fText
          Text inserted into the document
 
Constructor Summary
DocumentEvent ()
          Creates a new, not initialized document event.
DocumentEvent ( IDocument doc, int offset, int length, String text)
          Creates a new document event.
 
Method Summary
  IDocument getDocument ()
          Returns the changed document.
 int getLength ()
          Returns the length of the replaced text.
 long getModificationStamp ()
          Returns the document's modification stamp at the time when this event was sent.
 int getOffset ()
          Returns the offset of the change.
  String getText ()
          Returns the text that has been inserted.
  String toString ()
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fDocument

public 
IDocument fDocument
The changed document


fOffset

public int fOffset
The document offset


fLength

public int fLength
Length of the replaced document text


fText

public 
String fText
Text inserted into the document


fModificationStamp

public long fModificationStamp
The modification stamp of the document when firing this event.

Since:
3.1 and public since 3.3
Constructor Detail

DocumentEvent

public DocumentEvent(
IDocument doc,
                     int offset,
                     int length,
                     
String text)
Creates a new document event.

Parameters:
doc - the changed document
offset - the offset of the replaced text
length - the length of the replaced text
text - the substitution text

DocumentEvent

public DocumentEvent()
Creates a new, not initialized document event.

Method Detail

getDocument

public 
IDocument getDocument()
Returns the changed document.

Returns:
the changed document

getOffset

public int getOffset()
Returns the offset of the change.

Returns:
the offset of the change

getLength

public int getLength()
Returns the length of the replaced text.

Returns:
the length of the replaced text

getText

public 
String getText()
Returns the text that has been inserted.

Returns:
the text that has been inserted

getModificationStamp

public long getModificationStamp()
Returns the document's modification stamp at the time when this event was sent.

Returns:
the modification stamp or IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP.
Since:
3.1
See Also:
IDocumentExtension4.getModificationStamp()

toString

public 
String toString()
Overrides:
toString in class Object

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire