Eclipse Platform
2.0

org.eclipse.jface.text.source
Interface IVerticalRulerInfo

All Known Subinterfaces:
IVerticalRuler
All Known Implementing Classes:
CompositeRuler, VerticalRuler

public interface IVerticalRulerInfo

A vertical ruler is a visual component which may serve text viewers as a line oriented annotation presentation area. The ruler info provides interested clients with the mapping and interaction aspect of the vertical ruler. This covers the mapping between coordinates of the ruler's control and line numbers based on the connected text viewer's document.

Since:
2.0

Method Summary
 Control getControl()
          Returns the ruler's SWT control.
 int getLineOfLastMouseButtonActivity()
          Returns the line number of the last mouse button activity.
 int getWidth()
          Returns the width of this ruler's control.
 int toDocumentLineNumber(int y_coordinate)
          Translates a y-coordinate of the ruler's SWT control into the according line number of the document of the connected text viewer.
 

Method Detail

getControl

public Control getControl()
Returns the ruler's SWT control.

Returns:
the ruler's SWT control

getLineOfLastMouseButtonActivity

public int getLineOfLastMouseButtonActivity()
Returns the line number of the last mouse button activity. Based on the input document of the connected text viewer.

Returns:
the line number of the last mouse button activity

toDocumentLineNumber

public int toDocumentLineNumber(int y_coordinate)
Translates a y-coordinate of the ruler's SWT control into the according line number of the document of the connected text viewer.

Parameters:
y_coordinate - a y-coordinate of the ruler's SWT control
Returns:
the line number of that coordinate

getWidth

public int getWidth()
Returns the width of this ruler's control.

Returns:
the width of this ruler's control

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.