ucar.unidata.view.geoloc
Class PickEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ucar.unidata.view.geoloc.PickEvent
All Implemented Interfaces:
Serializable

public class PickEvent
extends EventObject

User wants to pick an object at 2D location.

Version:
$Id: PickEvent.java,v 1.8 2005/05/13 18:33:14 jeffmc Exp $
Author:
John Caron
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PickEvent(Object source, Point2D location, MouseEvent mouseEvent)
          Create a new PickEvent
PickEvent(Object source, Rectangle2D bounds, MouseEvent mouseEvent)
          Create a new PickEvent
 
Method Summary
 Rectangle2D getBounds()
          Get the Bounds property.
 Point2D getLocation()
          Return the pick point.
 MouseEvent getMouseEvent()
          Get the MouseEvent property.
 boolean isPointSelect()
          Is this pick event a point (as opposed to a region).
 boolean isRegionSelect()
          Is this pick event a region (as opposed to a point).
 
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
 

Constructor Detail

PickEvent

public PickEvent(Object source,
                 Point2D location,
                 MouseEvent mouseEvent)
Create a new PickEvent

Parameters:
source - source of event
location - location of event
mouseEvent - mouse event sparking this event

PickEvent

public PickEvent(Object source,
                 Rectangle2D bounds,
                 MouseEvent mouseEvent)
Create a new PickEvent

Parameters:
source - source of event
bounds - bounding rectangle (for rubber banding)
mouseEvent - mouse event sparking this event
Method Detail

isRegionSelect

public boolean isRegionSelect()
Is this pick event a region (as opposed to a point).

Returns:
Is a region.

isPointSelect

public boolean isPointSelect()
Is this pick event a point (as opposed to a region).

Returns:
Is a point.

getBounds

public Rectangle2D getBounds()
Get the Bounds property.

Returns:
The Bounds

getLocation

public Point2D getLocation()
Return the pick point.

Returns:
The pick point.

getMouseEvent

public MouseEvent getMouseEvent()
Get the MouseEvent property.

Returns:
The MouseEvent