Line | Hits | Source |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2005, the JUNG Project and the Regents of the University of | |
3 | * California All rights reserved. | |
4 | * | |
5 | * This software is open-source under the BSD license; see either "license.txt" | |
6 | * or http://jung.sourceforge.net/license.txt for a description. | |
7 | * | |
8 | * Created on Jul 1, 2005 | |
9 | */ | |
10 | ||
11 | package edu.uci.ics.jung.graph.decorators; | |
12 | ||
13 | import java.awt.event.MouseEvent; | |
14 | ||
15 | import javax.swing.JComponent; | |
16 | ||
17 | import edu.uci.ics.jung.graph.Edge; | |
18 | import edu.uci.ics.jung.graph.Vertex; | |
19 | ||
20 | /** | |
21 | * Returns the results of toString on Vertices and Edges | |
22 | * Used mainly in demos | |
23 | * | |
24 | * @author Tom Nelson - RABA Technologies | |
25 | * | |
26 | * | |
27 | */ | |
28 | 0 | public class DefaultToolTipFunction extends ToolTipFunctionAdapter { |
29 | /** | |
30 | * @param v the Vertex | |
31 | * @return toString on the passed Vertex | |
32 | */ | |
33 | public String getToolTipText(Vertex v) { | |
34 | 0 | return v.toString(); |
35 | } | |
36 | ||
37 | /** | |
38 | * @param e the Edge | |
39 | * @return toString on the passed Edge | |
40 | */ | |
41 | public String getToolTipText(Edge e) { | |
42 | 0 | return e.toString(); |
43 | } | |
44 | ||
45 | public String getToolTipText(MouseEvent e) { | |
46 | 0 | return ((JComponent)e.getSource()).getToolTipText(); |
47 | } | |
48 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |