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

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

public class ConstantEdgePaintFunction
extends Object
implements EdgePaintFunction

Provides the same Paint for any specified edge.

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.EdgePaintFunction
TRANSPARENT
 
Constructor Summary
ConstantEdgePaintFunction(Paint paint)
          Sets both draw and fill Paint instances to paint.
ConstantEdgePaintFunction(Paint draw_paint, Paint fill_paint)
          Sets the drawing Paint to draw_paint and the filling Paint to fill_paint.
 
Method Summary
 Paint getDrawPaint(Edge e)
           
 Paint getFillPaint(Edge 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

ConstantEdgePaintFunction

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


ConstantEdgePaintFunction

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

Method Detail

getDrawPaint

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

getFillPaint

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