KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > source > IVerticalRulerInfoExtension


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.source;
12
13 /**
14  * Extension interface for
15  * {@link org.eclipse.jface.text.source.IVerticalRulerInfo}.
16  * <p>
17  * Introduces the ability to define a custom hover to be used when hovering over
18  * the vertical ruler described by this info instance, and to specify the
19  * annotation model used by it.
20  * <p>
21  * It also allows client to register as listeners on the represented vertical
22  * ruler and sends out notifications similar to selection events such as that a
23  * particular annotation presented in the vertical ruler has been selected.
24  *
25  * @see org.eclipse.jface.text.source.IVerticalRuler
26  * @see org.eclipse.jface.text.source.IAnnotationModel
27  * @since 3.0
28  */

29 public interface IVerticalRulerInfoExtension {
30     /**
31      * Returns the hover for this vertical ruler (column).
32      *
33      * @return the hover for this column
34      */

35     IAnnotationHover getHover();
36
37     /**
38      * Returns the model currently used by the receiver.
39      *
40      * @return the model of the receiver, or <code>null</code> if no model is
41      * installed.
42      */

43     IAnnotationModel getModel();
44
45     /**
46      * Registers a vertical ruler listener to be informed if an annotation gets
47      * selected on the vertical ruler.
48      *
49      * @param listener the listener to be informed
50      */

51     void addVerticalRulerListener(IVerticalRulerListener listener);
52
53     /**
54      * Removes a previously registered listener. If <code>listener</code> is not registered
55      * with the receiver, calling this method has no effect.
56      *
57      * @param listener the listener to be removed
58      */

59     void removeVerticalRulerListener(IVerticalRulerListener listener);
60 }
61
Popular Tags