org.zaval.lw.event
Class LwMouseEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.zaval.lw.event.LwVCLEvent
|
+--org.zaval.lw.event.LwMouseEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class LwMouseEvent
- extends LwVCLEvent
This class is used with light weight components to describe mouse events.
- See Also:
- Serialized Form
| Fields inherited from class org.zaval.lw.event.LwVCLEvent |
COMP_DISABLED, COMP_ENABLED, COMP_HIDDEN, COMP_SHOWN, COMP_UID, CONT_UID, FOCUS_GAINED, FOCUS_LOST, FOCUS_UID, id, KEY_UID, MOUSE_UID, uid |
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
LwMouseEvent(LwComponent target,
int id,
int ax,
int ay,
int mask,
int clickCount)
Constructs the event object with the specified source object, the event id,
the absolute mouse pointer location, mask and click count. |
|
Method Summary |
int |
getAbsX()
Gets the x coordinate of the mouse pointer relatively the desktop parent component. |
int |
getAbsY()
Gets the y coordinate of the mouse pointer relatively the desktop parent component. |
int |
getClickCount()
Gets the number of consecutive mouse clicks. |
int |
getMask()
Gets the mask. |
int |
getX()
Gets the x coordinate of the mouse pointer relatively the source component. |
int |
getY()
Gets the y coordinate of the mouse pointer relatively the source component. |
void |
reset(LwComponent target,
int id,
int ax,
int ay,
int mask,
int clickCount)
|
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MOUSE_CLICKED
public static final int MOUSE_CLICKED
- The mouse clicked event type.
MOUSE_PRESSED
public static final int MOUSE_PRESSED
- The mouse pressed event type.
MOUSE_RELEASED
public static final int MOUSE_RELEASED
- The mouse released event type.
MOUSE_ENTERED
public static final int MOUSE_ENTERED
- The mouse entered event type.
MOUSE_EXITED
public static final int MOUSE_EXITED
- The mouse exited event type.
MOUSE_DRAGGED
public static final int MOUSE_DRAGGED
- The mouse dragged event type.
MOUSE_STARTDRAGGED
public static final int MOUSE_STARTDRAGGED
- The mouse start dragged event type.
MOUSE_ENDDRAGGED
public static final int MOUSE_ENDDRAGGED
- The mouse end dragged event type.
MOUSE_MOVED
public static final int MOUSE_MOVED
- The mouse moved event type.
x
protected int x
y
protected int y
ax
protected int ax
ay
protected int ay
mask
protected int mask
clickCount
protected int clickCount
LwMouseEvent
public LwMouseEvent(LwComponent target,
int id,
int ax,
int ay,
int mask,
int clickCount)
- Constructs the event object with the specified source object, the event id,
the absolute mouse pointer location, mask and click count. The location defines x and
y coordinates relatively the desktop parent component of the light weight source component.
- Parameters:
target - the object where the event originated.id - the specified event id.ax - the x coordinate relatively the desktop parent component.ay - the y coordinate relatively the desktop parent component.mask - the specified mask. The mask can be used to check trigger keys
status.clickCount - the number of consecutive clicks.
reset
public void reset(LwComponent target,
int id,
int ax,
int ay,
int mask,
int clickCount)
getMask
public int getMask()
- Gets the mask. The mask can be used to test if the "Ctrl", "Alt"
and so on keys are pressed or not. Use java.awt.event.InputEvent key modifiers constants
for the purpose.
- Returns:
- a mask.
getAbsX
public int getAbsX()
- Gets the x coordinate of the mouse pointer relatively the desktop parent component.
- Returns:
- a x coordinate.
getAbsY
public int getAbsY()
- Gets the y coordinate of the mouse pointer relatively the desktop parent component.
- Returns:
- an y coordinate.
getX
public int getX()
- Gets the x coordinate of the mouse pointer relatively the source component.
- Returns:
- a x coordinate.
getY
public int getY()
- Gets the y coordinate of the mouse pointer relatively the source component.
- Returns:
- an y coordinate.
getClickCount
public int getClickCount()
- Gets the number of consecutive mouse clicks.
- Returns:
- a number of consecutive mouse clicks.
|