Coverage details for edu.uci.ics.jung.graph.decorators.ConstantVertexIconFunction

LineHitsSource
1 /*
2  * Created on Jul 18, 2004
3  *
4  * Copyright (c) 2004, the JUNG Project and the Regents of the University
5  * of California
6  * All rights reserved.
7  *
8  * This software is open-source under the BSD license; see either
9  * "license.txt" or
10  * http://jung.sourceforge.net/license.txt for a description.
11  */
12 package edu.uci.ics.jung.graph.decorators;
13  
14 import javax.swing.Icon;
15  
16 import edu.uci.ics.jung.graph.ArchetypeVertex;
17  
18 /**
19  * Returns the specified label for all vertices. Useful for
20  * specifying "no label".
21  *
22  * @author Tom Nelson - RABA Technologies
23  */
24 public class ConstantVertexIconFunction implements VertexIconFunction {
25 // protected Image image;
26     protected Icon icon;
27     
280    public ConstantVertexIconFunction() {
290    }
30  
31 // public ConstantVertexIconFunction(Image image) {
32 // this.image = image;
33 // }
34  
350    public ConstantVertexIconFunction(Icon icon) {
360        this.icon = icon;
370    }
38  
39     /**
40      * @see edu.uci.ics.jung.graph.decorators.VertexStringer#getLabel(ArchetypeVertex)
41      */
42 // public Image getImage(ArchetypeVertex v) {
43 // return image;
44 // }
45  
46     public Icon getIcon(ArchetypeVertex v) {
470        return icon;
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.