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

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

public class ConstantVertexPaintFunction
extends Object
implements VertexPaintFunction

Provides the same Paint(s) for any specified vertex.

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

Field Summary
protected  Paint draw_paint
           
protected  Paint fill_paint
           
 
Fields inherited from interface edu.uci.ics.jung.graph.decorators.VertexPaintFunction
TRANSPARENT
 
Constructor Summary
ConstantVertexPaintFunction(Paint paint)
          Sets both draw and fill Paint instances to paint.
ConstantVertexPaintFunction(Paint draw_paint, Paint fill_paint)
          Sets the drawing Paint to draw_paint and the filling Paint to fill_paint.
 
Method Summary
 Paint getDrawPaint(Vertex e)
           
 Paint getFillPaint(Vertex e)
           
 
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
Constructor Detail

ConstantVertexPaintFunction

public ConstantVertexPaintFunction(Paint paint)
Sets both draw and fill Paint instances to paint.

Parameters:
paint -

ConstantVertexPaintFunction

public ConstantVertexPaintFunction(Paint draw_paint,
                                   Paint fill_paint)
Sets the drawing Paint to draw_paint and the filling Paint to fill_paint.

Parameters:
paint -
Method Detail

getDrawPaint

public Paint getDrawPaint(Vertex e)
Specified by:
getDrawPaint in interface VertexPaintFunction
See Also:
VertexPaintFunction.getDrawPaint(edu.uci.ics.jung.graph.Vertex)

getFillPaint

public Paint getFillPaint(Vertex e)
Specified by:
getFillPaint in interface VertexPaintFunction
See Also:
VertexPaintFunction.getFillPaint(edu.uci.ics.jung.graph.Vertex)