Class LightweightEdgeRenderer<V,E>
- java.lang.Object
-
- org.jungrapht.visualization.renderers.AbstractEdgeRenderer<V,E>
-
- org.jungrapht.visualization.renderers.LightweightEdgeRenderer<V,E>
-
- Type Parameters:
V- vertex typeE- edge type
- All Implemented Interfaces:
Renderer.Edge<V,E>
public class LightweightEdgeRenderer<V,E> extends AbstractEdgeRenderer<V,E> implements Renderer.Edge<V,E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.renderers.Renderer.Edge
Renderer.Edge.NOOP<V,E>
-
-
Constructor Summary
Constructors Constructor Description LightweightEdgeRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddrawSimpleEdge(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, E e)Draws the edgee, whose endpoints are at(x1,y1)and(x2,y2), on the graphics contextg.EdgeArrowRenderingSupport<V,E>getEdgeArrowRenderingSupport()protected ShapegetEdgeShape(BiFunction<org.jgrapht.Graph<V,E>,E,Shape> edgeShapeFunction, E edge, org.jgrapht.Graph<V,E> graph)For the LightweightEdgeRenderer, we only want the default 'line' edge shape when the edge is not an articulated edgevoidsetEdgeArrowRenderingSupport(EdgeArrowRenderingSupport<V,E> edgeArrowRenderingSupport)-
Methods inherited from class org.jungrapht.visualization.renderers.AbstractEdgeRenderer
paintEdge, prepareFinalEdgeShape
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jungrapht.visualization.renderers.Renderer.Edge
paintEdge
-
-
-
-
Method Detail
-
getEdgeShape
protected Shape getEdgeShape(BiFunction<org.jgrapht.Graph<V,E>,E,Shape> edgeShapeFunction, E edge, org.jgrapht.Graph<V,E> graph)
For the LightweightEdgeRenderer, we only want the default 'line' edge shape when the edge is not an articulated edge- Specified by:
getEdgeShapein classAbstractEdgeRenderer<V,E>- Parameters:
edgeShapeFunction- the visualization's edge shape functionedge- the edge to rendergraph- the graph (for the function context)- Returns:
- either a (lightweight) line edge or an articulated edge
-
drawSimpleEdge
protected void drawSimpleEdge(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, E e)
Draws the edgee, whose endpoints are at(x1,y1)and(x2,y2), on the graphics contextg. TheShapeprovided by theEdgeShapeFunctioninstance is scaled in the x-direction so that its width is equal to the distance between(x1,y1)and(x2,y2).- Specified by:
drawSimpleEdgein classAbstractEdgeRenderer<V,E>- Parameters:
e- the edge to be drawn
-
getEdgeArrowRenderingSupport
public EdgeArrowRenderingSupport<V,E> getEdgeArrowRenderingSupport()
- Specified by:
getEdgeArrowRenderingSupportin interfaceRenderer.Edge<V,E>
-
setEdgeArrowRenderingSupport
public void setEdgeArrowRenderingSupport(EdgeArrowRenderingSupport<V,E> edgeArrowRenderingSupport)
- Specified by:
setEdgeArrowRenderingSupportin interfaceRenderer.Edge<V,E>
-
-