Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected Color` | `c1`
`protected Color` | `c2`

Fields inherited from interface edu.uci.ics.jung.graph.decorators.EdgePaintFunction
`TRANSPARENT`

Constructor Summary
`GradientEdgePaintFunction(Color c1, Color c2, HasGraphLayout vv, LayoutTransformer transformer)`

Method Summary
`protected Color` | `getColor1(Edge e)` Returns `c1`.
`protected Color` | `getColor2(Edge e)` Returns `c2`.
`Paint` | `getDrawPaint(Edge e)`

Methods inherited from class edu.uci.ics.jung.graph.decorators.AbstractEdgePaintFunction
`getFillPaint`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### c1

    protected Color c1

### c2

    protected Color c2

Constructor Detail

### GradientEdgePaintFunction

    public GradientEdgePaintFunction(Color c1,
                                     Color c2,
                                     HasGraphLayout vv,
                                     LayoutTransformer transformer)

Method Detail

### 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).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD