| Line | Hits | Source |
|---|---|---|
| 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 | ||
| 28 | 0 | public ConstantVertexIconFunction() { |
| 29 | 0 | } |
| 30 | ||
| 31 | // public ConstantVertexIconFunction(Image image) { | |
| 32 | // this.image = image; | |
| 33 | // } | |
| 34 | ||
| 35 | 0 | public ConstantVertexIconFunction(Icon icon) { |
| 36 | 0 | this.icon = icon; |
| 37 | 0 | } |
| 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) { | |
| 47 | 0 | return icon; |
| 48 | } | |
| 49 | } |
|
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |