|
LPEX 3.6.6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.alef.LpexRevisionPainter
public final class LpexRevisionPainter
A strategy for painting the live annotate colors onto the vertical ruler column. It also manages the revision hover.
Constructor Summary | |
---|---|
LpexRevisionPainter(IVerticalRulerColumn column,
ISharedTextColors sharedColors)
Creates a new revision painter for a vertical ruler column. |
Method Summary | |
---|---|
void |
addRevisionListener(IRevisionListener listener)
Adds a revision listener. |
IAnnotationHover |
getHover()
Returns the revision hover. |
int |
getRequiredWidth()
Returns the width in chars required to display information. |
ISelectionProvider |
getRevisionSelectionProvider()
Returns the selection provider. |
boolean |
hasHover(int activeLine)
Returns true if the receiver can provide a hover for a certain document line. |
boolean |
hasInformation()
Returns true if a revision model has been set, false otherwise. |
void |
paint(GC gc)
Delegates the painting of the quick diff colors to this painter. |
void |
removeRevisionListener(IRevisionListener listener)
Removes a revision listener. |
void |
setBackground(Color background)
Sets the background color. |
void |
setHover(IAnnotationHover hover)
Sets the hover later returned by getHover() . |
void |
setModel(IAnnotationModel model)
Sets the annotation model. |
void |
setParentRuler(CompositeRuler parentRuler)
Sets the parent ruler - the delegating column must call this method as soon as it creates its control. |
void |
setRenderingMode(RenderingMode renderingMode)
Changes the rendering mode and triggers redrawing if needed. |
void |
setRevisionInformation(RevisionInformation info)
Sets the revision information to be drawn and triggers a redraw. |
void |
showRevisionAuthor(boolean show)
Enables showing the revision author. |
void |
showRevisionId(boolean show)
Enables showing the revision id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LpexRevisionPainter(IVerticalRulerColumn column, ISharedTextColors sharedColors)
column
- the column that delegates paint(GC) to this
newly created revision paintersharedColors
- a shared colors object to store shaded colors inMethod Detail |
---|
public void setRevisionInformation(RevisionInformation info)
info
- the revision information to show, null
to draw nonepublic void setRenderingMode(RenderingMode renderingMode)
renderingMode
- the rendering modepublic void setBackground(Color background)
background
- the background color, null
for the platform's list
backgroundpublic void setParentRuler(CompositeRuler parentRuler)
parentRuler
- the parent LpexCompositeRulerpublic void paint(GC gc)
gc
- the GC to draw onpublic void setModel(IAnnotationModel model)
model
- the annotation model, possibly null
IVerticalRulerColumn#setModel(IAnnotationModel)
public IAnnotationHover getHover()
public ISelectionProvider getRevisionSelectionProvider()
public void setHover(IAnnotationHover hover)
getHover()
.
hover
- the hoverpublic 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 boolean hasInformation()
true
if a revision model has been set, false
otherwise.
true
if a revision model has been set, false
otherwisepublic int getRequiredWidth()
public void showRevisionId(boolean show)
show
- true
to show the revision, false
to hide itpublic void showRevisionAuthor(boolean show)
show
- true
to show the author, false
to hide itpublic void addRevisionListener(IRevisionListener listener)
listener
- the listenerpublic void removeRevisionListener(IRevisionListener listener)
listener
- the listener
|
LPEX 3.6.6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |