Class BasicEdgeArrowRenderingSupport<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.renderers.BasicEdgeArrowRenderingSupport<V,E>
- All Implemented Interfaces:
EdgeArrowRenderingSupport<V,E>
public class BasicEdgeArrowRenderingSupport<V,E>
extends Object
implements EdgeArrowRenderingSupport<V,E>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArrowTransform(RenderContext<V, E> rc, Line2D edgeShape, Shape vertexShape) Returns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.getArrowTransform(RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape) Returns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.protected Line2DgetFirstOutsideSegment(Line2D line, Shape shape) Returns a line that intersectsshape's boundary.protected Line2DgetLastOutsideSegment(Line2D line, Shape shape) Returns a line that intersectsshape's boundary.protected AffineTransformgetReverseArrowTransform(RenderContext<V, E> rc, Line2D edgeShape, Shape vertexShape) getReverseArrowTransform(RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape) Returns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.getReverseArrowTransform(RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape, boolean passedGo) Returns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.protected voiddivide a Line2D into 2 new Line2Ds that are returned in the passed left and right instances, if non-null
-
Constructor Details
-
BasicEdgeArrowRenderingSupport
public BasicEdgeArrowRenderingSupport()
-
-
Method Details
-
getArrowTransform
Description copied from interface:EdgeArrowRenderingSupportReturns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.- Specified by:
getArrowTransformin interfaceEdgeArrowRenderingSupport<V,E> - Parameters:
rc- the rendering context used for rendering the arrowedgeShape- the shape used to draw the edgevertexShape- the shape used to draw the vertex- Returns:
- a transform used for positioning the arrowhead for this vertex and edge
-
getReverseArrowTransform
public AffineTransform getReverseArrowTransform(RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape) Description copied from interface:EdgeArrowRenderingSupportReturns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.- Specified by:
getReverseArrowTransformin interfaceEdgeArrowRenderingSupport<V,E> - Parameters:
rc- the rendering context used for rendering the arrowedgeShape- the shape used to draw the edgevertexShape- the shape used to draw the vertex- Returns:
- a transform used for positioning the arrowhead for this vertex and edge
-
getReverseArrowTransform
public AffineTransform getReverseArrowTransform(RenderContext<V, E> rc, Shape edgeShape, Shape vertexShape, boolean passedGo) Description copied from interface:EdgeArrowRenderingSupportReturns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.The Loop edge is a special case because its starting point is not inside the vertex. The passedGo flag handles this case.
- Specified by:
getReverseArrowTransformin interfaceEdgeArrowRenderingSupport<V,E> - Parameters:
rc- the rendering context used for rendering the arrowedgeShape- the shape used to draw the edgevertexShape- the shape used to draw the vertexpassedGo- used for rendering loop edges- Returns:
- a transform used for positioning the arrowhead for this vertex and edge
-
getArrowTransform
public AffineTransform getArrowTransform(RenderContext<V, E> rc, Line2D edgeShape, Shape vertexShape) Description copied from interface:EdgeArrowRenderingSupportReturns a transform to position the arrowhead on this edge shape at the point where it intersects the passed vertex shape.- Specified by:
getArrowTransformin interfaceEdgeArrowRenderingSupport<V,E> - Parameters:
rc- the rendering context used for rendering the arrowedgeShape- the shape used to draw the edgevertexShape- the shape used to draw the vertex- Returns:
- a transform used for positioning the arrowhead for this vertex and edge
-
getReverseArrowTransform
protected AffineTransform getReverseArrowTransform(RenderContext<V, E> rc, Line2D edgeShape, Shape vertexShape) -
getLastOutsideSegment
Returns a line that intersectsshape's boundary.- Parameters:
line- line to subdivideshape- shape to compare with line- Returns:
- a line that intersects the shape boundary
- Throws:
IllegalArgumentException- if the passed line's point2 is not inside the shape
-
getFirstOutsideSegment
Returns a line that intersectsshape's boundary.- Parameters:
line- line to subdivideshape- shape to compare with line- Returns:
- a line that intersects the shape boundary
- Throws:
IllegalArgumentException- if the passed line's point1 is not inside the shape
-
subdivide
-