edu.uci.ics.jung.graph.decorators
Class GradientEdgePaintFunction
java.lang.Object
edu.uci.ics.jung.graph.decorators.AbstractEdgePaintFunction
edu.uci.ics.jung.graph.decorators.GradientEdgePaintFunction
- All Implemented Interfaces:
- EdgePaintFunction
- Direct Known Subclasses:
- PluggableRendererDemo.GradientPickedEdgePaintFunction
public class GradientEdgePaintFunction
- extends AbstractEdgePaintFunction
Creates GradientPaint
instances which can be used
to paint an Edge
. For DirectedEdge
s,
the color will blend from c1
(source) to
c2
(destination); for UndirectedEdge
s,
the color will be c1
at each end and c2
in the middle.
- Author:
- Joshua O'Madadhain
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
c1
protected Color c1
c2
protected Color c2
GradientEdgePaintFunction
public GradientEdgePaintFunction(Color c1,
Color c2,
HasGraphLayout vv,
LayoutTransformer transformer)
getDrawPaint
public Paint getDrawPaint(Edge e)
getColor1
protected Color getColor1(Edge e)
- Returns
c1
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).
getColor2
protected Color getColor2(Edge e)
- Returns
c2
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).