Package org.eclipse.jgit.awtui
Class AWTPlotRenderer
java.lang.Object
org.eclipse.jgit.revplot.AbstractPlotRenderer<SwingCommitList.SwingLane,Color>
org.eclipse.jgit.awtui.AWTPlotRenderer
- All Implemented Interfaces:
Serializable
final class AWTPlotRenderer
extends AbstractPlotRenderer<SwingCommitList.SwingLane,Color>
implements Serializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CommitGraphPane.GraphCellRender(package private) Graphics2Dprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawBoundaryDot(int x, int y, int w, int h) Draw a single boundary commit (aka uninteresting commit) dot.protected voiddrawCommitDot(int x, int y, int w, int h) Draw a single commit dot.protected intDraw a decoration for the Ref ref at x,yprotected voidDraw a single line within this cell.protected voidDraw a single line of text.protected ColorlaneColor(SwingCommitList.SwingLane myLane) Obtain the color reference used to paint this lane.(package private) voidpaint(Graphics in, PlotCommit<SwingCommitList.SwingLane> commit) (package private) voidpaintTriangleDown(int cx, int y, int h) Methods inherited from class org.eclipse.jgit.revplot.AbstractPlotRenderer
paintCommit
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
cell
-
g
-
-
Constructor Details
-
AWTPlotRenderer
AWTPlotRenderer(CommitGraphPane.GraphCellRender c)
-
-
Method Details
-
paint
-
drawLine
Draw a single line within this cell.- Specified by:
drawLinein classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
color- the color to use while drawing the line.x1- starting X coordinate, 0 based.y1- starting Y coordinate, 0 based.x2- ending X coordinate, 0 based.y2- ending Y coordinate, 0 based.width- number of pixels wide for the line. Always at least 1.
-
drawCommitDot
protected void drawCommitDot(int x, int y, int w, int h) Draw a single commit dot.Usually the commit dot is a filled oval in blue, then a drawn oval in black, using the same coordinates for both operations.
- Specified by:
drawCommitDotin classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
x- upper left of the oval's bounding box.y- upper left of the oval's bounding box.w- width of the oval's bounding box.h- height of the oval's bounding box.
-
drawBoundaryDot
protected void drawBoundaryDot(int x, int y, int w, int h) Draw a single boundary commit (aka uninteresting commit) dot.Usually a boundary commit dot is a light gray oval with a white center.
- Specified by:
drawBoundaryDotin classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
x- upper left of the oval's bounding box.y- upper left of the oval's bounding box.w- width of the oval's bounding box.h- height of the oval's bounding box.
-
drawText
Draw a single line of text.The font and colors used to render the text are left up to the implementation.
- Specified by:
drawTextin classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
msg- the text to draw. Does not contain LFs.x- first pixel from the left that the text can be drawn at. Character data must not appear before this position.y- pixel coordinate of the baseline of the text. Implementations must adjust this coordinate to account for the way their implementation handles font rendering.
-
laneColor
Obtain the color reference used to paint this lane.Colors returned by this method will be passed to the other drawing primitives, so the color returned should be application specific.
If a null lane is supplied the return value must still be acceptable to a drawing method. Usually this means the implementation should return a default color.
- Specified by:
laneColorin classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
myLane- the current lane. May be null.- Returns:
- graphics specific color reference. Must be a valid color.
-
paintTriangleDown
void paintTriangleDown(int cx, int y, int h) -
drawLabel
Draw a decoration for the Ref ref at x,y- Specified by:
drawLabelin classAbstractPlotRenderer<SwingCommitList.SwingLane,Color> - Parameters:
x- lefty- topref- A peeled ref- Returns:
- width of label in pixels
-