edu.uci.ics.jung.visualization.decorators
Class GradientEdgePaintRenderer<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.visualization.renderers.BasicEdgeRenderer<V,E>
      extended by edu.uci.ics.jung.visualization.decorators.GradientEdgePaintRenderer<V,E>
All Implemented Interfaces:
Renderer.Edge<V,E>

public class GradientEdgePaintRenderer<V,E>
extends BasicEdgeRenderer<V,E>
implements Renderer.Edge<V,E>

Creates GradientPaint instances which can be used to paint an Edge. For DirectedEdges, the color will blend from c1 (source) to c2 (destination); for UndirectedEdges, the color will be c1 at each end and c2 in the middle.

Author:
Tom Nelson

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.Edge
Renderer.Edge.NOOP
 
Field Summary
protected  Color c1
           
protected  Color c2
           
protected  Graph<V,E> graph
           
protected   selfLoop
           
protected  VisualizationViewer<V,E> vv
           
protected  float xB
           
protected  float xF
           
protected  float yB
           
protected  float yF
           
 
Constructor Summary
GradientEdgePaintRenderer(Color c1, Color c2, VisualizationViewer<V,E> vv)
           
 
Method Summary
 void paintEdge(RenderContext<V,E> rc, Layout<V,E> layout, E e)
           
 Paint transform(E e)
           
 
Methods inherited from class edu.uci.ics.jung.visualization.renderers.BasicEdgeRenderer
drawSimpleEdge, getArrowTransform, getArrowTransform, getFirstOutsideSegment, getLastOutsideSegment, getReverseArrowTransform, getReverseArrowTransform, getReverseArrowTransform, subdivide
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c1

protected Color c1

c2

protected Color c2

vv

protected VisualizationViewer<V,E> vv

selfLoop

protected  selfLoop

graph

protected Graph<V,E> graph

xB

protected float xB

yB

protected float yB

xF

protected float xF

yF

protected float yF
Constructor Detail

GradientEdgePaintRenderer

public GradientEdgePaintRenderer(Color c1,
                                 Color c2,
                                 VisualizationViewer<V,E> vv)
Method Detail

transform

public Paint transform(E e)

paintEdge

public void paintEdge(RenderContext<V,E> rc,
                      Layout<V,E> layout,
                      E e)
Specified by:
paintEdge in interface Renderer.Edge<V,E>
Overrides:
paintEdge in class BasicEdgeRenderer<V,E>


Copyright © 2008 null. All Rights Reserved.