edu.uci.ics.jung.graph.decorators
Interface EdgePaintFunction

All Known Implementing Classes:
AbstractEdgePaintFunction, ConstantEdgePaintFunction, EdgeColorToEdgePaintFunctionConverter, GradientEdgePaintFunction, PickableEdgePaintFunction, PluggableRendererDemo.GradientPickedEdgePaintFunction, ShortestPathDemo.MyEdgePaintFunction

public interface EdgePaintFunction

This class replaces EdgeColorFunction. (All COLORs are PAINTs, so this is a direct drop-in replacement.) Use EdgeColorToEdgePaintConvertor if you want to convert an existing EdgeColorFunction.

The fill Paint is used to fill the edge's shape, and the draw Paint is used to draw its outline. Expect code that looks a little like this to execute it:

     graphics.setPaint( epf.getFillPaint( e ) );
     graphics.fill( shape );
     graphics.setPaint( epf.getDrawPaint( e ));
     graphics.setStroke ...
     graphics.draw( shape );
 
If you want the interior or outline to be transparent, you should have it return EdgePaintFunction.TRANSPARENT for the appropriate type.

Author:
Tom Nelson - RABA Technologies, Joshua O'Madadhain

Field Summary
static Paint TRANSPARENT
           
 
Method Summary
 Paint getDrawPaint(Edge e)
           
 Paint getFillPaint(Edge e)
           
 

Field Detail

TRANSPARENT

static final Paint TRANSPARENT
Method Detail

getDrawPaint

Paint getDrawPaint(Edge e)

getFillPaint

Paint getFillPaint(Edge e)