Revision 2123

View differences:

branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Panels/ProgressSaveRasterDialog.java
102 102
				try{
103 103
				
104 104
					RasterizerLayer p = new RasterizerLayer(layers, vp, sizeBlock, mapCtrl);
105
					p.setProgressBar(window.getJProgressBar());
105 106
					Extent ex = new Extent(vp.getAdjustedExtent());
106 107
					Dimension imgSz = vp.getImageSize();
107 108
					ViewPortData vpData = new ViewPortData(vp.getProjection(), ex, imgSz );
......
130 131
				try{
131 132
								
132 133
					RasterizerLayer p = new RasterizerLayer(layers, vp, sizeBlock, mapCtrl);
134
					p.setProgressBar(window.getJProgressBar());
133 135
					Extent ex = new Extent(vp.getAdjustedExtent());
134 136
				    writer = new GdalWriter( 	((IDataWriter)p), 
135 137
				    							dimension.width, 
......
170 172
		this.layers = layers;
171 173
		this.currentProjection = currentProjection;
172 174
		this.mapCtrl = mapCtrl;
175
		this.dimension = dimension;
173 176
		
174 177
		vp = new ViewPort(currentProjection);
175 178
		vp.setBackColor(mapCtrl.getViewPort().getBackColor());
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Panels/SaveRasterDialog.java
268 268
		else
269 269
			ext = new Rectangle2D.Double(ulX, lrY, width, height);
270 270
		
271
		/*ProgressSaveRasterDialog progressBar = new ProgressSaveRasterDialog(mapCtrl,
271
		ProgressSaveRasterDialog progressBar = new ProgressSaveRasterDialog(mapCtrl,
272 272
																			this.layers,
273 273
																			this.currentProjection,
274 274
																			dimension,
......
279 279
		progressBar.setFName(fName);
280 280
		progressBar.setBlockSize(sizeBlock);
281 281
		progressBar.setCompresion(compresion);
282
		progressBar.showWindow();*/
282
		progressBar.showWindow();
283 283
		
284
		ViewPort vp = new ViewPort(this.currentProjection);
284
		/*ViewPort vp = new ViewPort(this.currentProjection);
285 285
		vp.setBackColor(mapCtrl.getViewPort().getBackColor());
286 286
		vp.setImageSize(dimension);
287 287
		vp.setExtent(ext);		
......
345 345
			
346 346
		} else {
347 347
		    System.err.println("Extensi?n del fichero " + fName + " no soportada.");
348
		}
348
		}*/
349 349
		
350 350
		for(int i=0;i<layers.getLayersCount();i++){
351 351
			layers.getLayer(i).getFMap().invalidate();
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/RasterizerLayer.java
52 52
import java.awt.geom.Rectangle2D;
53 53
import java.awt.image.BufferedImage;
54 54

  
55
import org.cresques.geo.ViewPortData;
55
import javax.swing.JProgressBar;
56

  
56 57
import org.cresques.io.Rasterizer;
57
import org.cresques.px.Extent;
58
import org.cresques.px.PxLayerList;
59 58

  
60 59
import com.iver.cit.gvsig.fmap.DriverException;
61 60
import com.iver.cit.gvsig.fmap.MapControl;
......
73 72
 */
74 73
public class RasterizerLayer extends Rasterizer{
75 74
	
76
	private ViewPort	viewPort = null;
77
	private ViewPort	viewPortBlock = null;
78
	private FLayers		flayers = null;
79
	private Color		backgroundColor = null;
75
	private ViewPort		viewPort = null;
76
	private ViewPort		viewPortBlock = null;
77
	private FLayers			flayers = null;
78
	private Color			backgroundColor = null;
79
	private JProgressBar	progressBar = null;
80
	private double			incrProgressBar = 0;
80 81
	
81 82
	/**
82 83
	 * Calculo del viewPort
......
131 132
		calcViewPort(viewPort);
132 133
		
133 134
		int nBlocks = (int)(vp.getImageHeight()/sizeBlock);
135
		incrProgressBar = 100.0/((double)nBlocks);
136
		System.out.println("===>NBLOCKS="+nBlocks+" INCR="+incrProgressBar);
134 137
		
135 138
		//Tama?o de ?ltimo bloque en pixeles
136 139
		lastBlock = Math.round(vp.getImageHeight()-(nBlocks*sizeBlock));
......
180 183
			}
181 184
			
182 185
			calcViewPort(viewPortBlock);			
183
		
186
			
187
			if(progressBar != null)
188
				progressBar.setValue((int)Math.round(progressBar.getValue()+incrProgressBar));
189
			
184 190
			contBlocks++;
185 191
			return rasterData;
186 192
		}
......
188 194
		return null;
189 195
	}
190 196
	
197
	/**
198
	 * Asigna la barra de progreso
199
	 * @param bar Barra de progreso
200
	 */
201
	public void setProgressBar(JProgressBar bar){
202
		this.progressBar = bar;
203
		//progressBar.setValue((int)Math.round(incrProgressBar));
204
	}
191 205
}
branches/CqCMSDvp/libraries/libCq CMS for java.old/src/org/cresques/io/EcwWriter.java
1
/*
2
 * Created on 17-feb-2004
3
 *
4
 * To change the template for this generated file go to
5
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
6
 */
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
1 47
package org.cresques.io;
2 48

  
3 49
import java.io.IOException;
branches/CqCMSDvp/libraries/libCq CMS for java.old/src/org/cresques/io/GeoRasterWriter.java
1
/*
2
 * Created on 17-feb-2004
3
 *
4
 * To change the template for this generated file go to
5
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
6
 */
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
1 47
package org.cresques.io;
2 48

  
3 49
import java.io.IOException;
branches/CqCMSDvp/libraries/libCq CMS for java.old/src/org/cresques/io/GdalWriter.java
1
/*
2
 * Created on 17-feb-2004
3
 *
4
 * To change the template for this generated file go to
5
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
6
 */
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
1 47
package org.cresques.io;
2 48

  
3 49
import java.io.IOException;
branches/CqCMSDvp/libraries/libCq CMS for java.old/src/org/cresques/ui/raster/ProgressSaveRasterPanel.java
105 105
			jProgressBar = new JProgressBar();
106 106
			jProgressBar.setVisible(true);
107 107
			jProgressBar.show();
108
			jProgressBar.setValue(50);
108
			jProgressBar.setValue(0);
109 109
			jProgressBar.setPreferredSize(new java.awt.Dimension(350,25));
110 110
		}
111 111
		return jProgressBar;

Also available in: Unified diff