org.gnu.gtk.event

Class MouseEvent

public class MouseEvent extends GtkEvent

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. Signal handling an connection has been completely re-implemented in java-gnome 4.0, so you will need to refactor any code attempting to use this class.

This event represents mouse events.

See Also:

Nested Class Summary
static classMouseEvent.Type
Field Summary
static intBUTTON1
static intBUTTON2
static intBUTTON3
static intDOUBLE_CLICK
static intSINGLE_CLICK
static intTRIPLE_CLICK
static intTRIPPLE_CLICK
Constructor Summary
MouseEvent(Object source, MouseEvent.Type type, EventButton gdkEvent)
Construct a LifeCycleEvent object for the BUTTON event.
MouseEvent(Object source, MouseEvent.Type type, EventScroll gdkEvent)
Construct a LifeCycleEvent object for the WHEEL_SCROLL event.
MouseEvent(Object source, MouseEvent.Type type, EventCrossing gdkEvent)
Construct a LifeCycleEvent object for the ENTER and LEAVE event.
Method Summary
intgetButtonPressed()
Returns the buttonPressed.
intgetClickType()
Returns the click type (single, double, triple).
ScrollDirectiongetDirection()
Returns the direction.
ModifierTypegetModifierKey()
Returns the modifier key used.
WindowgetWindow()
doublegetX()
Returns the x.
doublegetY()
Returns the y.
booleanisOfType(MouseEvent.Type test)
Test to compare events.

Field Detail

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

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.

Constructor Detail

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

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.

Method Detail

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.