|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.TextEvent
This event is sent to implementers of ITextListener
. It represents a
change applied to text viewer. The change is specified as a replace command using
offset, length, inserted text, and replaced text. The text viewer issues a text event
after the viewer has been changed either in response to a change of the viewer's document
or when the viewer's visual content has been changed. In the first case, the text event
also carries the original document event. Depending on the viewer's presentation mode,
the text event coordinates are different from the document event's coordinates.
Client's other than text viewer's don't create instances of this class.
ITextListener
,
ITextViewer
,
DocumentEvent
Constructor Summary | |
protected |
TextEvent(int offset,
int length,
String text,
String replacedText,
DocumentEvent event,
boolean viewerRedrawState)
Creates a new TextEvent based on the specification. |
Method Summary | |
DocumentEvent |
getDocumentEvent()
Returns the corresponding document event that caused the viewer change |
int |
getLength()
Returns the length of the event. |
int |
getOffset()
Returns the offset of the event. |
String |
getReplacedText()
Returns the text replaced by this event. |
String |
getText()
Returns the text of the event. |
boolean |
getViewerRedrawState()
Returns the viewer's redraw state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected TextEvent(int offset, int length, String text, String replacedText, DocumentEvent event, boolean viewerRedrawState)
TextEvent
based on the specification.
offset
- the offsetlength
- the lengthreplacedText
- the replaced textevent
- the associated document event or null
if noneviewerRedrawState
- the redraw state of the viewerMethod Detail |
public int getOffset()
public int getLength()
public String getText()
public String getReplacedText()
public DocumentEvent getDocumentEvent()
null
if a visual change onlypublic boolean getViewerRedrawState()
true
if the viewer's redraw state is true
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |