View Javadoc

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  	AffineTransform getArrowTransform(RenderContext<V, E> rc,
16  			Shape edgeShape, Shape vertexShape);
17  
18  	/**
19  	 * Returns a transform to position the arrowhead on this edge shape at the
20  	 * point where it intersects the passed vertex shape.
21  	 */
22  	AffineTransform getReverseArrowTransform(
23  			RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape);
24  
25  	/**
26  	 * <p>Returns a transform to position the arrowhead on this edge shape at the
27  	 * point where it intersects the passed vertex shape.</p>
28  	 * 
29  	 * <p>The Loop edge is a special case because its staring point is not inside
30  	 * the vertex. The passedGo flag handles this case.</p>
31  	 * 
32  	 * @param edgeShape
33  	 * @param vertexShape
34  	 * @param passedGo - used only for Loop edges
35  	 */
36  	AffineTransform getReverseArrowTransform(
37  			RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape,
38  			boolean passedGo);
39  
40  	/**
41  	 * This is used for the arrow of a directed and for one of the
42  	 * arrows for non-directed edges
43  	 * Get a transform to place the arrow shape on the passed edge at the
44  	 * point where it intersects the passed shape
45  	 * @param edgeShape
46  	 * @param vertexShape
47  	 * @return
48  	 */
49  	AffineTransform getArrowTransform(RenderContext<V, E> rc,
50  			Line2D edgeShape, Shape vertexShape);
51  
52  }