edu.uci.ics.jung.graph.decorators
Interface VertexPaintFunction
- All Known Implementing Classes:
- ConstantVertexPaintFunction, PickableVertexPaintFunction, ShortestPathDemo.MyVertexPaintFunction, VertexColorToVertexPaintConverter
public interface VertexPaintFunction
This class replaces VertexColorFunction. (All COLORs are PAINTs, so this is a
direct drop-in replacement.) Use VertexColorToVertexPaintConvertor if you
want to convert an existing VertexColorFunction.
The fill Paint is used to fill the vertex'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( vpf.getFillPaint( v ) );
graphics.fill( shape );
graphics.setPaint( vpf.getDrawPaint( v ));
graphics.setStroke ...
graphics.draw( shape );
If you want the interior or outline to be transparent, you
should have it return VertexPaintFunction.TRANSPARENT for the appropriate type.
- Author:
- Danyel Fisher - Microsoft Research, Tom Nelson - RABA Technologies, Joshua O'Madadhain
TRANSPARENT
static final Paint TRANSPARENT
getFillPaint
Paint getFillPaint(Vertex v)
getDrawPaint
Paint getDrawPaint(Vertex v)