Revision 8235 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/impl/buffer/BufferGeoprocessController.java
BufferGeoprocessController.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.4 2006-08-11 16:13:08 azabala |
|
48 |
* Revision 1.5 2006-10-23 10:27:38 caballero |
|
49 |
* ancho y alto del panel |
|
50 |
* |
|
51 |
* Revision 1.4 2006/08/11 16:13:08 azabala |
|
49 | 52 |
* refactoring to make logic independent from UI |
50 | 53 |
* |
51 | 54 |
* Revision 1.3 2006/07/21 09:10:34 azabala |
... | ... | |
107 | 110 |
* @author azabala |
108 | 111 |
* |
109 | 112 |
*/ |
110 |
public class BufferGeoprocessController extends
|
|
113 |
public class BufferGeoprocessController extends |
|
111 | 114 |
AbstractGeoprocessController { |
112 | 115 |
/** |
113 | 116 |
* UI class to read user entries. |
... | ... | |
120 | 123 |
* launchGeoprocess() method |
121 | 124 |
*/ |
122 | 125 |
private BufferGeoprocess buffer; |
123 |
|
|
126 |
|
|
124 | 127 |
/** |
125 | 128 |
* Default constructor |
126 | 129 |
* |
127 | 130 |
*/ |
128 | 131 |
public BufferGeoprocessController(){} |
129 |
|
|
132 |
|
|
130 | 133 |
/** |
131 | 134 |
* Sets GUI panel to read user entries |
132 | 135 |
*/ |
... | ... | |
196 | 199 |
params.put("attr_name", attributeName); |
197 | 200 |
} |
198 | 201 |
params.put("strategy_flag", new Byte(strategy)); |
199 |
|
|
202 |
|
|
200 | 203 |
//number of radial buffers |
201 | 204 |
int numberOfRadials = bufferPanel.getNumberOfRadialBuffers(); |
202 | 205 |
params.put("numRings", new Integer(numberOfRadials)); |
203 |
|
|
206 |
|
|
204 | 207 |
//type of polygon buffer |
205 | 208 |
String typePolygonBuffer = bufferPanel.getTypePolygonBuffer(); |
206 | 209 |
byte typePolBuffer = BufferVisitor.BUFFER_OUTSIDE_POLY; |
... | ... | |
210 | 213 |
typePolBuffer = BufferVisitor.BUFFER_INSIDE_OUTSIDE_POLY; |
211 | 214 |
} |
212 | 215 |
params.put("typePolBuffer", new Byte(typePolBuffer)); |
213 |
|
|
216 |
|
|
214 | 217 |
//round cap or square cap |
215 | 218 |
byte cap = BufferVisitor.CAP_ROUND; |
216 | 219 |
boolean squareCap = bufferPanel.isSquareCap(); |
... | ... | |
225 | 228 |
bufferPanel.error(errorDescription, error); |
226 | 229 |
return false; |
227 | 230 |
} |
228 |
|
|
231 |
|
|
229 | 232 |
SHPLayerDefinition definition = (SHPLayerDefinition) buffer |
230 | 233 |
.createLayerDefinition(); |
231 | 234 |
definition.setFile(outputFile); |
... | ... | |
238 | 241 |
String errorDescription = PluginServices.getText(this, "Error_preparar_escritura_resultados"); |
239 | 242 |
bufferPanel.error(errorDescription, error); |
240 | 243 |
return false; |
241 |
}
|
|
244 |
} |
|
242 | 245 |
buffer.setResultLayerProperties(writer, schemaManager); |
243 | 246 |
|
244 | 247 |
try { |
... | ... | |
257 | 260 |
bufferPanel.error(errorDescription, error); |
258 | 261 |
return false; |
259 | 262 |
} |
260 |
|
|
263 |
|
|
261 | 264 |
} |
265 |
public int getWidth() { |
|
266 |
return 700; |
|
267 |
} |
|
262 | 268 |
|
269 |
public int getHeight() { |
|
270 |
return 375; |
|
271 |
} |
|
263 | 272 |
} |
264 | 273 |
|
Also available in: Unified diff