MouseInfo+class

java.lang.Object greenfoot.MouseInfo
 * greenfoot Class MouseInfo**

public class MouseInfo extends java.lang.ObjectThis class contains information about the current status of the mouse. You can get a MouseInfo object via Greenfoot. getMouseInfo. 得到鼠标信息对象，包括数据和方法.

Version: 2.1 Author: Poul Henriksen See Also: Greenfoot.#getMouseInfo

没有构造方法， 只有 Method Summary

Return the actor (if any) that the current mouse behaviour is related to.
 * Actor getActor** 得到和鼠标动作相关的对象

The number of the pressed or clicked button (if any). Return the number of mouse clicks associated with this mouse event.
 * int getButton** 得到点击过的按钮数目
 * int getClickCount** 得到鼠标点击数

Return the current x position of the mouse cursor.
 * int getX** 得到鼠标游标的x轴位置

int getY 得到鼠标游标的y轴位置 Return the current y position of the mouse cursor. java.lang.String toString

下面的都很没意思

Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail getX public int getXReturn the current x position of the mouse cursor.

Returns: the x position in grid coordinates

public int getYReturn the current y position of the mouse cursor.
 * getY**

Returns: the y position in grid coordinates

public Actor getActorReturn the actor (if any) that the current mouse behaviour is related to. If the mouse was clicked or pressed the actor it was clicked on will be returned. If the mouse was dragged or a drag ended, the actor where the drag started will be returned. If the mouse was moved, it will return the actor that the mouse is currently over.
 * getActor**

Returns: Actor that the current mouse behaviour relates to, or null if there is no actor related to current behaviour.

public int getButtonThe number of the pressed or clicked button (if any).
 * getButton**

Returns: The button number. Usually 1 is the left button, 2 is the middle button and 3 is the right button.

public int getClickCountReturn the number of mouse clicks associated with this mouse event.
 * getClickCount**

Returns: The number of times a button has been clicked.

public java.lang.String toStringOverrides: toString in class java.lang.Object
 * toString**