01: package org.uispec4j;
02:
03: import org.uispec4j.xml.EventLogger;
04:
05: import javax.swing.table.JTableHeader;
06: import java.awt.event.MouseListener;
07: import java.awt.event.MouseEvent;
08: import java.awt.*;
09:
10: class MouseLogger extends EventLogger implements MouseListener {
11: public MouseLogger(UIComponent uiComponent) {
12: this (uiComponent.getAwtComponent());
13: }
14:
15: public MouseLogger(Component component) {
16: component.addMouseListener(this );
17: }
18:
19: public void mouseClicked(MouseEvent e) {
20: log("mouseClicked")
21: .add("button", String.valueOf(e.getButton()));
22: }
23:
24: public void mouseEntered(MouseEvent e) {
25: log("mouseEntered")
26: .add("button", String.valueOf(e.getButton()));
27: }
28:
29: public void mouseExited(MouseEvent e) {
30: log("mouseExited").add("button", String.valueOf(e.getButton()));
31: }
32:
33: public void mousePressed(MouseEvent e) {
34: log("mousePressed")
35: .add("button", String.valueOf(e.getButton()));
36: }
37:
38: public void mouseReleased(MouseEvent e) {
39: log("mouseReleased").add("button",
40: String.valueOf(e.getButton()));
41: }
42: }
|