public class GradientEdgePaintTransformer<V,E>
extends java.lang.Object
implements org.apache.commons.collections4.Transformer<E,java.awt.Paint>
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.| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
c1 |
protected java.awt.Color |
c2 |
protected org.apache.commons.collections4.Predicate<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,E>,E>> |
selfLoop |
protected BidirectionalTransformer |
transformer |
protected VisualizationViewer<V,E> |
vv |
| Constructor and Description |
|---|
GradientEdgePaintTransformer(java.awt.Color c1,
java.awt.Color c2,
VisualizationViewer<V,E> vv) |
protected java.awt.Color c1
protected java.awt.Color c2
protected VisualizationViewer<V,E> vv
protected BidirectionalTransformer transformer
public GradientEdgePaintTransformer(java.awt.Color c1,
java.awt.Color c2,
VisualizationViewer<V,E> vv)
public java.awt.Paint transform(E e)
transform in interface org.apache.commons.collections4.Transformer<E,java.awt.Paint>protected java.awt.Color getColor1(E e)
c1. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).protected java.awt.Color getColor2(E e)
c2. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).