swingwt.awt.event
Class MouseEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byswingwt.awt.AWTEvent
          extended byswingwt.awt.event.ComponentEvent
              extended byswingwt.awt.event.InputEvent
                  extended byswingwt.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

Field Summary
static int BUTTON1
           
static int BUTTON1_MASK
           
static int BUTTON2
           
static int BUTTON2_MASK
           
static int BUTTON3
           
static int BUTTON3_MASK
           
 int clickCount
           
static int CLICKED
           
static int ENTERED
           
 int eventID
           
static int EXITED
           
static int MOUSE_CLICKED
           
static int MOUSE_DRAGGED
           
static int MOUSE_ENTERED
           
static int MOUSE_EXITED
           
static int MOUSE_FIRST
           
static int MOUSE_LAST
           
static int MOUSE_MOVED
           
static int MOUSE_PRESSED
           
static int MOUSE_RELEASED
           
static int MOUSE_WHEEL
           
static int NOBUTTON
           
static int PRESSED
           
static int RELEASED
           
 
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 swingwt.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class swingwt.awt.AWTEvent
consumed
 
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)
           
 
Method Summary
 int getButton()
          Getter for property button.
 int getClickCount()
          Returns the number of mouse clicks associated with this event
 int getModifiers()
           
 Point getPoint()
           
 int getX()
          Getter for property x.
 int getY()
          Getter for property y.
 boolean isPopupTrigger()
          If this mouse event should trigger a popup I guess.
 void setButton(int button)
          Setter for property button.
 void setX(int x)
          Setter for property x.
 void setY(int y)
          Setter for property y.
 void translatePoint(int x, int y)
           
 int translateSWTButton(int swtButton)
           
 
Methods inherited from class swingwt.awt.event.InputEvent
isAltDown, isAltGraphDown, isControlDown, isMetaDown, isShiftDown, translateAWTModifiers, translateSWTModifiers
 
Methods inherited from class swingwt.awt.event.ComponentEvent
getComponent
 
Methods inherited from class swingwt.awt.AWTEvent
consume, getID, isConsumed, setSource
 
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
 

Field Detail

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
Constructor Detail

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)
Method Detail

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)