edu.uci.ics.jung.visualization.renderers
Class CenterEdgeArrowRenderingSupport<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.visualization.renderers.CenterEdgeArrowRenderingSupport<V,E>
All Implemented Interfaces:
EdgeArrowRenderingSupport<V,E>

public class CenterEdgeArrowRenderingSupport<V,E>
extends Object
implements EdgeArrowRenderingSupport<V,E>


Constructor Summary
CenterEdgeArrowRenderingSupport()
           
 
Method Summary
 AffineTransform getArrowTransform(RenderContext<V,E> rc, Line2D edgeShape, Shape vertexShape)
          This is used for the arrow of a directed and for one of the arrows for non-directed edges Get a transform to place the arrow shape on the passed edge at the point where it intersects the passed shape
 AffineTransform 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  AffineTransform getReverseArrowTransform(RenderContext<V,E> rc, Line2D edgeShape, Shape vertexShape)
          This is used for the reverse-arrow of a non-directed edge get a transform to place the arrow shape on the passed edge at the point where it intersects the passed shape
 AffineTransform 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.
 AffineTransform 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  void subdivide(Line2D src, Line2D left, Line2D right)
          divide a Line2D into 2 new Line2Ds that are returned in the passed left and right instances, if non-null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CenterEdgeArrowRenderingSupport

public CenterEdgeArrowRenderingSupport()
Method Detail

getArrowTransform

public AffineTransform 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.

Specified by:
getArrowTransform in interface EdgeArrowRenderingSupport<V,E>

getReverseArrowTransform

public AffineTransform 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.

Specified by:
getReverseArrowTransform in interface EdgeArrowRenderingSupport<V,E>

getReverseArrowTransform

public AffineTransform 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.

The Loop edge is a special case because its staring point is not inside the vertex. The passedGo flag handles this case.

Specified by:
getReverseArrowTransform in interface EdgeArrowRenderingSupport<V,E>
Parameters:
path -
vertexShape -
passedGo - - used only for Loop edges

getArrowTransform

public AffineTransform getArrowTransform(RenderContext<V,E> rc,
                                         Line2D edgeShape,
                                         Shape vertexShape)
This is used for the arrow of a directed and for one of the arrows for non-directed edges Get a transform to place the arrow shape on the passed edge at the point where it intersects the passed shape

Specified by:
getArrowTransform in interface EdgeArrowRenderingSupport<V,E>
Parameters:
edgeShape -
vertexShape -
Returns:

getReverseArrowTransform

protected AffineTransform getReverseArrowTransform(RenderContext<V,E> rc,
                                                   Line2D edgeShape,
                                                   Shape vertexShape)
This is used for the reverse-arrow of a non-directed edge get a transform to place the arrow shape on the passed edge at the point where it intersects the passed shape

Parameters:
edgeShape -
vertexShape -
Returns:

subdivide

protected void subdivide(Line2D src,
                         Line2D left,
                         Line2D right)
divide a Line2D into 2 new Line2Ds that are returned in the passed left and right instances, if non-null

Parameters:
src - the line to divide
left - the left side, or null
right - the right side, or null


Copyright © 2010 null. All Rights Reserved.