edu.uci.ics.jung.visualization.decorators
Class GradientEdgePaintTransformer<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.decorators.GradientEdgePaintTransformer<V,E>
- All Implemented Interfaces:
- org.apache.commons.collections15.Transformer<E,Paint>
- Direct Known Subclasses:
- PluggableRendererDemo.GradientPickedEdgePaintFunction
public class GradientEdgePaintTransformer<V,E>
- extends Object
- implements org.apache.commons.collections15.Transformer<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.
- 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
vv
protected VisualizationViewer<V,E> vv
transformer
protected BidirectionalTransformer transformer
selfLoop
protected org.apache.commons.collections15.Predicate<Context<Graph<V,E>,E>> selfLoop
GradientEdgePaintTransformer
public GradientEdgePaintTransformer(Color c1,
Color c2,
VisualizationViewer<V,E> vv)
transform
public Paint transform(E e)
- Specified by:
transform
in interface org.apache.commons.collections15.Transformer<E,Paint>
getColor1
protected Color getColor1(E e)
- Returns
c1
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).
getColor2
protected Color getColor2(E e)
- Returns
c2
. Subclasses may override
this method to enable more complex behavior (e.g., for
picked edges).
Copyright © 2009. All Rights Reserved.