1 package edu.uci.ics.jung.visualization.renderers;
2
3 import java.awt.Shape;
4 import java.awt.geom.AffineTransform;
5 import java.awt.geom.Line2D;
6
7 import edu.uci.ics.jung.visualization.RenderContext;
8
9 public interface EdgeArrowRenderingSupport<V, E> {
10
11 /**
12 * Returns a transform to position the arrowhead on this edge shape at the
13 * point where it intersects the passed vertex shape.
14 *
15 * @param rc the rendering context used for rendering the arrow
16 * @param edgeShape the shape used to draw the edge
17 * @param vertexShape the shape used to draw the vertex
18 * @return a transform used for positioning the arrowhead for this vertex and edge
19 */
20 AffineTransform getArrowTransform(RenderContext<V, E> rc,
21 Shape edgeShape, Shape vertexShape);
22
23 /**
24 * Returns a transform to position the arrowhead on this edge shape at the
25 * point where it intersects the passed vertex shape.
26 *
27 * @param rc the rendering context used for rendering the arrow
28 * @param edgeShape the shape used to draw the edge
29 * @param vertexShape the shape used to draw the vertex
30 * @return a transform used for positioning the arrowhead for this vertex and edge
31 */
32 AffineTransform getReverseArrowTransform(
33 RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape);
34
35 /**
36 * Returns a transform to position the arrowhead on this edge shape at the
37 * point where it intersects the passed vertex shape.
38 *
39 * <p>The Loop edge is a special case because its starting point is not inside
40 * the vertex. The passedGo flag handles this case.
41 *
42 * @param rc the rendering context used for rendering the arrow
43 * @param edgeShape the shape used to draw the edge
44 * @param vertexShape the shape used to draw the vertex
45 * @param passedGo used for rendering loop edges
46 * @return a transform used for positioning the arrowhead for this vertex and edge
47 */
48 AffineTransform getReverseArrowTransform(
49 RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape,
50 boolean passedGo);
51
52 /**
53 * Returns a transform to position the arrowhead on this edge shape at the
54 * point where it intersects the passed vertex shape.
55 *
56 * @param rc the rendering context used for rendering the arrow
57 * @param edgeShape the shape used to draw the edge
58 * @param vertexShape the shape used to draw the vertex
59 * @return a transform used for positioning the arrowhead for this vertex and edge
60 */
61 AffineTransform getArrowTransform(RenderContext<V, E> rc,
62 Line2D edgeShape, Shape vertexShape);
63 }