Top Fields Constructors Methods
org.eclipse.jgit.awtui

pack-priv final Class AWTPlotRenderer

extends AbstractPlotRenderer<SwingCommitList.SwingLane, Color>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.awt.Color, .Graphics, .Graphics2D, .Polygon, java.io.Serializable, org.eclipse.jgit.awtui.CommitGraphPane.GraphCellRender, .SwingCommitList.SwingLane, org.eclipse.jgit.lib.Constants, .Ref, org.eclipse.jgit.revplot.AbstractPlotRenderer, .PlotCommit

Field Summary

Modifier and TypeField and Description
pack-priv final CommitGraphPane.GraphCellRender
pack-priv transient Graphics2D
g

private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
drawBoundaryDot(final int
upper left of the oval's bounding box.
x
,
final int
upper left of the oval's bounding box.
y
,
final int
width of the oval's bounding box.
w
,
final int
height of the oval's bounding box.
h
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawBoundaryDot.

Draw a single boundary commit (aka uninteresting commit) dot.

protected void
drawCommitDot(final int
upper left of the oval's bounding box.
x
,
final int
upper left of the oval's bounding box.
y
,
final int
width of the oval's bounding box.
w
,
final int
height of the oval's bounding box.
h
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawCommitDot.

Draw a single commit dot.

protected int
drawLabel(int
left
x
,
int
top
y
,
Ref
A peeled ref
ref
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLabel.

Draw a decoration for the Ref ref at x,y

protected void
drawLine(final Color
the color to use while drawing the line.
color
,
int
starting X coordinate, 0 based.
x1
,
int
starting Y coordinate, 0 based.
y1
,
int
ending X coordinate, 0 based.
x2
,
int
ending Y coordinate, 0 based.
y2
,
int
number of pixels wide for the line. Always at least 1.
width
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLine.

Draw a single line within this cell.

protected void
drawText(String
the text to draw. Does not contain LFs.
msg
,
int
first pixel from the left that the text can be drawn at. Character data must not appear before this position.
x
,
int
pixel coordinate of the baseline of the text. Implementations must adjust this coordinate to account for the way their implementation handles font rendering.
y
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawText.

Draw a single line of text.

protected Color
laneColor(SwingCommitList.SwingLane
the current lane. May be null.
myLane
)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.laneColor.

Obtain the color reference used to paint this lane.

pack-priv void
pack-priv void
paintTriangleDown(int cx, int y, int h)

Inherited from org.eclipse.jgit.revplot.AbstractPlotRenderer:
paintCommit

Field Detail

cellback to summary
pack-priv final CommitGraphPane.GraphCellRender cell
gback to summary
pack-priv transient Graphics2D g
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AWTPlotRendererback to summary
pack-priv AWTPlotRenderer(CommitGraphPane.GraphCellRender c)

Method Detail

drawBoundaryDotback to summary
protected void drawBoundaryDot(final int x, final int y, final int w, final int h)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawBoundaryDot.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.drawBoundaryDot.

Draw a single boundary commit (aka uninteresting commit) dot.

Usually a boundary commit dot is a light gray oval with a white center.

Parameters
x:int

upper left of the oval's bounding box.

y:int

upper left of the oval's bounding box.

w:int

width of the oval's bounding box.

h:int

height of the oval's bounding box.

Annotations
@Override
drawCommitDotback to summary
protected void drawCommitDot(final int x, final int y, final int w, final int h)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawCommitDot.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.drawCommitDot.

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.

Parameters
x:int

upper left of the oval's bounding box.

y:int

upper left of the oval's bounding box.

w:int

width of the oval's bounding box.

h:int

height of the oval's bounding box.

Annotations
@Override
drawLabelback to summary
protected int drawLabel(int x, int y, Ref ref)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLabel.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLabel.

Draw a decoration for the Ref ref at x,y

Parameters
x:int

left

y:int

top

ref:Ref

A peeled ref

Returns:int

width of label in pixels

Annotations
@Override
drawLineback to summary
protected void drawLine(final Color color, int x1, int y1, int x2, int y2, int width)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLine.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.drawLine.

Draw a single line within this cell.

Parameters
color:Color

the color to use while drawing the line.

x1:int

starting X coordinate, 0 based.

y1:int

starting Y coordinate, 0 based.

x2:int

ending X coordinate, 0 based.

y2:int

ending Y coordinate, 0 based.

width:int

number of pixels wide for the line. Always at least 1.

Annotations
@Override
drawTextback to summary
protected void drawText(String msg, int x, int y)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.drawText.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.drawText.

Draw a single line of text.

The font and colors used to render the text are left up to the implementation.

Parameters
msg:String

the text to draw. Does not contain LFs.

x:int

first pixel from the left that the text can be drawn at. Character data must not appear before this position.

y:int

pixel coordinate of the baseline of the text. Implementations must adjust this coordinate to account for the way their implementation handles font rendering.

Annotations
@Override
laneColorback to summary
protected Color laneColor(SwingCommitList.SwingLane myLane)

Implements abstract org.eclipse.jgit.revplot.AbstractPlotRenderer.laneColor.

Doc from org.eclipse.jgit.revplot.AbstractPlotRenderer.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.

Parameters
myLane:SwingCommitList.SwingLane

the current lane. May be null.

Returns:Color

graphics specific color reference. Must be a valid color.

Annotations
@Override
paintback to summary
pack-priv void paint(Graphics in, PlotCommit<SwingCommitList.SwingLane> commit)
paintTriangleDownback to summary
pack-priv void paintTriangleDown(int cx, int y, int h)