org.gvsig.fmap.mapcontrol.tools.Events
Class MeasureEvent

java.lang.Object
  extended by org.gvsig.fmap.mapcontrol.tools.Events.MeasureEvent

public class MeasureEvent
extends Object

MeasureEvent is used to notify the selection of a polyline.

Stores the information about the 2D vertexes and the GeneralPathX between them.

Author:
Vicente Caballero Navarro

Constructor Summary
MeasureEvent(Double[] x, Double[] y, MouseEvent e)
          Creates a new MeasureEvent with all necessary data.
 
Method Summary
 MouseEvent getEvent()
          Gets the event that has been the cause of creating this one.
 org.gvsig.fmap.geom.primitive.GeneralPathX getGP()
          Gets the GeneralPathX of the measurement.
 Double[] getXs()
          Gets a vector with the X coordinates.
 Double[] getYs()
          Gets a vector with the Y coordinates.
 void setGP(org.gvsig.fmap.geom.primitive.GeneralPathX gp)
          Sets the GeneralPathX of the measurement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasureEvent

public MeasureEvent(Double[] x,
                    Double[] y,
                    MouseEvent e)

Creates a new MeasureEvent with all necessary data.

The general path is calculated according the enclosed regions of the path alternate between interior and exterior areas are traversed from the outside of the path towards a point inside the region.

Parameters:
x - vector with the X coordinates
y - vector with the Y coordinates
e - event that has been the cause of creating this one
Method Detail

getGP

public org.gvsig.fmap.geom.primitive.GeneralPathX getGP()

Gets the GeneralPathX of the measurement.

Returns:
geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves
See Also:
GeneralPathX

setGP

public void setGP(org.gvsig.fmap.geom.primitive.GeneralPathX gp)

Sets the GeneralPathX of the measurement.

Parameters:
gP - geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves
See Also:
GeneralPathX

getXs

public Double[] getXs()

Gets a vector with the X coordinates.

Returns:
vector with the X coordinates

getYs

public Double[] getYs()

Gets a vector with the Y coordinates.

Returns:
vector with the Y coordinates

getEvent

public MouseEvent 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


Copyright © 2004-2013 gvSIG. All Rights Reserved.