Revision 20100 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/Events/RectangleEvent.java

View differences:

RectangleEvent.java
45 45

  
46 46

  
47 47
/**
48
 * Eventos de rect?ngulo sobre la vista.
48
 * <p><code>RectangleEvent</code> is used to notify a selection of a rectangular area in a view, with the mouse.</p>
49 49
 *
50 50
 * @author Vicente Caballero Navarro
51 51
 */
52 52
public class RectangleEvent {
53
	/**
54
	 * <p>Rectangle selected in world coordinates.</p>
55
	 */
53 56
    private Rectangle2D rect;
57
    
58
    /**
59
     * <p>Rectangle selected in view (pixel) coordinates.</p>
60
     */
54 61
    private Rectangle2D pixRect;
62
    
63
    /**
64
	 * <p>Mouse event that has been the cause of creating this event.</p>
65
     */
55 66
    private MouseEvent event;
56 67

  
57 68
	/**
58
	 * Crea un nuevo RectangleEvent.
59
	 * @param worldRect Rect?ngulo.
60
	 * @param pixelRect TODO
69
	 * <p>Creates a new <code>RectangleEvent</code> with all necessary data.</p>
70
	 * 
71
	 * @param worldRect rectangle selected in world coordinates
72
	 * @param pixelRect rectangle selected in view (pixel) coordinates
73
	 * @param e mouse event that has been the cause of creating this event
61 74
	 */
62 75
    public RectangleEvent(Rectangle2D worldRect, MouseEvent e, Rectangle2D pixelRect) {
63 76
        rect = worldRect;
......
66 79
    }
67 80

  
68 81
	/**
69
	 * Devuelve el rect?ngulo en coordenadas de mundo real.
82
	 * <p>Gets the rectangle selected in world coordinates.</p>
70 83
	 *
71
	 * @return Rect?ngulo.
84
	 * @return rectangle selected in world coordinates
72 85
	 */
73 86
    public Rectangle2D getWorldCoordRect() {
74 87
        return rect;
75 88
    }
76 89
    
77 90
    /**
78
     * Devolvemos el rect?ngulo en pixels para que se puedan
79
     * comprobar cosas como que es menor de 3 pixels de ancho o alto
80
     * y hacer un zoom fijo en lugar de a ese rect?ngulo tan peque?o.
91
     * <p>Gets the rectangle selected in pixel coordinates.</p>
92
     *
93
     * <p>This is useful for doing some verifications, like if rectangle is thinner than
94
     *  3 pixels of width and height, keeping the zoom instead of reducing it.</p>
81 95
     * 
82
     * @return
96
     * @return rectangle selected in view (pixel) coordinates
83 97
     */
84 98
    public Rectangle2D getPixelCoordRect() {
85 99
        return pixRect;
86 100
    }
87 101
    
88

  
102
    /**
103
	 * <p>Gets the event that has been the cause of creating this one.</p>
104
	 * 
105
	 * @return mouse event that has been the cause of creating this one
106
     */
89 107
	public MouseEvent getEvent() {
90 108
		return event;
91 109
	}

Also available in: Unified diff