--- /dev/null
+// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
+// Jad home page: http://www.kpdus.com/jad.html
+// Decompiler options: packimports(3) fieldsfirst nonlb space
+
+package mcsClient;
+
+import java.awt.event.*;
+import java.io.IOException;
+import java.io.PrintStream;
+
+// Referenced classes of package mcsClient:
+// McsTcpConnection, LiveVideoPanel
+
+public class McsMouseAdapter extends MouseAdapter
+ implements MouseWheelListener {
+
+ private McsTcpConnection mcsTcpConnection;
+ private LiveVideoPanel liveVideoPanel;
+
+ public McsMouseAdapter(McsTcpConnection mcstcpconnection, LiveVideoPanel livevideopanel) {
+ mcsTcpConnection = mcstcpconnection;
+ liveVideoPanel = livevideopanel;
+ }
+
+ public void mouseWheelMoved(MouseWheelEvent mousewheelevent) {
+ int ai[] = new int[4];
+ ai[0] = ai.length * 4;
+ ai[1] = 14;
+ ai[2] = 7;
+ ai[3] = mousewheelevent.getWheelRotation();
+ try {
+ mcsTcpConnection.sendMessage(ai);
+ }
+ catch (IOException ioexception) {
+ System.err.println("Could not send wheel mouse event.");
+ }
+ }
+
+ public void mousePressed(MouseEvent mouseevent) {
+ int ai[] = new int[4];
+ ai[0] = ai.length * 4;
+ ai[1] = 14;
+ ai[2] = 1;
+ ai[3] = mouseevent.getModifiersEx();
+ try {
+ mcsTcpConnection.sendMessage(ai);
+ }
+ catch (IOException ioexception) {
+ System.err.println("Could not send send mouse event McsMouseAdapter.");
+ return;
+ }
+ liveVideoPanel.requestFocusInWindow();
+ }
+
+ public void mouseReleased(MouseEvent mouseevent) {
+ int ai[] = new int[4];
+ ai[0] = ai.length * 4;
+ ai[1] = 14;
+ ai[2] = 2;
+ ai[3] = mouseevent.getModifiersEx();
+ try {
+ mcsTcpConnection.sendMessage(ai);
+ }
+ catch (IOException ioexception) {
+ System.err.println("Could not send send mouse event McsMouseAdapter.");
+ return;
+ }
+ }
+
+ public void mouseEntered(MouseEvent mouseevent) {
+ int ai[] = new int[5];
+ ai[0] = ai.length * 4;
+ ai[1] = 14;
+ ai[2] = 3;
+ ai[3] = mouseevent.getX();
+ ai[4] = mouseevent.getY();
+ try {
+ mcsTcpConnection.sendMessage(ai);
+ }
+ catch (IOException ioexception) {
+ System.err.println("Could not send send mouse event McsMouseAdapter.");
+ return;
+ }
+ }
+
+ public void mouseExited(MouseEvent mouseevent) {
+ int ai[] = new int[3];
+ ai[0] = ai.length * 4;
+ ai[1] = 14;
+ ai[2] = 4;
+ try {
+ mcsTcpConnection.sendMessage(ai);
+ }
+ catch (IOException ioexception) {
+ System.err.println("Could not send send mouse event McsMouseAdapter.");
+ return;
+ }
+ }
+}