|
LPEX 4.4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.lpex.alef.LpexLineNumberChangeRulerColumn
public final class LpexLineNumberChangeRulerColumn
A vertical ruler column for quick diff and revisions. Despite its name (after Eclipse's corresponding class), line numbers are not supported in this ruler. In LPEX, the prefix area is used to display line and sequence numbers.
Clients usually instantiate and configure objects of this class.
Eclipse's org.eclipse.jface.text.source.LineNumberChangeRulerColumn assumes StyledText as the viewer's text widget. LPEX currently uses its own text widget.
| Constructor Summary | |
|---|---|
LpexLineNumberChangeRulerColumn(ISharedTextColors sharedColors)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addRevisionListener(IRevisionListener listener)
|
void |
addVerticalRulerListener(IVerticalRulerListener listener)
|
protected int |
computeNumberOfDigits()
|
Control |
createControl(CompositeRuler parentRuler,
Composite parentControl)
Creates the ruler column's SWT control, a Canvas, for the LpexCompositeRuler specified. |
protected Color |
getBackground(Display display)
Returns the System background color used for list widgets. |
Control |
getControl()
|
protected String |
getDisplayCharacter(int line)
Returns the accessibility quick-diff display character for a certain model line. |
IAnnotationHover |
getHover()
|
int |
getLineOfLastMouseButtonActivity()
|
IAnnotationModel |
getModel()
|
ISelectionProvider |
getRevisionSelectionProvider()
|
int |
getWidth()
|
protected void |
handleDispose()
Disposes this ruler column's resources. |
boolean |
hasHover(int activeLine)
Returns true if the receiver can provide a hover for a certain document line. |
boolean |
isShowingChangeInformation()
Returns whether the ruler is showing diff information. |
boolean |
isShowingRevisionInformation()
Returns whether the ruler is showing revision information. |
protected void |
layout()
Lays out the enclosing viewer to adapt the layout to changes of the size of the individual components. |
protected void |
paintLine(int line,
int y,
int lineheight,
int width,
GC gc,
Color deletionColor)
|
protected void |
postRedraw()
Triggers a redraw of this entire column in the display thread. |
void |
redraw()
Redraws this entire ruler column (quick diff, revisions). |
void |
removeRevisionListener(IRevisionListener listener)
|
void |
removeVerticalRulerListener(IVerticalRulerListener listener)
|
void |
setAddedColor(Color addedColor)
|
void |
setBackground(Color background)
|
void |
setChangedColor(Color changedColor)
|
void |
setDeletedColor(Color deletedColor)
|
void |
setDisplayMode(boolean characterMode)
Sets the display mode of the ruler for the quick-diff display. |
void |
setFont(Font font)
|
void |
setHover(IAnnotationHover hover)
|
void |
setModel(IAnnotationModel model)
Associates an annotation model with this ruler column. |
void |
setRevisionInformation(RevisionInformation info)
|
void |
setRevisionRenderingMode(RenderingMode renderingMode)
|
void |
showRevisionAuthor(boolean show)
|
void |
showRevisionId(boolean show)
|
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 LpexLineNumberChangeRulerColumn(ISharedTextColors sharedColors)
sharedColors - the shared colors provider to use| Method Detail |
|---|
public Control createControl(CompositeRuler parentRuler,
Composite parentControl)
parentRuler - the parent LpexCompositeRuler associated with this ruler columnparentControl - the control of the parent rulerIVerticalRulerColumnpublic int getLineOfLastMouseButtonActivity()
public int toDocumentLineNumber(int y_coordinate)
public void setModel(IAnnotationModel model)
null value clears the ruler.
model - the annotation model, possibly nullIVerticalRulerColumnpublic void setDisplayMode(boolean characterMode)
true, quick diff
information will be displayed textually on the line number ruler.
characterMode - true if diff information is to be displayed textuallypublic IAnnotationModel getModel()
public void addVerticalRulerListener(IVerticalRulerListener listener)
public void removeVerticalRulerListener(IVerticalRulerListener listener)
public IAnnotationHover getHover()
public boolean hasHover(int activeLine)
true if the receiver can provide a hover for a certain document line.
activeLine - the document line of interest
true if the receiver can provide a hoverpublic void setHover(IAnnotationHover hover)
public void setBackground(Color background)
public void setAddedColor(Color addedColor)
public void setChangedColor(Color changedColor)
public void setDeletedColor(Color deletedColor)
public void setRevisionInformation(RevisionInformation info)
public ISelectionProvider getRevisionSelectionProvider()
public void setRevisionRenderingMode(RenderingMode renderingMode)
protected int computeNumberOfDigits()
public int getWidth()
protected void layout()
public boolean isShowingRevisionInformation()
true if revision information is shown, false otherwisepublic boolean isShowingChangeInformation()
true if change information is shown, false otherwisepublic void showRevisionAuthor(boolean show)
public void showRevisionId(boolean show)
public void addRevisionListener(IRevisionListener listener)
public void removeRevisionListener(IRevisionListener listener)
protected String getDisplayCharacter(int line)
line - the document line of interest
lineprotected void handleDispose()
public void redraw()
IVerticalRulerColumnpublic void setFont(Font font)
protected void paintLine(int line,
int y,
int lineheight,
int width,
GC gc,
Color deletionColor)
line - the line of the document for which the ruler column is paintedy - the y-coordinate of the box being painted for line, relative to gclineheight - the height of one line (i.e., of the box being painted)width - the width of the columngc - the drawing context the client may choose to draw ondeletionColor - the color for deletion line indicatorsprotected Color getBackground(Display display)
display - the display
public Control getControl()
protected final void postRedraw()
|
LPEX 4.4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||