KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > ITextListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text;
12
13
14
15 /**
16  * Text listeners registered with a text viewer are informed about all
17  * modifications of an {@link org.eclipse.jface.text.ITextViewer} by means of
18  * text events. A text event describes a change as a replace operation.
19  * <p>
20  * The changes described in the event are the changes applied to the text
21  * viewer's widget (i.e., its visual representation) and not those applied to the
22  * text viewer's document. The text event can be asked to return the
23  * corresponding document event. If the text event does not contain a document
24  * event, the modification of the text viewer is a presentation change. For
25  * example, changing the visible region of a text viewer, is a presentation
26  * change. A completely empty text event represents a change of the viewer's
27  * redraw state.
28  * <p>
29  * If a text listener receives a text event, it is guaranteed that both the
30  * document and the viewer's visual representation are synchronized. If the
31  * <p>
32  * Clients may implement this interface.</p>
33  *
34  * @see org.eclipse.jface.text.ITextViewer
35  * @see org.eclipse.jface.text.TextEvent
36  * @see org.eclipse.jface.text.DocumentEvent
37  */

38 public interface ITextListener {
39
40     /**
41      * The visual representation of a text viewer this listener is registered with
42      * has been changed.
43      *
44      * @param event the description of the change
45      */

46     void textChanged(TextEvent event);
47 }
48
Popular Tags