svn-gvsig-desktop / tags / v1_0_2_Build_897 / extensions / extGeoreferencing / src / com / iver / cit / gvsig / fmap / tools / ZoomGeorefListenerImpl.java @ 10444
History | View | Annotate | Download (2.54 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2006 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*/
|
19 |
package com.iver.cit.gvsig.fmap.tools; |
20 |
|
21 |
import java.awt.Cursor; |
22 |
import java.awt.Image; |
23 |
import java.awt.Point; |
24 |
import java.awt.Toolkit; |
25 |
import java.awt.geom.Rectangle2D; |
26 |
|
27 |
import javax.swing.ImageIcon; |
28 |
|
29 |
import com.iver.cit.gvsig.fmap.MapControl; |
30 |
import com.iver.cit.gvsig.fmap.tools.Events.RectangleEvent; |
31 |
import com.iver.cit.gvsig.fmap.tools.Listeners.RectangleListener; |
32 |
|
33 |
|
34 |
/**
|
35 |
* Implementaci?n de la interfaz RectangleListener como herramienta para
|
36 |
* realizar un zoom m?s en la imagen a georeferenciar.
|
37 |
*
|
38 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
39 |
*/
|
40 |
public class ZoomGeorefListenerImpl implements RectangleListener { |
41 |
private static final Image izoomin = new ImageIcon(MapControl.class.getResource( |
42 |
"images/ZoomInCursor.gif")).getImage();
|
43 |
|
44 |
public static Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(izoomin, new Point(16, 16), ""); |
45 |
|
46 |
private MapControl mapCtrl;
|
47 |
|
48 |
/**
|
49 |
* Crea un nuevo RectangleListenerImpl.
|
50 |
*
|
51 |
* @param mapCtrl MapControl.
|
52 |
*/
|
53 |
public ZoomGeorefListenerImpl(MapControl mapCtrl) {
|
54 |
this.mapCtrl = mapCtrl;
|
55 |
} |
56 |
|
57 |
/**
|
58 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.RectangleListener#rectangle(com.iver.cit.gvsig.fmap.tools.Events.RectangleEvent)
|
59 |
*/
|
60 |
public void rectangle(RectangleEvent event) { |
61 |
Rectangle2D rect = event.getWorldCoordRect();
|
62 |
Rectangle2D pixelRect = event.getPixelCoordRect();
|
63 |
Rectangle2D.Double r = new Rectangle2D.Double(); |
64 |
} |
65 |
|
66 |
/**
|
67 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor()
|
68 |
*/
|
69 |
public Cursor getCursor() { |
70 |
return cur;
|
71 |
} |
72 |
|
73 |
/**
|
74 |
* @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing()
|
75 |
*/
|
76 |
public boolean cancelDrawing() { |
77 |
System.out.println("cancelDrawing del ZoomOutListenerImpl"); |
78 |
return true; |
79 |
} |
80 |
} |