public class RulerWithIcon
extends java.lang.Object
implements org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IVerticalRulerExtension
Changes made in method doubleBufferPaint(doubleBufferPaint(GC dest)).
VerticalRuler
Constructor and Description |
---|
RulerWithIcon(int width)
Constructs a vertical ruler with the given width.
|
RulerWithIcon(int width,
org.eclipse.jface.text.source.IAnnotationAccess annotationAcccess)
Constructs a vertical ruler with the given width and the given annotation
access.
|
Modifier and Type | Method and Description |
---|---|
void |
addMouseListener(org.eclipse.swt.events.MouseListener listener)
Deprecated.
will be removed
|
org.eclipse.swt.widgets.Control |
createControl(org.eclipse.swt.widgets.Composite parent,
org.eclipse.jface.text.ITextViewer textViewer) |
protected void |
doPaint(org.eclipse.swt.graphics.GC gc)
Draws the vertical ruler w/o drawing the Canvas background.
|
protected void |
doPaint1(org.eclipse.swt.graphics.GC gc)
Draws the vertical ruler w/o drawing the Canvas background.
|
org.eclipse.swt.widgets.Control |
getControl()
getControl
|
int |
getLineOfLastMouseButtonActivity()
getLineOfLastMouseButtonActivity
|
org.eclipse.jface.text.source.IAnnotationModel |
getModel()
getModel
|
int |
getWidth()
getWidth
|
void |
removeMouseListener(org.eclipse.swt.events.MouseListener listener)
Deprecated.
will be removed
|
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setIcon(org.eclipse.swt.graphics.Image icon)
Setter for the field
icon . |
void |
setLocationOfLastMouseButtonActivity(int x,
int y) |
void |
setModel(org.eclipse.jface.text.source.IAnnotationModel model) |
int |
toDocumentLineNumber(int y_coordinate) |
void |
update()
Thread-safe implementation.
|
protected static int |
widgetLine2ModelLine(org.eclipse.jface.text.ITextViewer viewer,
int widgetLine)
Returns the line of the viewer's document that corresponds to the given widget line.
|
public RulerWithIcon(int width)
width
- the width of the vertical rulerpublic RulerWithIcon(int width, org.eclipse.jface.text.source.IAnnotationAccess annotationAcccess)
width
- the width of the vertical rulerannotationAcccess
- the annotation accesspublic org.eclipse.swt.widgets.Control getControl()
getControl
getControl
in interface org.eclipse.jface.text.source.IVerticalRulerInfo
Control
object.public org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent, org.eclipse.jface.text.ITextViewer textViewer)
createControl
in interface org.eclipse.jface.text.source.IVerticalRuler
protected void doPaint(org.eclipse.swt.graphics.GC gc)
gc
- the GC to draw intoprotected void doPaint1(org.eclipse.swt.graphics.GC gc)
ITextViewerExtension5
for its implementation. Will replace
doPaint(GC)
.gc
- the GC to draw intopublic void update()
update
in interface org.eclipse.jface.text.source.IVerticalRuler
public void setModel(org.eclipse.jface.text.source.IAnnotationModel model)
setModel
in interface org.eclipse.jface.text.source.IVerticalRuler
public org.eclipse.jface.text.source.IAnnotationModel getModel()
getModel
getModel
in interface org.eclipse.jface.text.source.IVerticalRuler
IAnnotationModel
object.public int getWidth()
getWidth
getWidth
in interface org.eclipse.jface.text.source.IVerticalRulerInfo
public int getLineOfLastMouseButtonActivity()
getLineOfLastMouseButtonActivity
getLineOfLastMouseButtonActivity
in interface org.eclipse.jface.text.source.IVerticalRulerInfo
public int toDocumentLineNumber(int y_coordinate)
toDocumentLineNumber
in interface org.eclipse.jface.text.source.IVerticalRulerInfo
protected static final int widgetLine2ModelLine(org.eclipse.jface.text.ITextViewer viewer, int widgetLine)
viewer
- the viewerwidgetLine
- the widget linepublic void setFont(org.eclipse.swt.graphics.Font font)
setFont
in interface org.eclipse.jface.text.source.IVerticalRulerExtension
public void setLocationOfLastMouseButtonActivity(int x, int y)
setLocationOfLastMouseButtonActivity
in interface org.eclipse.jface.text.source.IVerticalRulerExtension
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)
listener
- the listener to be addedpublic void removeMouseListener(org.eclipse.swt.events.MouseListener listener)
listener
- the listener to be removedpublic void setIcon(org.eclipse.swt.graphics.Image icon)
Setter for the field icon
.
icon
- a Image
object.Copyright © 2007-2018. All Rights Reserved.