public class GradientEdgePaintFunction extends AbstractEdgePaintFunction
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.Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
c1 |
protected java.awt.Color |
c2 |
TRANSPARENT
Constructor and Description |
---|
GradientEdgePaintFunction(java.awt.Color c1,
java.awt.Color c2,
HasGraphLayout vv,
LayoutTransformer transformer) |
Modifier and Type | Method and Description |
---|---|
protected java.awt.Color |
getColor1(Edge e)
Returns
c1 . |
protected java.awt.Color |
getColor2(Edge e)
Returns
c2 . |
java.awt.Paint |
getDrawPaint(Edge e) |
getFillPaint
public GradientEdgePaintFunction(java.awt.Color c1, java.awt.Color c2, HasGraphLayout vv, LayoutTransformer transformer)
public java.awt.Paint getDrawPaint(Edge e)
protected java.awt.Color getColor1(Edge e)
c1
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).protected java.awt.Color getColor2(Edge e)
c2
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).