|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.ui.event.UIEvent
javax.rad.ui.event.UIMouseEvent
public class UIMouseEvent
Platform and technology independent mouse event definition. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
MouseEvent
Field Summary | |
---|---|
static int |
MOUSE_CLICKED
The "mouse clicked" event. |
static int |
MOUSE_ENTERED
The "mouse entered" event. |
static int |
MOUSE_EXITED
The "mouse exited" event. |
static int |
MOUSE_FIRST
The first number in the range of ids used for mouse events. |
static int |
MOUSE_LAST
The last number in the range of ids used for mouse events. |
static int |
MOUSE_PRESSED
The "mouse pressed" event. |
static int |
MOUSE_RELEASED
The "mouse released" event. |
Fields inherited from class javax.rad.ui.event.UIEvent |
---|
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK |
Constructor Summary | |
---|---|
UIMouseEvent(IComponent pSource,
int pId,
long pWhen,
int pModifiers,
int pX,
int pY,
int pClickCount,
boolean pPopupTrigger)
Creates a new instance of UIMouseEvent . |
Method Summary | |
---|---|
protected void |
checkId(int pId)
Checks if the current Instance of UIEvent allows the given id. |
int |
getClickCount()
Returns the number of mouse clicks associated with this event. |
int |
getX()
Returns the horizontal x position of the event relative to the source component. |
int |
getY()
Returns the vertical y position of the event relative to the source component. |
boolean |
isPopupTrigger()
Returns whether or not this mouse event is the popup menu trigger event for the platform. |
Methods inherited from class javax.rad.ui.event.UIEvent |
---|
getId, getModifiers, getSource, getWhen, isModifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MOUSE_FIRST
public static final int MOUSE_CLICKED
MouseEvent
occurs when a mouse button is pressed and released.
public static final int MOUSE_PRESSED
MouseEvent
occurs when a mouse button is pushed down.
public static final int MOUSE_RELEASED
MouseEvent
occurs when a mouse button is let up.
public static final int MOUSE_ENTERED
MouseEvent
occurs when the mouse cursor enters the unobscured part of component's
geometry.
public static final int MOUSE_EXITED
MouseEvent
occurs when the mouse cursor exits the unobscured part of component's
geometry.
public static final int MOUSE_LAST
Constructor Detail |
---|
public UIMouseEvent(IComponent pSource, int pId, long pWhen, int pModifiers, int pX, int pY, int pClickCount, boolean pPopupTrigger)
UIMouseEvent
.
pSource
- the Source of this UIMouseEvent.pId
- the Id of this UIMouseEvent.pWhen
- the time the event occurredpModifiers
- represents the modifier keys and mouse buttons down while the event occurredpX
- the horizontal x coordinate for the mouse locationpY
- the vertical y coordinate for the mouse locationpClickCount
- the number of mouse clicks associated with eventpPopupTrigger
- a boolean, true if this event is a trigger for a popup menuMethod Detail |
---|
protected void checkId(int pId)
checkId
in class UIEvent
pId
- the Id of this UIEvent.public int getX()
public int getY()
public int getClickCount()
public boolean isPopupTrigger()
Note: Popup menus are triggered differently
on different systems. Therefore, isPopupTrigger
should be checked in both mousePressed
and mouseReleased
for proper cross-platform functionality.
true
if this event is the popup menu trigger
for this platform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |