1 package org.telscenter.pas.ui.evidence;
2
3 import java.awt.LayoutManager;
4 import java.awt.Point;
5 import java.awt.event.MouseEvent;
6
7 import javax.swing.JPanel;
8
9 public class EvidencePanel extends JPanel {
10
11 public EvidencePanel(LayoutManager layout, boolean isDoubleBuffered) {
12 super(layout, isDoubleBuffered);
13
14 }
15
16 public EvidencePanel(LayoutManager layout) {
17 super(layout);
18
19 }
20
21 public EvidencePanel(boolean isDoubleBuffered) {
22 super(isDoubleBuffered);
23
24 }
25
26 public EvidencePanel() {
27 super();
28
29 }
30
31 public String getToolTipText(MouseEvent event) {
32 if (event.getID() != MouseEvent.MOUSE_MOVED)
33 return null;
34 else
35 {
36 Point p = event.getPoint();
37 StringBuffer buf = new StringBuffer();
38
39 buf.insert(0, "<html><body><b><p>Evidence Attribution:</p></b><blockquote>" + getToolTipText());
40
41 buf.append("</blockquote></body></html>");
42 return(buf.toString());
43 }
44 }
45
46 public Point getToolTipLocation(MouseEvent event) {
47 if (event.getID() != MouseEvent.MOUSE_MOVED)
48 return null;
49 else
50 {
51 Point p = event.getPoint();
52
53 p.translate(1, 1+14);
54 return (p);
55 }
56 }
57
58 }