Revision 20100 branches/v10/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 { |
... | ... | |
113 | 127 |
} |
114 | 128 |
} |
115 | 129 |
|
116 |
/** |
|
130 |
/* |
|
131 |
* (non-Javadoc) |
|
117 | 132 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor() |
118 | 133 |
*/ |
119 | 134 |
public Cursor getCursor() { |
120 | 135 |
return cur; |
121 | 136 |
} |
122 | 137 |
|
123 |
/** |
|
138 |
/* |
|
139 |
* (non-Javadoc) |
|
124 | 140 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing() |
125 | 141 |
*/ |
126 | 142 |
public boolean cancelDrawing() { |
127 | 143 |
return false; |
128 | 144 |
} |
129 | 145 |
|
146 |
/* |
|
147 |
* (non-Javadoc) |
|
148 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#pointDoubleClick(com.iver.cit.gvsig.fmap.tools.Events.PointEvent) |
|
149 |
*/ |
|
130 | 150 |
public void pointDoubleClick(PointEvent event) throws BehaviorException { |
131 | 151 |
|
132 | 152 |
} |
133 |
|
|
134 |
|
|
135 | 153 |
} |
Also available in: Unified diff