Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2c442e6933f706fd2be70acf4a0c24565b64f5ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.jface.text.source;


import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;


/**
 * A <code>IVerticalRulerColumn</code> is an element that can be added
 * to a composite vertical ruler. A composite vertical ruler is a vertical ruler
 * with a dynamically changing appearance and behavior depending on its
 * actual arrangement of ruler columns. A vertical ruler column supports a
 * subset of the contract of a  vertical ruler.
 * 
 * @see org.eclipse.jface.text.source.CompositeRuler
 * @since 2.0
 */
public interface IVerticalRulerColumn {

	/**
	 * Associates an annotation model with this ruler column.
	 * A value <code>null</code> is acceptable and clears the ruler.
	 *
	 * @param model the new annotation model, may be <code>null</code>
	 */
	void setModel(IAnnotationModel model);
		
	/**
	 * Redraws this column.
	 */
	void redraw();
	
	/**
	 * Creates the column's SWT control.
	 *
	 * @param parentRuler the parent ruler of this column
	 * @param parentControl the control of the parent ruler
	 * @return the column's SWT control
	 */
	Control createControl(CompositeRuler parentRuler, Composite parentControl);
	
	/**
	 * Returns the column's SWT control.
	 *
	 * @return the column's SWT control
	 */
	Control getControl();
	
	/**
	 * Returns the width of this column's control.
	 *
	 * @return the width of this column's control
	 */
	int getWidth();
	
	/**
	 * Sets the font of this ruler column.
	 * 
	 * @param font the new font of the ruler column
	 */
	void setFont(Font font);
}

Back to the top