public class BasicEdgeRenderer<V,E> extends Object implements Renderer.Edge<V,E>
Renderer.Edge.NOOP
Modifier and Type | Field and Description |
---|---|
protected EdgeArrowRenderingSupport<V,E> |
edgeArrowRenderingSupport |
Constructor and Description |
---|
BasicEdgeRenderer() |
Modifier and Type | Method and Description |
---|---|
protected void |
drawSimpleEdge(RenderContext<V,E> rc,
Layout<V,E> layout,
E e)
Draws the edge
e , whose endpoints are at (x1,y1)
and (x2,y2) , on the graphics context g . |
EdgeArrowRenderingSupport<V,E> |
getEdgeArrowRenderingSupport() |
void |
paintEdge(RenderContext<V,E> rc,
Layout<V,E> layout,
E e) |
protected Shape |
prepareFinalEdgeShape(RenderContext<V,E> rc,
Layout<V,E> layout,
E e,
int[] coords,
boolean[] loop) |
void |
setEdgeArrowRenderingSupport(EdgeArrowRenderingSupport<V,E> edgeArrowRenderingSupport) |
protected EdgeArrowRenderingSupport<V,E> edgeArrowRenderingSupport
public void paintEdge(RenderContext<V,E> rc, Layout<V,E> layout, E e)
paintEdge
in interface Renderer.Edge<V,E>
protected Shape prepareFinalEdgeShape(RenderContext<V,E> rc, Layout<V,E> layout, E e, int[] coords, boolean[] loop)
protected void drawSimpleEdge(RenderContext<V,E> rc, Layout<V,E> layout, E e)
e
, whose endpoints are at (x1,y1)
and (x2,y2)
, on the graphics context g
.
The Shape
provided by the EdgeShapeFunction
instance
is scaled in the x-direction so that its width is equal to the distance between
(x1,y1)
and (x2,y2)
.rc
- the render context used for rendering the edgelayout
- the layout instance which provides the edge's endpoints' coordinatese
- the edge to be drawnpublic EdgeArrowRenderingSupport<V,E> getEdgeArrowRenderingSupport()
getEdgeArrowRenderingSupport
in interface Renderer.Edge<V,E>
public void setEdgeArrowRenderingSupport(EdgeArrowRenderingSupport<V,E> edgeArrowRenderingSupport)
setEdgeArrowRenderingSupport
in interface Renderer.Edge<V,E>
Copyright © 2015. All rights reserved.