remove manifest stuff
[rsa2client.git] / src / mcsClient / McsMouseAdapter.java
1 // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
2 // Jad home page: http://www.kpdus.com/jad.html
3 // Decompiler options: packimports(3) fieldsfirst nonlb space 
4
5 package mcsClient;
6
7 import java.awt.event.*;
8 import java.io.IOException;
9 import java.io.PrintStream;
10
11 // Referenced classes of package mcsClient:
12 //            McsTcpConnection, LiveVideoPanel
13
14 public class McsMouseAdapter extends MouseAdapter
15     implements MouseWheelListener {
16
17     private McsTcpConnection mcsTcpConnection;
18     private LiveVideoPanel liveVideoPanel;
19
20     public McsMouseAdapter(McsTcpConnection mcstcpconnection, LiveVideoPanel livevideopanel) {
21         mcsTcpConnection = mcstcpconnection;
22         liveVideoPanel = livevideopanel;
23     }
24
25     public void mouseWheelMoved(MouseWheelEvent mousewheelevent) {
26         int ai[] = new int[4];
27         ai[0] = ai.length * 4;
28         ai[1] = 14;
29         ai[2] = 7;
30         ai[3] = mousewheelevent.getWheelRotation();
31         try {
32             mcsTcpConnection.sendMessage(ai);
33         }
34         catch (IOException ioexception) {
35             System.err.println("Could not send wheel mouse event.");
36         }
37     }
38
39     public void mousePressed(MouseEvent mouseevent) {
40         int ai[] = new int[4];
41         ai[0] = ai.length * 4;
42         ai[1] = 14;
43         ai[2] = 1;
44         ai[3] = mouseevent.getModifiersEx();
45         try {
46             mcsTcpConnection.sendMessage(ai);
47         }
48         catch (IOException ioexception) {
49             System.err.println("Could not send send mouse event McsMouseAdapter.");
50             return;
51         }
52         liveVideoPanel.requestFocusInWindow();
53     }
54
55     public void mouseReleased(MouseEvent mouseevent) {
56         int ai[] = new int[4];
57         ai[0] = ai.length * 4;
58         ai[1] = 14;
59         ai[2] = 2;
60         ai[3] = mouseevent.getModifiersEx();
61         try {
62             mcsTcpConnection.sendMessage(ai);
63         }
64         catch (IOException ioexception) {
65             System.err.println("Could not send send mouse event McsMouseAdapter.");
66             return;
67         }
68     }
69
70     public void mouseEntered(MouseEvent mouseevent) {
71         int ai[] = new int[5];
72         ai[0] = ai.length * 4;
73         ai[1] = 14;
74         ai[2] = 3;
75         ai[3] = mouseevent.getX();
76         ai[4] = mouseevent.getY();
77         try {
78             mcsTcpConnection.sendMessage(ai);
79         }
80         catch (IOException ioexception) {
81             System.err.println("Could not send send mouse event McsMouseAdapter.");
82             return;
83         }
84     }
85
86     public void mouseExited(MouseEvent mouseevent) {
87         int ai[] = new int[3];
88         ai[0] = ai.length * 4;
89         ai[1] = 14;
90         ai[2] = 4;
91         try {
92             mcsTcpConnection.sendMessage(ai);
93         }
94         catch (IOException ioexception) {
95             System.err.println("Could not send send mouse event McsMouseAdapter.");
96             return;
97         }
98     }
99 }