Revision 11154 trunk/extensions/extCenterViewToPoint/src/com/iver/gvsig/centerviewtopoint/gui/InputCoordinatesPanel.java
InputCoordinatesPanel.java | ||
---|---|---|
113 | 113 |
initializeCoordinates(); |
114 | 114 |
initialize(); |
115 | 115 |
} |
116 |
|
|
116 |
|
|
117 |
/** |
|
118 |
* Sets the proper text for the first and second coordinate labels, |
|
119 |
* depending on the kind of selected projection. |
|
120 |
* |
|
121 |
*/ |
|
117 | 122 |
private void initializeCoordinates() { |
118 | 123 |
IProjection proj = mapControl.getProjection(); |
119 | 124 |
String projName = proj.getAbrev(); |
... | ... | |
129 | 134 |
} |
130 | 135 |
} |
131 | 136 |
|
137 |
/** |
|
138 |
* Move the view's extent so that the specified point gets |
|
139 |
* centered. |
|
140 |
* |
|
141 |
* @throws Exception |
|
142 |
*/ |
|
132 | 143 |
private void zoomToCoordinates() throws Exception { |
133 | 144 |
try{ |
134 | 145 |
Rectangle2D oldExtent = mapControl.getViewPort().getAdjustedExtent(); |
... | ... | |
222 | 233 |
} |
223 | 234 |
return viewInfo; |
224 | 235 |
} |
236 |
/** |
|
237 |
* Opens the infoByPoint dialog for the selected point. |
|
238 |
* |
|
239 |
*/ |
|
225 | 240 |
private void openInfo(){ |
226 | 241 |
InfoListener infoListener=new InfoListener(mapControl); |
227 | 242 |
MouseEvent e=new MouseEvent((Component)(((CenterViewToPointExtension)PluginServices.getExtension(CenterViewToPointExtension.class)).getView()),MouseEvent.BUTTON1,MouseEvent.ACTION_EVENT_MASK,MouseEvent.MOUSE_CLICKED,500,400,1,true); |
... | ... | |
238 | 253 |
PluginServices.getText(this,"debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion")); |
239 | 254 |
} |
240 | 255 |
} |
256 |
|
|
257 |
/** |
|
258 |
* Draws the selected point on the view. |
|
259 |
* |
|
260 |
* @param color |
|
261 |
*/ |
|
241 | 262 |
private void drawPoint(Color color){ |
242 | 263 |
CenterViewToPointExtension.COLOR=color; |
243 | 264 |
lyr.clearAllGraphics(); |
... | ... | |
305 | 326 |
return okCancelPanel; |
306 | 327 |
} |
307 | 328 |
|
329 |
/** |
|
330 |
* Close the window. |
|
331 |
* |
|
332 |
*/ |
|
308 | 333 |
private void closeThis() { |
309 | 334 |
PluginServices.getMDIManager().closeWindow(this); |
310 | 335 |
|
Also available in: Unified diff