KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > awt > peer > MouseInfoPeer


1 /*
2  * @(#)MouseInfoPeer.java 1.2 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.awt.peer;
9
10 import java.awt.Window JavaDoc;
11 import java.awt.Point JavaDoc;
12
13 /**
14  * The peer interfaces are intended only for use in porting
15  * the AWT. They are not intended for use by application
16  * developers, and developers should not implement peers
17  * nor invoke any of the peer methods directly on the peer
18  * instances.
19  */

20 public interface MouseInfoPeer {
21
22     /**
23      * This method does two things: it fills the point fields with
24      * the current coordinates of the mouse cursor and returns the
25      * number of the screen device where the pointer is located.
26      * The number of the screen device is only returned for independent
27      * devices (which are not parts of a virtual screen device).
28      * For virtual screen devices, 0 is returned.
29      * Mouse coordinates are also calculated depending on whether
30      * or not the screen device is virtual. For virtual screen
31      * devices, pointer coordinates are calculated in the virtual
32      * coordinate system. Otherwise, coordinates are calculated in
33      * the coordinate system of the screen device where the pointer
34      * is located.
35      * See java.awt.GraphicsConfiguration documentation for more
36      * details about virtual screen devices.
37      */

38     int fillPointWithCoords(Point JavaDoc point);
39
40     /**
41      * Returns whether or not the window is located under the mouse
42      * pointer. The window is considered to be under the mouse pointer
43      * if it is showing on the screen, and the mouse pointer is above
44      * the part of the window that is not obscured by any other windows.
45      */

46     boolean isWindowUnderMouse(Window JavaDoc w);
47
48 }
49
Popular Tags