gvsig-raster / org.gvsig.raster.georeferencing / trunk / org.gvsig.raster.georeferencing / org.gvsig.raster.georeferencing.swing / org.gvsig.raster.georeferencing.swing.api / src / main / java / org / gvsig / raster / georeferencing / swing / view / GeoreferencingView.java @ 1717
History | View | Annotate | Download (3.63 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.georeferencing.swing.view; |
23 |
|
24 |
import java.awt.Graphics2D; |
25 |
import java.awt.geom.Point2D; |
26 |
import java.awt.geom.Rectangle2D; |
27 |
import java.awt.image.BufferedImage; |
28 |
|
29 |
import javax.swing.JPanel; |
30 |
|
31 |
/**
|
32 |
* @author Nacho Brodin nachobrodin@gmail.com
|
33 |
*/
|
34 |
public interface GeoreferencingView { |
35 |
|
36 |
public JPanel getComponent(); |
37 |
|
38 |
public void setViewListener(ViewListener listener); |
39 |
|
40 |
public void setRequestListener(IViewRequestManager listener); |
41 |
|
42 |
public void setTool(int tool, ToolListener listener); |
43 |
|
44 |
/**
|
45 |
* Gets the canvas associated to this view
|
46 |
* @return
|
47 |
*/
|
48 |
public GeorefCanvas getCanvas();
|
49 |
|
50 |
/**
|
51 |
* Gets the Graphics object
|
52 |
* @return
|
53 |
*/
|
54 |
public Graphics2D getCanvasGraphic(); |
55 |
|
56 |
/**
|
57 |
* Gets the width of the canvas
|
58 |
* @return
|
59 |
*/
|
60 |
public int getCanvasWidth(); |
61 |
|
62 |
/**
|
63 |
* Gets the height of the canvas
|
64 |
* @return
|
65 |
*/
|
66 |
public int getCanvasHeight(); |
67 |
|
68 |
/**
|
69 |
* Sets the cursor position on the canvas
|
70 |
* @param x
|
71 |
* @param y
|
72 |
*/
|
73 |
public void setCursorPosition(int x, int y); |
74 |
|
75 |
/**
|
76 |
* Sets the cursor size
|
77 |
* @param w
|
78 |
* @param h
|
79 |
*/
|
80 |
public void setCursorSize(int w, int h); |
81 |
|
82 |
/**
|
83 |
* Asigna los par?metros de dibujado para el raster
|
84 |
* @param img Buffer con un ?rea de datos
|
85 |
* @param ext Rectangle2D del ?rea de datos dada
|
86 |
* @param pixelSize Tama?o de pixel
|
87 |
* @param center Punto del ?rea de datos donde se quiere centrar el dibujado del buffer
|
88 |
*/
|
89 |
public void setDrawParams(BufferedImage img, Rectangle2D ext, double pixelSize, Point2D center); |
90 |
|
91 |
/**
|
92 |
* Obtiene las coordenadas de la ventana de zoom. Las coordenadas son devueltas
|
93 |
* en referencia a las coordenadas del mundo. Esta llamada ajusta el tama?o de la ventana a la
|
94 |
* proporci?n pasada por par?metro. Es decir, si pasamos una proporci?n en la que el ancho es 3 veces
|
95 |
* mayor que el alto se ajustar? el zoom a esta proporci?n ya que presupone que la ventana de
|
96 |
* destino del zoom va a tener esas proporciones.
|
97 |
* @return
|
98 |
*/
|
99 |
public Rectangle2D getCursorAdjustedWorldCoordinates(int wWindow, int hWindow); |
100 |
|
101 |
/**
|
102 |
* Selecciona una herramienta a partir de su clase. Si el argumento es null
|
103 |
* elimina cualquier herramienta seleccionada.
|
104 |
* @param tool Constant defined in GeoreferencingSwingLibrary
|
105 |
*/
|
106 |
public void selectTool(int tool, boolean select); |
107 |
|
108 |
/**
|
109 |
* Gets the selected tool
|
110 |
* @return
|
111 |
*/
|
112 |
public int getToolSelected(); |
113 |
|
114 |
public void setSelectZoomAreaButtonSelected(boolean select); |
115 |
|
116 |
public void setMoveButtonSelected(boolean select); |
117 |
|
118 |
/**
|
119 |
* Asigna el valor para el flag minxMaxyUL. Este flag informa de que la esquina
|
120 |
* superior izquierda corresponde con el valor de m?nimo X y m?ximo Y. En caso
|
121 |
* de ser false esta esquina ser?a de m?nimo X y m?nimo Y.
|
122 |
* @param v
|
123 |
*/
|
124 |
public void setMinxMaxyUL(boolean v); |
125 |
|
126 |
public boolean getMinxMaxyUL(); |
127 |
} |