|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.eclipse.jface.text.source.VerticalRuler
A vertical ruler which is connected to a text viewer. Single column standard
implementation of IVerticalRuler. The same can be achieved by
using CompositeRuler configured with an AnnotationRulerColumn.
Clients may use this class as is.
ITextViewer| Constructor Summary | |
VerticalRuler(int width)
Constructs a vertical ruler with the given width. |
|
| Method Summary | |
void |
addMouseListener(MouseListener listener)
Deprecated. will be removed |
Control |
createControl(Composite parent,
ITextViewer textViewer)
Creates the ruler's SWT control. |
Control |
getControl()
Returns the ruler's SWT control. |
int |
getLineOfLastMouseButtonActivity()
Returns the line number of the last mouse button activity. |
IAnnotationModel |
getModel()
Returns the current annotation model of this ruler or null
if the ruler has no model. |
int |
getWidth()
Returns the width of this ruler's control. |
void |
removeMouseListener(MouseListener listener)
Deprecated. will be removed |
void |
setFont(Font font)
Sets the font of this vertical ruler. |
void |
setLocationOfLastMouseButtonActivity(int x,
int y)
Sets the location of the last mouse button activity. |
void |
setModel(IAnnotationModel model)
Associates an annotation model with this ruler. |
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. |
void |
update()
Thread-safe implementation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public VerticalRuler(int width)
width - the width of the vertical ruler| Method Detail |
public Control getControl()
IVerticalRulerInfo
getControl in interface IVerticalRulerInfo
public Control createControl(Composite parent,
ITextViewer textViewer)
IVerticalRuler
createControl in interface IVerticalRulerparent - the parent control of the ruler's controltextViewer - the text viewer to which this ruler belongs
public void update()
update in interface IVerticalRulerpublic void setModel(IAnnotationModel model)
IVerticalRulernull is acceptable and clears the ruler.
setModel in interface IVerticalRulermodel - the new annotation model, may be nullpublic IAnnotationModel getModel()
IVerticalRulernull
if the ruler has no model.
getModel in interface IVerticalRulernull if there is no modelpublic int getWidth()
IVerticalRulerInfo
getWidth in interface IVerticalRulerInfopublic int getLineOfLastMouseButtonActivity()
IVerticalRulerInfo
getLineOfLastMouseButtonActivity in interface IVerticalRulerInfopublic int toDocumentLineNumber(int y_coordinate)
IVerticalRulerInfo
toDocumentLineNumber in interface IVerticalRulerInfoy_coordinate - a y-coordinate of the ruler's SWT control
public void setFont(Font font)
IVerticalRulerExtension
setFont in interface IVerticalRulerExtensionfont - the new font of the vertical ruler
public void setLocationOfLastMouseButtonActivity(int x,
int y)
IVerticalRulerExtension
setLocationOfLastMouseButtonActivity in interface IVerticalRulerExtensionx - the x-coordinatey - the y-coordinatepublic void addMouseListener(MouseListener listener)
public void removeMouseListener(MouseListener listener)
|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||