KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.eclipse.swt.events.VerifyEvent;
16
17 /**
18  * Implementers can register with a text viewer and receive
19  * <code>VerifyEvent</code>s before the text viewer they are registered with.
20  * If the event consumer marks events as processed by turning their
21  * <code>doit</code> field to <code>false</code> the text viewer
22  * subsequently ignores them.</p>
23  * <p>
24  * Clients may implement this interface.</p>
25  * <p>
26  * {@link org.eclipse.jface.text.ITextViewerExtension2}allows clients to manage
27  * the {@link org.eclipse.swt.events.VerifyListener}s of a text viewer. This
28  * makes <code>IEventConsumer</code> obsolete.</p>
29  *
30  * @see org.eclipse.jface.text.ITextViewer
31  * @see org.eclipse.jface.text.ITextViewerExtension2
32  * @see org.eclipse.swt.events.VerifyEvent
33  */

34 public interface IEventConsumer {
35
36     /**
37      * Processes the given event and marks it as done if it should
38      * be ignored by subsequent receivers.
39      *
40      * @param event the verify event which will be investigated
41      */

42     public void processEvent(VerifyEvent event);
43 }
44
Popular Tags