Coverage details for edu.uci.ics.jung.visualization.VertexColorToVertexPaintConverter

LineHitsSource
1 /*
2  * Copyright (c) 2003, the JUNG Project and the Regents of the University
3  * of California
4  * All rights reserved.
5  *
6  * This software is open-source under the BSD license; see either
7  * "license.txt" or
8  * http://jung.sourceforge.net/license.txt for a description.
9  */
10 /*
11  * Created on Mar 31, 2005 by danyelf
12  */
13 package edu.uci.ics.jung.visualization;
14  
15 import java.awt.Paint;
16  
17 import edu.uci.ics.jung.graph.Vertex;
18 import edu.uci.ics.jung.graph.decorators.VertexColorFunction;
19 import edu.uci.ics.jung.graph.decorators.VertexPaintFunction;
20  
21 /**
22  * This class converts a VertexColorFunction to a VertexPaintFunction
23  *
24  * @author danyelf
25  * @deprecated You should create a new VertexPaintFunction if you can
26  */
27 public class VertexColorToVertexPaintConverter implements VertexPaintFunction {
28  
29     protected VertexColorFunction vcf;
30  
31     /**
32      * @param vcf
33      */
340    public VertexColorToVertexPaintConverter(VertexColorFunction vcf) {
350        this.vcf = vcf;
360    }
37  
38     public Paint getFillPaint(Vertex v) {
390        return vcf.getBackColor(v);
40     }
41  
42     /* (non-Javadoc)
43      * @see edu.uci.ics.jung.graph.decorators.VertexPaintFunction#getForePaint(edu.uci.ics.jung.graph.Vertex)
44      */
45     public Paint getDrawPaint(Vertex v) {
460        return vcf.getForeColor(v);
47     }
48  
49 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.