public final class ChangeRulerColumn extends Object implements IVerticalRulerColumn, IVerticalRulerInfo, IVerticalRulerInfoExtension, IChangeRulerColumn, IRevisionRulerColumn
QUICK_DIFF_MODEL_ID| Constructor and Description |
|---|
ChangeRulerColumn()
Deprecated.
since 3.2 use
ChangeRulerColumn(ISharedTextColors) instead |
ChangeRulerColumn(ISharedTextColors sharedColors)
Creates a new revision ruler column.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVerticalRulerListener(IVerticalRulerListener listener)
Registers a vertical ruler listener to be informed if an annotation gets
selected on the vertical ruler.
|
Control |
createControl(CompositeRuler parentRuler,
Composite parentControl)
Creates the column's SWT control.
|
Control |
getControl()
Returns the column's SWT control.
|
IAnnotationHover |
getHover()
Returns the hover for this vertical ruler (column).
|
int |
getLineOfLastMouseButtonActivity()
Returns the line number of the last mouse button activity.
|
IAnnotationModel |
getModel()
Returns the model currently used by the receiver.
|
ISelectionProvider |
getRevisionSelectionProvider()
Returns the revision selection provider.
|
protected int |
getVisibleLinesInViewport()
Deprecated.
as of 3.2 the number of lines in the viewport cannot be computed because
StyledText supports variable line heights
|
int |
getWidth()
Returns the width of this column's control.
|
protected void |
handleDispose()
Disposes the column's resources.
|
protected boolean |
isViewerCompletelyShown()
Returns
true if the viewport displays the entire viewer contents, i.e. the
viewer is not vertically scrollable. |
protected void |
postRedraw()
Triggers a redraw in the display thread.
|
void |
redraw()
Redraws this column.
|
void |
removeVerticalRulerListener(IVerticalRulerListener listener)
Removes a previously registered listener.
|
void |
setAddedColor(Color addedColor)
Sets the background color for added lines.
|
void |
setBackground(Color background)
Sets the background color for normal lines.
|
void |
setChangedColor(Color changedColor)
Sets the background color for changed lines.
|
void |
setDeletedColor(Color deletedColor)
Sets the color for the deleted lines indicator.
|
void |
setFont(Font font)
Sets the font of this ruler column.
|
void |
setHover(IAnnotationHover hover)
Sets the hover of this ruler column.
|
void |
setModel(IAnnotationModel model)
Associates an annotation model with this ruler column.
|
void |
setRevisionInformation(RevisionInformation info)
Sets the revision information.
|
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.
|
public ChangeRulerColumn()
ChangeRulerColumn(ISharedTextColors) insteadpublic ChangeRulerColumn(ISharedTextColors sharedColors)
sharedColors - the colors to look up RGBspublic Control createControl(CompositeRuler parentRuler, Composite parentControl)
IVerticalRulerColumncreateControl in interface IVerticalRulerColumnparentRuler - the parent ruler of this columnparentControl - the control of the parent rulerprotected void handleDispose()
protected int getVisibleLinesInViewport()
protected final boolean isViewerCompletelyShown()
true if the viewport displays the entire viewer contents, i.e. the
viewer is not vertically scrollable.true if the viewport displays the entire contents, false otherwisepublic void redraw()
IVerticalRulerColumnredraw in interface IVerticalRulerColumnpublic void setFont(Font font)
IVerticalRulerColumnsetFont in interface IVerticalRulerColumnfont - the new font of the ruler columnpublic int getLineOfLastMouseButtonActivity()
IVerticalRulerInfo0.getLineOfLastMouseButtonActivity in interface IVerticalRulerInfopublic int toDocumentLineNumber(int y_coordinate)
IVerticalRulerInfotoDocumentLineNumber in interface IVerticalRulerInfoy_coordinate - a y-coordinate of the ruler's SWT control-1 if that
coordinate does not correspond to a valid document linepublic IAnnotationHover getHover()
IVerticalRulerInfoExtensiongetHover in interface IVerticalRulerInfoExtensionpublic void setHover(IAnnotationHover hover)
IChangeRulerColumnsetHover in interface IChangeRulerColumnhover - the hover that will produce hover information text for this ruler columnpublic void setModel(IAnnotationModel model)
IVerticalRulerColumnnull is acceptable and clears the ruler.setModel in interface IVerticalRulerColumnmodel - the new annotation model, may be nullpublic void setBackground(Color background)
IChangeRulerColumnsetBackground in interface IChangeRulerColumnbackground - the new color to be used as standard line backgroundpublic void setAddedColor(Color addedColor)
IChangeRulerColumnsetAddedColor in interface IChangeRulerColumnaddedColor - the new color to be used for the added lines backgroundpublic void setChangedColor(Color changedColor)
IChangeRulerColumnsetChangedColor in interface IChangeRulerColumnchangedColor - the new color to be used for the changed lines backgroundpublic void setDeletedColor(Color deletedColor)
IChangeRulerColumnsetDeletedColor in interface IChangeRulerColumndeletedColor - the new color to be used for the deleted lines indicator.public IAnnotationModel getModel()
IVerticalRulerInfoExtensiongetModel in interface IVerticalRulerInfoExtensionnull if no model is
installed.public Control getControl()
IVerticalRulerColumngetControl in interface IVerticalRulerColumngetControl in interface IVerticalRulerInfopublic int getWidth()
IVerticalRulerColumngetWidth in interface IVerticalRulerColumngetWidth in interface IVerticalRulerInfoprotected final void postRedraw()
public void addVerticalRulerListener(IVerticalRulerListener listener)
IVerticalRulerInfoExtensionaddVerticalRulerListener in interface IVerticalRulerInfoExtensionlistener - the listener to be informedpublic void removeVerticalRulerListener(IVerticalRulerListener listener)
IVerticalRulerInfoExtensionlistener is not registered
with the receiver, calling this method has no effect.removeVerticalRulerListener in interface IVerticalRulerInfoExtensionlistener - the listener to be removedpublic void setRevisionInformation(RevisionInformation info)
IRevisionRulerColumnsetRevisionInformation in interface IRevisionRulerColumninfo - the new revision information, or null to reset the rulerpublic ISelectionProvider getRevisionSelectionProvider()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.