|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.lpex.alef.LpexAnnotationRulerColumn
public class LpexAnnotationRulerColumn
A vertical ruler column connected to an LpexCompositeRuler. It shows graphical representations of annotations (tasks, bookmarks, ranges, etc.).
Eclipse's org.eclipse.jface.text.source.AnnotationRulerColumn assumes StyledText as the viewer's text widget. LPEX currently uses its own text widget.
Note in AnnotationRulerColumn: will become final, do not subclass.
Constructor Summary | |
---|---|
LpexAnnotationRulerColumn(IAnnotationModel model,
int width)
Constructs this column with the given arguments. |
|
LpexAnnotationRulerColumn(IAnnotationModel model,
int width,
IAnnotationAccess annotationAccess)
Constructs this column with the given arguments. |
|
LpexAnnotationRulerColumn(int width)
Constructs this column with the given width. |
|
LpexAnnotationRulerColumn(int width,
IAnnotationAccess annotationAccess)
Constructs a vertical ruler with the given width and the given annotation access. |
Method Summary | |
---|---|
void |
addAnnotationType(Object annotationType)
Adds the given annotation type to this annotation ruler column. |
void |
addVerticalRulerListener(IVerticalRulerListener listener)
|
Control |
createControl(CompositeRuler parentRuler,
Composite parentControl)
Creates the vertical ruler's SWT control, a Canvas, for the LpexCompositeRuler specified. |
protected void |
doPaint(GC gc)
Draws the vertical ruler annotations (without drawing the Canvas background). |
protected ITextViewer |
getCachedTextViewer()
Returns the cached text viewer. |
Control |
getControl()
Returns the vertical ruler's SWT control, if any was created yet. |
IAnnotationHover |
getHover()
|
int |
getLineOfLastMouseButtonActivity()
|
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. |
protected boolean |
hasAnnotation(int lineNumber)
Returns whether the given line contains an annotation. |
protected boolean |
isPropagatingMouseListener()
Tells whether this ruler column propagates mouse listener events to its parent. |
protected void |
mouseClicked(int rulerLine)
Hook method for a mouse click event on the given ruler line. |
protected void |
mouseDoubleClicked(int rulerLine)
Hook method for a mouse double click event on the given ruler line. |
protected void |
mouseDown(int rulerLine)
Hook method for a mouse down event on the given ruler line. |
void |
redraw()
Redraws the vertical ruler. |
void |
removeAnnotationType(Object annotationType)
Removes the given annotation type from this annotation ruler column. |
void |
removeVerticalRulerListener(IVerticalRulerListener listener)
|
void |
setFont(Font font)
Set the font of this vertical ruler. |
void |
setHover(IAnnotationHover hover)
|
void |
setModel(IAnnotationModel model)
Associates an annotation model with this vertical ruler. |
int |
toDocumentLineNumber(int y_coordinate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LpexAnnotationRulerColumn(IAnnotationModel model, int width, IAnnotationAccess annotationAccess)
model
- the annotation model to get the annotations fromwidth
- the width of the vertical rulerannotationAccess
- the annotation accesspublic LpexAnnotationRulerColumn(int width, IAnnotationAccess annotationAccess)
width
- the width of the vertical rulerannotationAccess
- the annotation accesspublic LpexAnnotationRulerColumn(IAnnotationModel model, int width)
model
- the annotation model to get the annotations fromwidth
- the width of the vertical rulerpublic LpexAnnotationRulerColumn(int width)
width
- the width of the vertical rulerMethod Detail |
---|
public Control getControl()
IVerticalRulerColumn
public int getWidth()
IVerticalRulerColumn
public Control createControl(CompositeRuler parentRuler, Composite parentControl)
parentRuler
- the parent LpexCompositeRuler associated with this ruler
columnparentControl
- the control of the parent rulerIVerticalRulerColumn
protected boolean isPropagatingMouseListener()
true
if propagating to parentprotected void mouseDoubleClicked(int rulerLine)
rulerLine
- the ruler lineprotected void mouseClicked(int rulerLine)
rulerLine
- the ruler lineprotected boolean hasAnnotation(int lineNumber)
lineNumber
- the line number in the document
true
if the given document line contains an
annotationprotected void doPaint(GC gc)
gc
- the GC to draw onpublic void redraw()
IVerticalRulerColumn
public void setModel(IAnnotationModel model)
null
value clears the ruler.
IVerticalRulerColumn
public void setFont(Font font)
IVerticalRulerColumn
protected ITextViewer getCachedTextViewer()
public IAnnotationModel getModel()
null
if the ruler has no model.
IVerticalRulerInfoExtension
public void addAnnotationType(Object annotationType)
annotationType
- the annotation typepublic int getLineOfLastMouseButtonActivity()
public int toDocumentLineNumber(int y_coordinate)
public void removeAnnotationType(Object annotationType)
annotationType
- the annotation typepublic IAnnotationHover getHover()
public void setHover(IAnnotationHover hover)
hover
- The hover to set.public void addVerticalRulerListener(IVerticalRulerListener listener)
public void removeVerticalRulerListener(IVerticalRulerListener listener)
protected void mouseDown(int rulerLine)
rulerLine
- the ruler line
|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |