Revision 2337

View differences:

org.gvsig.raster.tools/branches/org.gvsig.raster.tools_dataaccess_refactoring/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/properties/panel/EnhancedPanel.java
60 60
		this.setPreferredSize(new Dimension(100, 80));
61 61
	}
62 62

  
63
	/*
64
	 * (non-Javadoc)
65
	 * @see org.gvsig.raster.gui.properties.dialog.IRegistrablePanel#initializeUI()
66
	 */
67 63
	public void initializeUI() {
68 64
	}
69 65

  
......
89 85
		return trimPanel;
90 86
	}
91 87

  
92
	/*
93
	 * (non-Javadoc)
94
	 * @see org.gvsig.raster.gui.properties.dialog.IRegistrablePanel#accept()
95
	 */
96 88
	public void accept() {
97 89
		enhancedControl.accept();
98 90
	}
99 91

  
100
	/*
101
	 * (non-Javadoc)
102
	 * @see org.gvsig.raster.gui.properties.dialog.IRegistrablePanel#apply()
103
	 */
104 92
	public void apply() {
105 93
		enhancedControl.apply();
106 94
	}
107 95

  
108
	/*
109
	 * (non-Javadoc)
110
	 * @see org.gvsig.raster.gui.properties.dialog.IRegistrablePanel#cancel()
111
	 */
112 96
	public void cancel() {
113 97
		enhancedControl.cancel();
114 98
	}
org.gvsig.raster.tools/branches/org.gvsig.raster.tools_dataaccess_refactoring/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/properties/panel/NoDataPanel.java
41 41
import org.gvsig.fmap.dal.coverage.dataset.Buffer;
42 42
import org.gvsig.fmap.dal.coverage.datastruct.NoData;
43 43
import org.gvsig.raster.fmap.layers.FLyrRaster;
44
import org.gvsig.raster.swing.RasterSwingLibrary;
44 45
import org.gvsig.raster.tools.app.basic.RasterExtension;
45
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
46 46
import org.gvsig.raster.util.BasePanel;
47
import org.slf4j.Logger;
48
import org.slf4j.LoggerFactory;
47 49

  
48 50
/**
49 51
 * Panel para la gestion del valor NoData en el panel de propiedades
......
52 54
 */
53 55
public class NoDataPanel extends BasePanel implements ActionListener {
54 56
	private static final long   serialVersionUID       = 7645641060812458944L;
57
	private Logger              log                    = LoggerFactory.getLogger(NoDataPanel.class);
55 58
	private static final String NULL_NODATA            = "Not Defined";
56 59
	private static final String NAN_NODATA             = "NaN";
57 60
	private JLabel              jLabelValue            = null;
......
173 176
		try {
174 177
			new Double(value);
175 178
		} catch (NumberFormatException e) {
176
			RasterToolsUtil.messageBoxError("value_not_valid", this);
177
			return "0";
179
			RasterSwingLibrary.messageBoxError("nodatavalue_not_valid", this);
180
			return null;
178 181
		}
179 182
		return getTextFieldValue().getText();
180 183
	}
......
201 204
		if(text == null) 
202 205
			text = getCheckBoxValue();
203 206
		
204
		if(text.compareTo(NULL_NODATA) == 0) {
207
		if(text == null || text.compareTo(NULL_NODATA) == 0) {
205 208
			noData.setValue(null);
206 209
			noData.save();
207 210
			return;
......
241 244
			noData.setValue(number);
242 245
			noData.save();
243 246
		}catch (NumberFormatException e1) {
244
			RasterToolsUtil.messageBoxError("value_not_valid", this);
247
			log.info("A number format exception in Nodata panel has happend", e1);
245 248
		}
246 249
	}
247 250

  
org.gvsig.raster.tools/branches/org.gvsig.raster.tools_dataaccess_refactoring/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/properties/control/EnhancedControl.java
43 43
import org.gvsig.gui.beans.slidertext.listeners.SliderListener;
44 44
import org.gvsig.raster.fmap.layers.FLyrRaster;
45 45
import org.gvsig.raster.mainplugin.properties.RasterPropertiesTocMenuEntry;
46
import org.gvsig.raster.swing.RasterSwingLibrary;
46 47
import org.gvsig.raster.tools.app.basic.RasterExtension;
47
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
48 48
import org.gvsig.raster.tools.app.basic.raster.process.IProcessActions;
49 49
import org.gvsig.raster.tools.app.basic.raster.process.StatisticsProcess;
50 50
import org.gvsig.raster.tools.app.basic.tool.properties.panel.EnhancedBrightnessContrastPanel;
......
86 86
			active.addActionListener(this);
87 87
		}
88 88

  
89
		/*
90
		 * (non-Javadoc)
91
		 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
92
		 */
93 89
		public void actionPerformed(ActionEvent e) {
94 90
			if (!RasterExtension.autoRefreshView)
95 91
				return;
......
98 94
				onlyApply();
99 95
		}
100 96

  
101
		/*
102
		 * (non-Javadoc)
103
		 * @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueChanged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent)
104
		 */
105 97
		public void actionValueChanged(SliderEvent e) {
106 98
			if (!RasterExtension.autoRefreshView)
107 99
				return;
......
109 101
			onlyApply();
110 102
		}
111 103

  
112
		/*
113
		 * (non-Javadoc)
114
		 * @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueDragged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent)
115
		 */
116 104
		public void actionValueDragged(SliderEvent e) {
117 105
		}
118 106
	}
......
120 108
	/**
121 109
	 * Manejador de eventos del panel EnhancedWithTrim.
122 110
	 *
123
	 * @version 14/06/2007
124
	 * @author BorSanZa - Borja S�nchez Zamorano (borja.sanchez@iver.es)
111
	 * @author BorSanZa - Borja Sanchez Zamorano 
125 112
	 */
126 113
	class EnhancedWithTrimListener implements ActionListener, SliderListener {
127 114
		JCheckBox active = null;
......
137 124
			panel.getTrimSlider().addValueChangedListener(this);
138 125
		}
139 126

  
140
		/*
141
		 * (non-Javadoc)
142
		 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
143
		 */
144 127
		public void actionPerformed(ActionEvent e) {
145 128
			if (!RasterExtension.autoRefreshView)
146 129
				return;
......
148 131
			onlyApply();
149 132
		}
150 133

  
151
		/*
152
		 * (non-Javadoc)
153
		 * @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueChanged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent)
154
		 */
155 134
		public void actionValueChanged(SliderEvent e) {
156 135
			if (!RasterExtension.autoRefreshView)
157 136
				return;
......
159 138
			onlyApply();
160 139
		}
161 140

  
162
		/*
163
		 * (non-Javadoc)
164
		 * @see org.gvsig.gui.beans.slidertext.listeners.SliderListener#actionValueDragged(org.gvsig.gui.beans.slidertext.listeners.SliderEvent)
165
		 */
166 141
		public void actionValueDragged(SliderEvent e) {
167 142
		}
168 143
	}
......
184 159
		try {
185 160
			saveStatus();
186 161
		} catch (FilterManagerException e) {
187
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
162
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
188 163
		} catch (FilterTypeException e) {
189
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
164
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
190 165
		}
191 166

  
192 167
		setValuesFromFilterToPanel();
......
357 332
		try {
358 333
			setValuesFromPanelToFilter();
359 334
		} catch (FilterTypeException e) {
360
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
335
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
361 336
		} catch (FilterAddException e) {
362
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
337
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
363 338
		}
364 339
	}
365 340

  
......
371 346
		try {
372 347
			saveStatus();
373 348
		} catch (FilterManagerException e) {
374
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
349
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
375 350
		} catch (FilterTypeException e) {
376
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
351
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
377 352
		}
378 353
	}
379 354

  
......
385 360
			try {
386 361
				setValuesFromPanelToFilter();
387 362
			} catch (FilterTypeException e) {
388
				RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
363
				RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
389 364
			} catch (FilterAddException e) {
390
				RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
365
				RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
391 366
			}
392 367
	}
393 368

  
......
474 449
			lyr.getMapContext().invalidate();
475 450
	}
476 451
	
477
	/*
478
	 * (non-Javadoc)
479
	 * @see org.gvsig.raster.IProcessActions#end(java.lang.Object)
480
	 */
481 452
	public void end(Object param) {
482 453
		Statistics st = null;
483 454
		if(param instanceof FLyrRaster && ((FLyrRaster)param).getDataStore() != null) 
......
502 473
			enhancementManager.addFilter(params);
503 474
			endActionsForFilterSettings();
504 475
		} catch (FilterManagerException e) {
505
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
476
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
506 477
		} catch (FilterTypeException e) {
507
			RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
478
			RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
508 479
		}
509 480
	}
510 481

  
org.gvsig.raster.tools/branches/org.gvsig.raster.tools_dataaccess_refactoring/org.gvsig.raster.tools.app.basic/src/main/resources-plugin/text_en.properties
395 395
error_set_view=Error setting load view parameters
396 396
no_selected_points=It's not possible to center view to a point.\n There aren't selected points 
397 397
value_not_valid=Value not valid in one cell
398
nodatavalue_not_valid=Value not valid. The nodata value is removed of this layer.
398 399
georef_loading=Loading georeferencig module
399 400
move_image=Move image
400 401
add-point=Add point
org.gvsig.raster.tools/branches/org.gvsig.raster.tools_dataaccess_refactoring/org.gvsig.raster.tools.app.basic/src/main/resources-plugin/text.properties
395 395
error_set_view=Error asignando los par?metros para cargar la vista.
396 396
no_selected_points=No se puede centrar la vista a un punto.\n No hay puntos seleccionados. 
397 397
value_not_valid=Valor de la celda no v?lido.
398
nodatavalue_not_valid=Valor introducido no valido. Se elimina el valor NoData de la capa. 
398 399
georef_loading=Cargando m?dulo de georreferenciaci?n
399 400
move_image=Desplazamiento
400 401
add-point=A?adir punto

Also available in: Unified diff