org.gnu.gtk.event
Class MouseEvent
- Serializable
This event represents mouse events.
BUTTON1
public static final int BUTTON1
BUTTON2
public static final int BUTTON2
BUTTON3
public static final int BUTTON3
DOUBLE_CLICK
public static final int DOUBLE_CLICK
SINGLE_CLICK
public static final int SINGLE_CLICK
TRIPLE_CLICK
public static final int TRIPLE_CLICK
TRIPPLE_CLICK
public static final int TRIPPLE_CLICK
MouseEvent
public MouseEvent(Object source,
MouseEvent.Type type,
EventButton gdkEvent)
Construct a LifeCycleEvent object for the BUTTON event.
MouseEvent
public MouseEvent(Object source,
MouseEvent.Type type,
EventCrossing gdkEvent)
Construct a LifeCycleEvent object for the ENTER and LEAVE event.
MouseEvent
public MouseEvent(Object source,
MouseEvent.Type type,
EventScroll gdkEvent)
Construct a LifeCycleEvent object for the WHEEL_SCROLL event.
getButtonPressed
public int getButtonPressed()
Returns the buttonPressed.
getClickType
public int getClickType()
Returns the click type (single, double, triple). The return value should
be compared against one of the constants included in this class
(SINGLE_CLICK, DOUBLE_CLICK, or TRIPLE_CLICK).
getModifierKey
public ModifierType getModifierKey()
Returns the modifier key used.
getWindow
public Window getWindow()
getX
public double getX()
Returns the x.
getY
public double getY()
Returns the y.
isOfType
public boolean isOfType(MouseEvent.Type test)
Test to compare events.