Revision 20098 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/PointSelectionListener.java
PointSelectionListener.java | ||
---|---|---|
59 | 59 |
|
60 | 60 |
|
61 | 61 |
/** |
62 |
* Implementaci?n de la interfaz PointListener como herramienta para realizar
|
|
63 |
* una selecci?n por punto.
|
|
62 |
* <p>Listener that selects all features of the active, and vector layers of the associated <code>MapControl</code>
|
|
63 |
* that their area intersects with the point selected by a single click of any button of the mouse.</p>
|
|
64 | 64 |
* |
65 | 65 |
* @author Vicente Caballero Navarro |
66 | 66 |
*/ |
67 | 67 |
public class PointSelectionListener implements PointListener { |
68 |
/** |
|
69 |
* The image to display when the cursor is active. |
|
70 |
*/ |
|
68 | 71 |
private final Image img = new ImageIcon(MapControl.class.getResource( |
69 | 72 |
"images/PointSelectCursor.gif")).getImage(); |
73 |
|
|
74 |
/** |
|
75 |
* The cursor used to work with this tool listener. |
|
76 |
* |
|
77 |
* @see #getCursor() |
|
78 |
*/ |
|
70 | 79 |
private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(img, |
71 | 80 |
new Point(16, 16), ""); |
81 |
|
|
82 |
/** |
|
83 |
* Reference to the <code>MapControl</code> object that uses. |
|
84 |
*/ |
|
72 | 85 |
protected MapControl mapCtrl; |
73 | 86 |
|
74 | 87 |
/** |
75 |
* Crea un nuevo AreaListenerImpl.
|
|
76 |
* |
|
77 |
* @param mc MapControl.
|
|
88 |
* <p>Creates a new <code>PointSelectionListener</code> object.</p>
|
|
89 |
*
|
|
90 |
* @param mc the <code>MapControl</code> where will be applied the changes
|
|
78 | 91 |
*/ |
79 | 92 |
public PointSelectionListener(MapControl mc) { |
80 | 93 |
this.mapCtrl = mc; |
81 | 94 |
} |
82 | 95 |
|
83 |
/** |
|
96 |
/* |
|
97 |
* (non-Javadoc) |
|
84 | 98 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.Events.PointEvent) |
85 | 99 |
*/ |
86 | 100 |
public void point(PointEvent event) throws BehaviorException { |
... | ... | |
112 | 126 |
} |
113 | 127 |
} |
114 | 128 |
|
115 |
/** |
|
129 |
/* |
|
130 |
* (non-Javadoc) |
|
116 | 131 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor() |
117 | 132 |
*/ |
118 | 133 |
public Cursor getCursor() { |
119 | 134 |
return cur; |
120 | 135 |
} |
121 | 136 |
|
122 |
/** |
|
137 |
/* |
|
138 |
* (non-Javadoc) |
|
123 | 139 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing() |
124 | 140 |
*/ |
125 | 141 |
public boolean cancelDrawing() { |
126 | 142 |
return false; |
127 | 143 |
} |
128 | 144 |
|
145 |
/* |
|
146 |
* (non-Javadoc) |
|
147 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#pointDoubleClick(com.iver.cit.gvsig.fmap.tools.Events.PointEvent) |
|
148 |
*/ |
|
129 | 149 |
public void pointDoubleClick(PointEvent event) throws BehaviorException { |
130 | 150 |
|
131 | 151 |
} |
Also available in: Unified diff