|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.jface.text.source.OverviewRuler
Ruler presented next to a source viewer showing all annotations of the viewer's annotation model in a compact format. The ruler has the same height as the source viewer.
Clients usually instantiate and configure objects of this class.
| Constructor Summary | |
OverviewRuler(IAnnotationAccess annotationAccess,
int width,
ISharedTextColors sharedColors)
Constructs a overview ruler of the given width using the given annotation access and the given color manager. |
|
| Method Summary | |
void |
addAnnotationType(Object annotationType)
Adds the given annotation type to this overview ruler. |
void |
addHeaderAnnotationType(Object annotationType)
Adds the given annotation type to the header of this ruler. |
Control |
createControl(Composite parent,
ITextViewer textViewer)
Creates the ruler's SWT control. |
int |
getAnnotationHeight()
Returns the height of the visual presentation of an annotation in this overview ruler. |
Control |
getControl()
Returns the ruler's SWT control. |
Control |
getHeaderControl()
Returns this rulers header 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. |
boolean |
hasAnnotation(int y)
Returns whether there is an annotation an the given y coordinate. |
void |
removeAnnotationType(Object annotationType)
Removes the given annotation type from this overview ruler. |
void |
removeHeaderAnnotationType(Object annotationType)
Removes the given annotation type from the header of this ruler. |
void |
setAnnotationTypeColor(Object annotationType,
Color color)
Sets the color for the given annotation type in this overview ruler. |
void |
setAnnotationTypeLayer(Object annotationType,
int layer)
Sets the drawing layer for the given annotation type in this overview ruler. |
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()
Forces the vertical ruler to synchronize itself with its annotation model and its viewer's viewport. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OverviewRuler(IAnnotationAccess annotationAccess,
int width,
ISharedTextColors sharedColors)
annotationAccess - the annotation accesswidth - the width of the vertical rulersharedColors - the color manager| Method Detail |
public Control getControl()
IVerticalRulerInfogetControl in interface IVerticalRulerInfoorg.eclipse.jface.text.source.IVerticalRulerInfopublic int getWidth()
IVerticalRulerInfogetWidth in interface IVerticalRulerInfoorg.eclipse.jface.text.source.IVerticalRulerInfopublic void setModel(IAnnotationModel model)
IVerticalRulernull is acceptable and clears the ruler.setModel in interface IVerticalRulerorg.eclipse.jface.text.source.IVerticalRulermodel - the new annotation model, may be null
public Control createControl(Composite parent,
ITextViewer textViewer)
IVerticalRulercreateControl in interface IVerticalRulerorg.eclipse.jface.text.source.IVerticalRulerparent - the parent control of the ruler's controltextViewer - the text viewer to which this ruler belongspublic void update()
IVerticalRulerupdate in interface IVerticalRulerpublic void addAnnotationType(Object annotationType)
IOverviewRuleraddAnnotationType in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation typepublic void removeAnnotationType(Object annotationType)
IOverviewRulerremoveAnnotationType in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation type
public void setAnnotationTypeLayer(Object annotationType,
int layer)
IOverviewRulersetAnnotationTypeLayer in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation typelayer - the drawing layer
public void setAnnotationTypeColor(Object annotationType,
Color color)
IOverviewRulersetAnnotationTypeColor in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation typecolor - the colorpublic int getLineOfLastMouseButtonActivity()
IVerticalRulerInfogetLineOfLastMouseButtonActivity in interface IVerticalRulerInfoorg.eclipse.jface.text.source.IVerticalRulerInfopublic int toDocumentLineNumber(int y_coordinate)
IVerticalRulerInfotoDocumentLineNumber in interface IVerticalRulerInfoorg.eclipse.jface.text.source.IVerticalRulerInfoy_coordinate - a y-coordinate of the ruler's SWT control-1 if that
coordinate does not correspond to a valid document linepublic IAnnotationModel getModel()
IVerticalRulernull
if the ruler has no model.getModel in interface IVerticalRulerorg.eclipse.jface.text.source.IVerticalRulernull if there is no modelpublic int getAnnotationHeight()
IOverviewRulergetAnnotationHeight in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerpublic boolean hasAnnotation(int y)
IOverviewRulerhasAnnotation in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulery - the y-coordinatetrue if there is an annotation, false otherwisepublic Control getHeaderControl()
IOverviewRulergetHeaderControl in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerpublic void addHeaderAnnotationType(Object annotationType)
IOverviewRuleraddHeaderAnnotationType in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation type to be trackedpublic void removeHeaderAnnotationType(Object annotationType)
IOverviewRulerremoveHeaderAnnotationType in interface IOverviewRulerorg.eclipse.jface.text.source.IOverviewRulerannotationType - the annotation type to be removed
|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||