swingwt.awt.event
Class MouseEvent
java.lang.Object
java.util.EventObject
swingwt.awt.AWTEvent
swingwt.awt.event.ComponentEvent
swingwt.awt.event.InputEvent
swingwt.awt.event.MouseEvent
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- MouseWheelEvent
- public class MouseEvent
- extends InputEvent
- implements java.io.Serializable
- See Also:
- Serialized Form
Fields inherited from class swingwt.awt.event.InputEvent |
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON2_DOWN_MASK, BUTTON3_DOWN_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
MouseEvent(Component source)
|
MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger)
|
MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger,
int button)
|
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 |
NOBUTTON
public static final int NOBUTTON
- See Also:
- Constant Field Values
BUTTON1
public static final int BUTTON1
- See Also:
- Constant Field Values
BUTTON2
public static final int BUTTON2
- See Also:
- Constant Field Values
BUTTON3
public static final int BUTTON3
- See Also:
- Constant Field Values
BUTTON1_MASK
public static final int BUTTON1_MASK
- See Also:
- Constant Field Values
BUTTON2_MASK
public static final int BUTTON2_MASK
- See Also:
- Constant Field Values
BUTTON3_MASK
public static final int BUTTON3_MASK
- See Also:
- Constant Field Values
MOUSE_FIRST
public static final int MOUSE_FIRST
- See Also:
- Constant Field Values
MOUSE_LAST
public static final int MOUSE_LAST
- See Also:
- Constant Field Values
MOUSE_CLICKED
public static final int MOUSE_CLICKED
- See Also:
- Constant Field Values
MOUSE_PRESSED
public static final int MOUSE_PRESSED
- See Also:
- Constant Field Values
MOUSE_RELEASED
public static final int MOUSE_RELEASED
- See Also:
- Constant Field Values
MOUSE_MOVED
public static final int MOUSE_MOVED
- See Also:
- Constant Field Values
MOUSE_ENTERED
public static final int MOUSE_ENTERED
- See Also:
- Constant Field Values
MOUSE_EXITED
public static final int MOUSE_EXITED
- See Also:
- Constant Field Values
MOUSE_DRAGGED
public static final int MOUSE_DRAGGED
- See Also:
- Constant Field Values
MOUSE_WHEEL
public static final int MOUSE_WHEEL
- See Also:
- Constant Field Values
clickCount
public int clickCount
eventID
public int eventID
CLICKED
public static final int CLICKED
- See Also:
- Constant Field Values
ENTERED
public static final int ENTERED
- See Also:
- Constant Field Values
EXITED
public static final int EXITED
- See Also:
- Constant Field Values
PRESSED
public static final int PRESSED
- See Also:
- Constant Field Values
RELEASED
public static final int RELEASED
- See Also:
- Constant Field Values
MouseEvent
public MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger)
MouseEvent
public MouseEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger,
int button)
MouseEvent
public MouseEvent(Component source)
isPopupTrigger
public boolean isPopupTrigger()
- If this mouse event should trigger a popup I guess.
I never used this, but I've just set it to respond
to whether it's a right click for convenience
getModifiers
public int getModifiers()
- Overrides:
getModifiers
in class InputEvent
getClickCount
public int getClickCount()
- Returns the number of mouse clicks associated with this event
getButton
public int getButton()
- Getter for property button.
- Returns:
- Value of property button.
setButton
public void setButton(int button)
- Setter for property button.
- Parameters:
button
- New value of property button.
getX
public int getX()
- Getter for property x.
- Returns:
- Value of property x.
setX
public void setX(int x)
- Setter for property x.
- Parameters:
x
- New value of property x.
getY
public int getY()
- Getter for property y.
- Returns:
- Value of property y.
setY
public void setY(int y)
- Setter for property y.
- Parameters:
y
- New value of property y.
getPoint
public Point getPoint()
translatePoint
public void translatePoint(int x,
int y)
translateSWTButton
public int translateSWTButton(int swtButton)