edu.uci.ics.jung.graph.decorators
Class PickableVertexPaintFunction

java.lang.Object
  extended by edu.uci.ics.jung.graph.decorators.PickableVertexPaintFunction
All Implemented Interfaces:
VertexPaintFunction

public class PickableVertexPaintFunction
extends Object
implements VertexPaintFunction

Paints each vertex according to the Paint parameters given in the constructor, so that picked and non-picked vertices can be made to look different.


Field Summary
protected  Paint draw_paint
           
protected  Paint fill_paint
           
protected  PickedInfo pi
           
protected  Paint picked_paint
           
 
Fields inherited from interface edu.uci.ics.jung.graph.decorators.VertexPaintFunction
TRANSPARENT
 
Constructor Summary
PickableVertexPaintFunction(PickedInfo pi, Paint draw_paint, Paint fill_paint, Paint picked_paint)
           
 
Method Summary
 Paint getDrawPaint(Vertex v)
           
 Paint getFillPaint(Vertex v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

draw_paint

protected Paint draw_paint

fill_paint

protected Paint fill_paint

picked_paint

protected Paint picked_paint

pi

protected PickedInfo pi
Constructor Detail

PickableVertexPaintFunction

public PickableVertexPaintFunction(PickedInfo pi,
                                   Paint draw_paint,
                                   Paint fill_paint,
                                   Paint picked_paint)
Parameters:
pi - specifies which vertices report as "picked"
draw_paint - Paint used to draw vertex shapes
fill_paint - Paint used to fill vertex shapes
picked_paint - Paint used to fill picked vertex shapes
Method Detail

getDrawPaint

public Paint getDrawPaint(Vertex v)
Specified by:
getDrawPaint in interface VertexPaintFunction

getFillPaint

public Paint getFillPaint(Vertex v)
Specified by:
getFillPaint in interface VertexPaintFunction