org.zaval.awt.gdp.event
Class MouseDragEvent


java.lang.Object

  |

  +--java.util.EventObject

        |

        +--org.zaval.util.event.EvObject

              |

              +--org.zaval.awt.gdp.event.MouseDragEvent

All Implemented Interfaces:
java.io.Serializable

public class MouseDragEvent
extends EvObject

This class represents mouse drag event.

See Also:
Serialized Form

Inner Class Summary
 class MouseDragEvent.Destination
           This class represents destination component.
 
Field Summary
static int DRAG_MOVED
           The drag moved event type.
static int DRAG_STARTED
           The drag started event type.
static int DRAG_STOPPED
           The drag stopped event type.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MouseDragEvent(java.awt.Component src, int x, int y, int id)
           Constructs the event object with the specified source component, the given location and the event id.
 
Method Summary
protected  boolean checkID(int id)
           The method returns true if the specified id is valid for the event, otherwise returns false.
 MouseDragEvent.Destination getDestination()
           Defines and returns destination component description.
 int getX()
           Gets the x coordinate where the event originated relatively to the source component.
 int getY()
           Gets the y coordinate where the event originated relatively to the source component.
 
Methods inherited from class org.zaval.util.event.EvObject
getID
 
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

DRAG_STARTED


public static final int DRAG_STARTED
The drag started event type.

DRAG_STOPPED


public static final int DRAG_STOPPED
The drag stopped event type.

DRAG_MOVED


public static final int DRAG_MOVED
The drag moved event type.
Constructor Detail

MouseDragEvent


public MouseDragEvent(java.awt.Component src,
                      int x,
                      int y,
                      int id)
Constructs the event object with the specified source component, the given location and the event id.
Parameters:
src - the component where the event originated.
x - the specified x coordinate relatively to the source component.
y - the specified y coordinate relatively to the source component.
id - the specified event id.
Method Detail

getX


public int getX()
Gets the x coordinate where the event originated relatively to the source component.
Returns:
a x coordinate.

getY


public int getY()
Gets the y coordinate where the event originated relatively to the source component.
Returns:
an y coordinate.

getDestination


public MouseDragEvent.Destination getDestination()
Defines and returns destination component description. The class uses the mouse pointer location to find the destination.
Returns:
a destination object description.

checkID


protected boolean checkID(int id)
The method returns true if the specified id is valid for the event, otherwise returns false. The method is called with the event constructor to test if the event id is valid and if the event is not valid the IllegalArgumentException will be thrown.
Overrides:
checkID in class EvObject
Parameters:
id - the specified id.


Copyright © Zaval Creative Engineering Group, 2000-2005
http://www.zaval.org