KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.eclipse.swt.graphics.Font;
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17
18
19 /**
20  * A vertical ruler column is an element that can be added to a composite
21  * vertical ruler ({@link org.eclipse.jface.text.source.CompositeRuler}). A
22  * composite vertical ruler is a vertical ruler with dynamically changing
23  * appearance and behavior depending on its actual arrangement of ruler columns.
24  * A vertical ruler column supports a subset of the contract of a vertical
25  * ruler.
26  *
27  * @see org.eclipse.jface.text.source.CompositeRuler
28  * @since 2.0
29  */

30 public interface IVerticalRulerColumn {
31
32     /**
33      * Associates an annotation model with this ruler column.
34      * A value <code>null</code> is acceptable and clears the ruler.
35      *
36      * @param model the new annotation model, may be <code>null</code>
37      */

38     void setModel(IAnnotationModel model);
39
40     /**
41      * Redraws this column.
42      */

43     void redraw();
44
45     /**
46      * Creates the column's SWT control.
47      *
48      * @param parentRuler the parent ruler of this column
49      * @param parentControl the control of the parent ruler
50      * @return the column's SWT control
51      */

52     Control createControl(CompositeRuler parentRuler, Composite parentControl);
53
54     /**
55      * Returns the column's SWT control.
56      *
57      * @return the column's SWT control
58      */

59     Control getControl();
60
61     /**
62      * Returns the width of this column's control.
63      *
64      * @return the width of this column's control
65      */

66     int getWidth();
67
68     /**
69      * Sets the font of this ruler column.
70      *
71      * @param font the new font of the ruler column
72      */

73     void setFont(Font font);
74 }
75
Popular Tags