mouseinput.java

来自「桌面控制的程序啊啊 啊啊 啊啊 啊啊 啊啊 啊啊 啊啊啊」· Java 代码 · 共 89 行

JAVA
89
字号
// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov  Date: 3/8/2007 1:20:10 PM
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   MouseInput.java

package common;

import java.io.Serializable;

public class MouseInput
    implements Serializable
{

    public MouseInput(int action)
    {
        this.action = action;
    }

    public MouseInput(int action, int key)
    {
        this.action = action;
        switch(action)
        {
        case 501: 
        case 502: 
            this.key = key;
            break;

        case 507: 
            wheel = key;
            break;
        }
    }

    public MouseInput(int action, int x, int y)
    {
        this.action = action;
        this.x = x;
        this.y = y;
    }

    public int getAction()
    {
        return action;
    }

    public int getX()
    {
        return x;
    }

    public int getY()
    {
        return y;
    }

    public int getKey()
    {
        return key;
    }

    public int getWheel()
    {
        return wheel;
    }

    public String toString()
    {
        StringBuffer strBuf = new StringBuffer();
        switch(action)
        {
        case 503: 
            return "Mouse move to: x = " + x + "; y = " + y;

        case 501: 
            return "Mouse pressed: " + key;

        case 502: 
            return "Mouse realsed: " + key;
        }
        return "";
    }

    private int action;
    private int key;
    private int x;
    private int y;
    private int wheel;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?