|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.MouseEvent
public class MouseEvent
Represents an event cause by mouse activitly.
There are two possible way to identify a mouse event.
One is by coordinate (getX()
and getY()
.
The other is by a logical name, called area (getArea()
).
Field Summary | |
---|---|
static int |
ALT_KEY
Indicates whether the Alt key is pressed. |
static int |
CTRL_KEY
Indicates whether the Ctrl key is pressed. |
static int |
LEFT_CLICK
Indicatees whether the left button is clicked. |
static int |
MIDDLE_CLICK
Indicatees whether the middle button is clicked. |
static int |
RIGHT_CLICK
Indicatees whether the right button is clicked. |
static int |
SHIFT_KEY
Indicates whether the Shift key is pressed. |
Constructor Summary | |
---|---|
MouseEvent(java.lang.String name,
Component target)
Construct a mouse relevant event with coordinate or area. |
|
MouseEvent(java.lang.String name,
Component target,
int x,
int y)
Deprecated. As of release 5.0.0, replaced with MouseEvent(String,Component,int,int,int,int) . |
|
MouseEvent(java.lang.String name,
Component target,
int x,
int y,
int keys)
Deprecated. As of release 5.0.0, replaced with MouseEvent(String,Component,int,int,int,int,int) . |
|
MouseEvent(java.lang.String name,
Component target,
int x,
int y,
int pageX,
int pageY)
Constructs a mouse relevant event. |
|
MouseEvent(java.lang.String name,
Component target,
int x,
int y,
int pageX,
int pageY,
int keys)
Constructs a mouse relevant event. |
|
MouseEvent(java.lang.String name,
Component target,
java.lang.String area)
Deprecated. As of release 5.0.0, replaced with MouseEvent(String,Component,String,int) . |
|
MouseEvent(java.lang.String name,
Component target,
java.lang.String area,
int keys)
Constructs a mouse relevant event with a logic name called area. |
Method Summary | |
---|---|
java.lang.String |
getArea()
Returns the logical name of the area that the click occurs, or null if not available. |
int |
getKeys()
Returns what keys were pressed when the mouse is clicked, or 0 if none of them was pressed. |
static MouseEvent |
getMouseEvent(AuRequest request)
Converts an AU request to a mouse event. |
int |
getPageX()
Returns the horizontal coordinate of the mouse pointer relative to the whole document. |
int |
getPageY()
Returns the vertical coordinate of the mouse pointer relative to the whole document. |
int |
getX()
Returns the horizontal coordinate of the mouse pointer relevant to the component. |
int |
getY()
Returns the vertical coordinate of the mouse pointer relevant to the component. |
Methods inherited from class org.zkoss.zk.ui.event.Event |
---|
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALT_KEY
getKeys()
.
public static final int CTRL_KEY
getKeys()
.
public static final int SHIFT_KEY
getKeys()
.
public static final int LEFT_CLICK
public static final int RIGHT_CLICK
public static final int MIDDLE_CLICK
Constructor Detail |
---|
public MouseEvent(java.lang.String name, Component target)
public MouseEvent(java.lang.String name, Component target, int x, int y, int pageX, int pageY)
public MouseEvent(java.lang.String name, Component target, int x, int y, int pageX, int pageY, int keys)
keys
- a combination of CTRL_KEY
, SHIFT_KEY
ALT_KEY
, LEFT_CLICK
and RIGHT_CLICK
.public MouseEvent(java.lang.String name, Component target, java.lang.String area, int keys)
public MouseEvent(java.lang.String name, Component target, int x, int y)
MouseEvent(String,Component,int,int,int,int)
.
public MouseEvent(java.lang.String name, Component target, int x, int y, int keys)
MouseEvent(String,Component,int,int,int,int,int)
.
public MouseEvent(java.lang.String name, Component target, java.lang.String area)
MouseEvent(String,Component,String,int)
.
Method Detail |
---|
public static MouseEvent getMouseEvent(AuRequest request)
public java.lang.String getArea()
It is used only with some special components, such as imagemap
,
that partition itself into several logical areas.
public final int getX()
public final int getY()
public final int getPageX()
public final int getPageY()
public final int getKeys()
CTRL_KEY
, SHIFT_KEY
ALT_KEY
, LEFT_CLICK
and RIGHT_CLICK
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |