Class GradientEdgePaintTransformer<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.decorators.GradientEdgePaintTransformer<V,E>
- Direct Known Subclasses:
PluggableRendererDemo.GradientPickedEdgePaintFunction
public class GradientEdgePaintTransformer<V,E>
extends Object
implements com.google.common.base.Function<E,Paint>
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.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGradientEdgePaintTransformer
(Color c1, Color c2, VisualizationViewer<V, E> vv) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
c1
-
c2
-
vv
-
transformer
-
selfLoop
-
-
Constructor Details
-
GradientEdgePaintTransformer
-
-
Method Details
-
apply
-
getColor1
Returnsc1
. Subclasses may override this method to enable more complex behavior (e.g., for picked edges).- Parameters:
e
- the edge for which a color is to be retrieved- Returns:
- the constructor-supplied color
c1
-
getColor2
Returnsc2
. Subclasses may override this method to enable more complex behavior (e.g., for picked edges).- Parameters:
e
- the edge for which a color is to be retrieved- Returns:
- the constructor-supplied color
c2
-