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

View differences:

PolygonSelectionListener.java
64 64

  
65 65

  
66 66
/**
67
 * Implementaci?n de la interfaz PolygonListener como herramienta para
68
 * realizar una selecci?n por pol?gono.
67
 * <p>Listener that selects all features of the active and vector layers which intersect with the defined
68
 *  polygon area in the associated {@link MapControl MapControl} object.</p>
69 69
 *
70
 * <p>The selection will be produced after user finishes the creation of the polyline.</p>
71
 *
70 72
 * @author Vicente Caballero Navarro
71 73
 */
72 74
public class PolygonSelectionListener implements PolylineListener {
75
	/**
76
	 * The image to display when the cursor is active.
77
	 */
73 78
	private final Image img = new ImageIcon(MapControl.class.getResource(
74 79
				"images/PoligonCursor.png")).getImage();
80

  
81
	/**
82
	 * The cursor used to work with this tool listener.
83
	 * 
84
	 * @see #getCursor()
85
	 */
75 86
	private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(img,
76 87
			new Point(16, 16), "");
88

  
89
	/**
90
	 * Reference to the <code>MapControl</code> object that uses.
91
	 */
77 92
	private MapControl mapCtrl;
78 93

  
79 94
	/**
80
	 * Crea un nuevo AreaListenerImpl.
95
 	 * <p>Creates a new <code>PolygonSelectionListener</code> object.</p>
81 96
	 *
82
	 * @param mc MapControl.
97
	 * @param mc the <code>MapControl</code> where is drawn the polyline
83 98
	 */
84 99
	public PolygonSelectionListener(MapControl mc) {
85 100
		this.mapCtrl = mc;
86 101
	}
87 102

  
88

  
89
	/**
103
	/*
104
	 * (non-Javadoc)
90 105
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor()
91 106
	 */
92 107
	public Cursor getCursor() {
93 108
		return cur;
94 109
	}
95 110

  
96
	/**
111
	/*
112
	 * (non-Javadoc)
97 113
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing()
98 114
	 */
99 115
	public boolean cancelDrawing() {
100 116
		return false;
101 117
	}
102 118

  
119
	/*
120
	 * (non-Javadoc)
121
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PolylineListener#points(com.iver.cit.gvsig.fmap.tools.Events.MeasureEvent)
122
	 */
103 123
	public void points(MeasureEvent event) throws BehaviorException {
104 124
		// TODO Auto-generated method stub
105 125
		
106 126
	}
107 127

  
128
	/*
129
	 * (non-Javadoc)
130
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PolylineListener#pointFixed(com.iver.cit.gvsig.fmap.tools.Events.MeasureEvent)
131
	 */
108 132
	public void pointFixed(MeasureEvent event) throws BehaviorException {
109 133
		// TODO Auto-generated method stub
110 134
		
111 135
	}
112 136

  
137
	/*
138
	 * (non-Javadoc)
139
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PolylineListener#polylineFinished(com.iver.cit.gvsig.fmap.tools.Events.MeasureEvent)
140
	 */
113 141
	public void polylineFinished(MeasureEvent event) throws BehaviorException {
114 142
		try {
115 143
			ViewPort vp = mapCtrl.getMapContext().getViewPort();

Also available in: Unified diff