KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 import org.eclipse.swt.graphics.GC;
14 import org.eclipse.swt.graphics.Rectangle;
15 import org.eclipse.swt.widgets.Canvas;
16
17 /**
18  * Interface for annotations that can take care of their own visible representation.
19  *
20  * @since 3.0
21  */

22 public interface IAnnotationPresentation {
23
24     /**
25      * The default annotation layer.
26      */

27     static final int DEFAULT_LAYER= 0;
28
29
30     /**
31      * Returns the annotations drawing layer.
32      *
33      * @return the annotations drawing layer
34      */

35     int getLayer();
36
37     /**
38      * Implement this method to draw a graphical representation
39      * of this annotation within the given bounds.
40      * <p>
41      * <em>Note that this method is not used when drawing annotations on the editor's
42      * text widget. This is handled trough a {@link org.eclipse.jface.text.source.AnnotationPainter.IDrawingStrategy}.</em>
43      * </p>
44      * @param gc the drawing GC
45      * @param canvas the canvas to draw on
46      * @param bounds the bounds inside the canvas to draw on
47      */

48     void paint(GC gc, Canvas canvas, Rectangle bounds);
49 }
50
Popular Tags