Line | Hits | Source |
---|---|---|
1 | /* | |
2 | * Created on Apr 5, 2005 | |
3 | * | |
4 | * Copyright (c) 2005, 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.visualization; | |
13 | ||
14 | import java.awt.BasicStroke; | |
15 | import java.awt.Stroke; | |
16 | ||
17 | import edu.uci.ics.jung.graph.Edge; | |
18 | import edu.uci.ics.jung.graph.decorators.EdgeStrokeFunction; | |
19 | import edu.uci.ics.jung.graph.decorators.EdgeThicknessFunction; | |
20 | ||
21 | /** | |
22 | * Converts an <code>EdgeThicknessFunction</code> into an <code>EdgeStrokeFunction</code>. | |
23 | * @author Joshua O'Madadhain | |
24 | */ | |
25 | public class EdgeThicknessToEdgeStrokeFunctionConverter implements | |
26 | EdgeStrokeFunction | |
27 | { | |
28 | protected EdgeThicknessFunction etf; | |
29 | ||
30 | /** | |
31 | * | |
32 | */ | |
33 | public EdgeThicknessToEdgeStrokeFunctionConverter(EdgeThicknessFunction etf) | |
34 | 0 | { |
35 | 0 | this.etf = etf; |
36 | 0 | } |
37 | ||
38 | /** | |
39 | * @see edu.uci.ics.jung.graph.decorators.EdgeStrokeFunction#getStroke(edu.uci.ics.jung.graph.Edge) | |
40 | */ | |
41 | public Stroke getStroke(Edge e) | |
42 | { | |
43 | 0 | return new BasicStroke(etf.getEdgeThickness(e)); |
44 | } | |
45 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |