Class EnvelopeEvent
java.lang.Object
org.gvsig.fmap.mapcontrol.tools.Events.EnvelopeEvent
RectangleEvent is used to notify a selection of a rectangular area in a view, with the mouse.
- Author:
- Vicente Caballero Navarro
-
Constructor Summary
ConstructorsConstructorDescriptionEnvelopeEvent(org.gvsig.fmap.geom.primitive.Envelope worldRect, MouseEvent e, Rectangle2D pixelRect) Creates a newRectangleEventwith all necessary data. -
Method Summary
Modifier and TypeMethodDescriptiongetEvent()Gets the event that has been the cause of creating this one.Gets the rectangle selected in pixel coordinates.org.gvsig.fmap.geom.primitive.EnvelopeGets the rectangle selected in world coordinates.
-
Constructor Details
-
EnvelopeEvent
public EnvelopeEvent(org.gvsig.fmap.geom.primitive.Envelope worldRect, MouseEvent e, Rectangle2D pixelRect) Creates a new
RectangleEventwith all necessary data.- Parameters:
worldRect- rectangle selected in world coordinatese- mouse event that has been the cause of creating this eventpixelRect- rectangle selected in view (pixel) coordinates
-
-
Method Details
-
getWorldCoordRect
public org.gvsig.fmap.geom.primitive.Envelope getWorldCoordRect()Gets the rectangle selected in world coordinates.
- Returns:
- rectangle selected in world coordinates
-
getPixelCoordRect
Gets the rectangle selected in pixel coordinates.
This is useful for doing some verifications, like if rectangle is thinner than 3 pixels of width and height, keeping the zoom instead of reducing it.
- Returns:
- rectangle selected in view (pixel) coordinates
-
getEvent
Gets the event that has been the cause of creating this one.
- Returns:
- mouse event that has been the cause of creating this one
-