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) Graphics2D
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawBoundaryDot
(int x, int y, int w, int h) Draw a single boundary commit (aka uninteresting commit) dot.protected void
drawCommitDot
(int x, int y, int w, int h) Draw a single commit dot.protected int
Draw a decoration for the Ref ref at x,yprotected void
Draw a single line within this cell.protected void
Draw a single line of text.protected Color
laneColor
(SwingCommitList.SwingLane myLane) Obtain the color reference used to paint this lane.(package private) void
paint
(Graphics in, PlotCommit<SwingCommitList.SwingLane> commit) (package private) void
paintTriangleDown
(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:
drawLine
in 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:
drawCommitDot
in 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:
drawBoundaryDot
in 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:
drawText
in 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:
laneColor
in 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:
drawLabel
in classAbstractPlotRenderer<SwingCommitList.SwingLane,
Color> - Parameters:
x
- lefty
- topref
- A peeled ref- Returns:
- width of label in pixels
-