org.gnu.gtk.event
Class MouseEvent

java.lang.Object
  extended byorg.gnu.gtk.event.GtkEvent
      extended byorg.gnu.gtk.event.MouseEvent
All Implemented Interfaces:
java.io.Serializable

public class MouseEvent
extends GtkEvent

This event represents mouse events.

See Also:
MouseListener, Serialized Form

Nested Class Summary
static class MouseEvent.Type
           
 
Field Summary
static int BUTTON1
           
static int BUTTON2
           
static int BUTTON3
           
static int DOUBLE_CLICK
           
static int SINGLE_CLICK
           
static int TRIPPLE_CLICK
           
 
Fields inherited from class org.gnu.gtk.event.GtkEvent
source, type
 
Constructor Summary
MouseEvent(java.lang.Object source, MouseEvent.Type type, EventButton gdkEvent)
          Construct a LifeCycleEvent object for the BUTTON event.
MouseEvent(java.lang.Object source, MouseEvent.Type type, EventCrossing gdkEvent)
          Construct a LifeCycleEvent object for the ENTER and LEAVE event.
MouseEvent(java.lang.Object source, MouseEvent.Type type, EventScroll gdkEvent)
          Construct a LifeCycleEvent object for the WHEEL_SCROLL event.
 
Method Summary
 int getButtonPressed()
          Returns the buttonPressed.
 ScrollDirection getDirection()
          Returns the direction.
 double getX()
          Returns the x.
 double getY()
          Returns the y.
 boolean isOfType(MouseEvent.Type test)
          Test to compare events.
 
Methods inherited from class org.gnu.gtk.event.GtkEvent
getSource, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

SINGLE_CLICK

public static final int SINGLE_CLICK
See Also:
Constant Field Values

DOUBLE_CLICK

public static final int DOUBLE_CLICK
See Also:
Constant Field Values

TRIPPLE_CLICK

public static final int TRIPPLE_CLICK
See Also:
Constant Field Values
Constructor Detail

MouseEvent

public MouseEvent(java.lang.Object source,
                  MouseEvent.Type type,
                  EventButton gdkEvent)
Construct a LifeCycleEvent object for the BUTTON event.


MouseEvent

public MouseEvent(java.lang.Object source,
                  MouseEvent.Type type,
                  EventScroll gdkEvent)
Construct a LifeCycleEvent object for the WHEEL_SCROLL event.


MouseEvent

public MouseEvent(java.lang.Object source,
                  MouseEvent.Type type,
                  EventCrossing gdkEvent)
Construct a LifeCycleEvent object for the ENTER and LEAVE event.

Method Detail

isOfType

public boolean isOfType(MouseEvent.Type test)
Test to compare events.


getButtonPressed

public int getButtonPressed()
Returns the buttonPressed.

Returns:
int

getDirection

public ScrollDirection getDirection()
Returns the direction.

Returns:
ScrollDirection

getX

public double getX()
Returns the x.

Returns:
double

getY

public double getY()
Returns the y.

Returns:
double