|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject jpicedt.graphic.event.PEMouseEvent
public class PEMouseEvent
This is an enriched implementation of MouseEvent
that return mouse coordinates in
model-coordinates in addition to the usual screen-coordinates.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
PEMouseEvent(MouseEvent awtEvent,
PECanvas source,
PicPoint pt)
|
Method Summary | |
---|---|
boolean |
checkModifiersEx(int onMask,
int offMask)
Convenience method to test the state of all modal keys and mouse buttons just after the mouse event occured. |
MouseEvent |
getAwtMouseEvent()
|
PECanvas |
getCanvas()
Return the PECanvas on which this mouse event occured |
int |
getClickCount()
|
int |
getModifiers()
Return the modifiers flag for this mouse event |
int |
getModifiersEx()
Return the modifiers flag for this mouse event |
PicPoint |
getPicPoint()
|
double |
getX()
Return the x-coordinate of the mouse click point in model-coordinate. |
double |
getY()
Return the y-coordinate of the mouse click point in model-coordinate. |
boolean |
isAltDown()
Return whether or not the ALT modifier is down on this mouse event |
boolean |
isAltGraphDown()
Return whether or not the "AltGr" modifier is down on this mouse event |
boolean |
isControlDown()
Return whether or not the CTRL modifier is down on this mouse event |
boolean |
isLeftButton()
Return whether or not the Left button was pressed |
boolean |
isMetaDown()
Return whether or not the META (aka ALT) modifier is down on this mouse event |
boolean |
isMiddleButton()
Return whether or not the Middle button was pressed ([pending] what happens on MacOS ?) |
boolean |
isPopupTrigger()
|
boolean |
isRightButton()
Return whether or not the Right button was pressed |
boolean |
isShiftDown()
Return whether or not the SHIFT modifier is down on this mouse event |
String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PEMouseEvent(MouseEvent awtEvent, PECanvas source, PicPoint pt)
awtEvent
- the "standard" MouseEvent
, as generated by Component
's
processMouseXXXEvent
method.source
- This constrains PEMouseEvent
's to be generated by
PEMouseListener
's attached to PECanvas
's only. This indeed is the only
event source that makes sense with this kind of events (notably because we need the zoom factor
at some point).pt
- coordinates of click point in model-coordinate systemMethod Detail |
---|
public MouseEvent getAwtMouseEvent()
MouseEvent
wrapped in this PEMouseEvent
; this may be
used to retrieve the MouseEvent
's fields not accessible through
PEMouseEvent
's methods.public PECanvas getCanvas()
public double getX()
public double getY()
public PicPoint getPicPoint()
public int getClickCount()
public int getModifiers()
InputEvent
public int getModifiersEx()
InputEvent
public boolean checkModifiersEx(int onMask, int offMask)
onMask
- keys/buttons which must be on, e.g. SHIFT_DOWN_MASK | BUTTON1_DOWN_MASKoffMask
- keys/buttons which must be off, e.g. CTRL_DOWN_MASK | ALT_DOWN_MASK(extended modifiers masks have been introduced starting from JDK1.4)
public boolean isAltDown()
public boolean isAltGraphDown()
public boolean isControlDown()
public boolean isMetaDown()
public boolean isShiftDown()
public boolean isLeftButton()
public boolean isMiddleButton()
public boolean isRightButton()
public boolean isPopupTrigger()
public String toString()
toString
in class EventObject
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |