org.gnu.gtk.event

Class MouseEvent

Implemented Interfaces:
Serializable

public class MouseEvent
extends GtkEvent

This event represents mouse events.
See Also:
MouseListener

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
TRIPLE_CLICK
static int
TRIPPLE_CLICK
Deprecated.

Constructor Summary

MouseEvent(Object source, MouseEvent.Type type, EventButton gdkEvent)
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
MouseEvent(Object source, MouseEvent.Type type, EventCrossing gdkEvent)
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
MouseEvent(Object source, MouseEvent.Type type, EventScroll gdkEvent)
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Method Summary

int
getButtonPressed()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
int
getClickType()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
ScrollDirection
getDirection()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
ModifierType
getModifierKey()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
Window
getWindow()
double
getX()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
double
getY()
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.
boolean
isOfType(MouseEvent.Type test)
Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Methods inherited from class org.gnu.gtk.event.GtkEvent

getSource, getType, toString

Field Details

BUTTON1

public static final int BUTTON1
Field Value:
1

BUTTON2

public static final int BUTTON2
Field Value:
2

BUTTON3

public static final int BUTTON3
Field Value:
3

DOUBLE_CLICK

public static final int DOUBLE_CLICK
Field Value:
5

SINGLE_CLICK

public static final int SINGLE_CLICK
Field Value:
4

TRIPLE_CLICK

public static final int TRIPLE_CLICK
Field Value:
6

TRIPPLE_CLICK

public static final int TRIPPLE_CLICK

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Field Value:
6

Constructor Details

MouseEvent

public MouseEvent(Object source,
                  MouseEvent.Type type,
                  EventButton gdkEvent)

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Construct a LifeCycleEvent object for the BUTTON event.

MouseEvent

public MouseEvent(Object source,
                  MouseEvent.Type type,
                  EventCrossing gdkEvent)

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Construct a LifeCycleEvent object for the ENTER and LEAVE event.

MouseEvent

public MouseEvent(Object source,
                  MouseEvent.Type type,
                  EventScroll gdkEvent)

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Construct a LifeCycleEvent object for the WHEEL_SCROLL event.

Method Details

getButtonPressed

public int getButtonPressed()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Returns the buttonPressed.
Returns:
int

getClickType

public int getClickType()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

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).

getDirection

public ScrollDirection getDirection()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Returns the direction.
Returns:
ScrollDirection

getModifierKey

public ModifierType getModifierKey()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Returns the modifier key used.
Returns:
(see ModifierType)

getWindow

public Window getWindow()

getX

public double getX()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Returns the x.
Returns:
double

getY

public double getY()

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Returns the y.
Returns:
double

isOfType

public boolean isOfType(MouseEvent.Type test)

Deprecated. Superceeded by java-gnome 4.0; Signals all have individual interfaces each with a single method corresponding to the signature of the underlying callback.

Test to compare events.