Revision 2340
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/analysisview/ViewRasterAnalysisTocMenuEntry.java | ||
---|---|---|
22 | 22 |
import java.beans.PropertyChangeListener; |
23 | 23 |
import java.io.File; |
24 | 24 |
import java.util.ArrayList; |
25 |
import java.util.List; |
|
25 | 26 |
|
26 | 27 |
import javax.swing.Icon; |
27 | 28 |
import javax.swing.JOptionPane; |
... | ... | |
40 | 41 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
41 | 42 |
import org.gvsig.raster.fmap.layers.ILayerState; |
42 | 43 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
44 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
43 | 45 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
44 | 46 |
import org.gvsig.raster.tools.app.basic.tool.pixelincrease.PixelIncreaseDialog; |
45 | 47 |
|
... | ... | |
115 | 117 |
|
116 | 118 |
public void execute(ITocItem item, FLayer[] selectedItems) { |
117 | 119 |
MapControl mcCurrentLoc = null; |
118 |
ArrayList mapControlListLoc = new ArrayList();
|
|
120 |
List<MapOverview> mapControlListLoc = new ArrayList<MapOverview>();
|
|
119 | 121 |
IWindow[] w = PluginServices.getMDIManager().getAllWindows(); |
120 | 122 |
IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow(); |
121 | 123 |
FLayer lyr = selectedItems[0]; |
... | ... | |
146 | 148 |
try { |
147 | 149 |
File f = new File(path); |
148 | 150 |
if(!f.exists()) { |
149 |
RasterToolsUtil.messageBoxError("error_file_not_found", PluginServices.getMDIManager().getActiveWindow());
|
|
151 |
RasterSwingLibrary.messageBoxError("error_file_not_found", PluginServices.getMDIManager().getActiveWindow());
|
|
150 | 152 |
return; |
151 | 153 |
} |
152 | 154 |
lyr = DefaultFLyrRaster.createLayer(lyr.getName(), f); |
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/saveraster/SaveRasterTocMenuEntry.java | ||
---|---|---|
37 | 37 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior; |
38 | 38 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.RectangleBehavior; |
39 | 39 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
40 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
40 | 41 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
41 | 42 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.map.SaveRasterListener; |
42 | 43 |
|
... | ... | |
111 | 112 |
// la barra de estado |
112 | 113 |
StatusBarListener sbl = new StatusBarListener(mapCtrl); |
113 | 114 |
|
114 |
RasterToolsUtil.messageBoxInfo("start_save", theView);
|
|
115 |
RasterSwingLibrary.messageBoxInfo("start_save", theView);
|
|
115 | 116 |
loadSaveRasterListener(mapCtrl, sbl); |
116 | 117 |
mapCtrl.setTool("saveRaster"); |
117 | 118 |
} |
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/saveraster/ui/listener/SaveRasterDialogListener.java | ||
---|---|---|
50 | 50 |
import org.gvsig.gui.beans.propertiespanel.PropertiesPanel; |
51 | 51 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
52 | 52 |
import org.gvsig.raster.mainplugin.config.Configuration; |
53 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
53 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
54 | 54 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.operation.RasterizerLayer; |
55 | 55 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.operation.SaveRasterActions; |
56 | 56 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.operation.SaveRasterProcess; |
57 | 57 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.ui.SaveRasterDialog; |
58 | 58 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.ui.SaveRasterPanel; |
59 | 59 |
import org.gvsig.raster.tools.app.basic.tool.saveraster.ui.property.WriterPropertiesDialog; |
60 |
import org.slf4j.Logger; |
|
61 |
import org.slf4j.LoggerFactory; |
|
60 | 62 |
|
61 | 63 |
|
62 | 64 |
/** |
63 | 65 |
* Clase que gestiona los eventos de los botones del dialogo de Salvar a raster. |
64 | 66 |
* |
65 |
* @version 19/04/2007 |
|
66 | 67 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
67 | 68 |
* |
68 | 69 |
*/ |
69 | 70 |
public class SaveRasterDialogListener implements ButtonsPanelListener { |
70 | 71 |
private static final GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
72 |
private Logger log = LoggerFactory.getLogger(SaveRasterDialogListener.class); |
|
71 | 73 |
private SaveRasterDialog dialog = null; |
72 | 74 |
private FLayers layers = null; |
73 | 75 |
private MapControl mapCtrl = null; |
... | ... | |
121 | 123 |
|
122 | 124 |
//Limitamos el tama?o |
123 | 125 |
if(dialog.getDataInputListener().getWidthInPixels() > 20000 || dialog.getDataInputListener().getHeightInPixels() > 20000) { |
124 |
if(!RasterToolsUtil.messageBoxYesOrNot("output_file_too_big", null))
|
|
126 |
if(!RasterSwingLibrary.messageBoxYesOrNot("output_file_too_big", null))
|
|
125 | 127 |
return false; |
126 | 128 |
} |
127 | 129 |
|
128 | 130 |
//Comprobamos que el en la ruta de destino tengamos permisos de escritura |
129 | 131 |
File f = new File(fName); |
130 | 132 |
if(f.exists()) |
131 |
if(!RasterToolsUtil.messageBoxYesOrNot("raster_error_file_exists", dialog))
|
|
133 |
if(!RasterSwingLibrary.messageBoxYesOrNot("raster_error_file_exists", dialog))
|
|
132 | 134 |
return false; |
133 | 135 |
|
134 | 136 |
f = new File(fName.substring(0, fName.lastIndexOf(File.separator))); |
135 | 137 |
|
136 | 138 |
if(f.exists() && f.isDirectory() && !f.canWrite()) { |
137 |
RasterToolsUtil.messageBoxError("error_file_not_writable", dialog);
|
|
139 |
RasterSwingLibrary.messageBoxError("error_file_not_writable", dialog);
|
|
138 | 140 |
return false; |
139 | 141 |
} |
140 | 142 |
|
... | ... | |
156 | 158 |
try{ |
157 | 159 |
ext = geomManager.createEnvelope(ulX, lrY, lrX, ulY, SUBTYPES.GEOM2D); |
158 | 160 |
}catch(CreateEnvelopeException e1){ |
159 |
RasterToolsUtil.debug("Error creating the envelope", null, e1);
|
|
161 |
log.debug("Error creating the envelope", null, e1);
|
|
160 | 162 |
} |
161 | 163 |
|
162 | 164 |
// Controlamos el tama?o en caso de un jpeg2000 |
... | ... | |
166 | 168 |
long maxJp2 = 13000 * 12500 * 3; |
167 | 169 |
if (fName.endsWith(".jp2")) { |
168 | 170 |
if (bytes > maxJp2) { |
169 |
if(!RasterToolsUtil.messageBoxYesOrNot("output_file_too_big_jpeg2000", null))
|
|
171 |
if(!RasterSwingLibrary.messageBoxYesOrNot("output_file_too_big_jpeg2000", null))
|
|
170 | 172 |
return false; |
171 | 173 |
} |
172 | 174 |
} |
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/saveraster/operation/CopyDataset.java | ||
---|---|---|
36 | 36 |
import org.gvsig.raster.algorithm.process.ProcessException; |
37 | 37 |
import org.gvsig.raster.fmap.layers.DefaultFLyrRaster; |
38 | 38 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
39 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
39 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
40 | 40 |
import org.gvsig.raster.tools.app.basic.raster.process.ClippingProcess; |
41 | 41 |
import org.gvsig.raster.tools.app.basic.tool.saveas.SaveAsActions; |
42 | 42 |
|
... | ... | |
106 | 106 |
try { |
107 | 107 |
params = rManager.createWriter(fDstName).getParams(); |
108 | 108 |
} catch (NotSupportedExtensionException e1) { |
109 |
RasterToolsUtil.messageBoxError("no_driver_escritura", this, e1);
|
|
109 |
RasterSwingLibrary.messageBoxError("no_driver_escritura", this, e1);
|
|
110 | 110 |
} catch (RasterDriverException e1) { |
111 |
RasterToolsUtil.messageBoxError("no_driver_escritura", this, e1);
|
|
111 |
RasterSwingLibrary.messageBoxError("no_driver_escritura", this, e1);
|
|
112 | 112 |
} |
113 | 113 |
|
114 | 114 |
// Lanzamiento del proceso de guardado |
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/saveraster/operation/SaveRasterActions.java | ||
---|---|---|
21 | 21 |
*/ |
22 | 22 |
package org.gvsig.raster.tools.app.basic.tool.saveraster.operation; |
23 | 23 |
|
24 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
24 | 25 |
import org.gvsig.raster.swing.RasterSwingLocator; |
25 | 26 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
26 | 27 |
import org.gvsig.raster.tools.app.basic.raster.process.IProcessActions; |
... | ... | |
46 | 47 |
String fName = (String)((Object[])params)[0]; |
47 | 48 |
long milis = ((Long)((Object[])params)[1]).longValue(); |
48 | 49 |
|
49 |
if(RasterToolsUtil.messageBoxYesOrNot("cargar_toc", this)) {
|
|
50 |
if(RasterSwingLibrary.messageBoxYesOrNot("cargar_toc", this)) {
|
|
50 | 51 |
try { |
51 | 52 |
RasterToolsUtil.loadLayer(null, fName, null); |
52 | 53 |
} catch (RasterNotLoadException e) { |
53 |
RasterToolsUtil.messageBoxError("error_load_layer", this, e);
|
|
54 |
RasterSwingLibrary.messageBoxError("error_load_layer", this, e);
|
|
54 | 55 |
} |
55 | 56 |
} |
56 | 57 |
RasterSwingLocator.getSwingManager().showSummaryProcessDialog(fName, milis); |
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/saveraster/operation/RasterizerLayer.java | ||
---|---|---|
33 | 33 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
34 | 34 |
import org.gvsig.fmap.dal.coverage.store.DataServerWriter; |
35 | 35 |
import org.gvsig.fmap.dal.exception.ReadException; |
36 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
36 | 37 |
import org.gvsig.fmap.geom.GeometryLocator; |
37 | 38 |
import org.gvsig.fmap.geom.GeometryManager; |
38 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
39 | 39 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
40 | 40 |
import org.gvsig.fmap.geom.primitive.Envelope; |
41 | 41 |
import org.gvsig.fmap.mapcontext.ViewPort; |
... | ... | |
43 | 43 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
44 | 44 |
import org.gvsig.gui.beans.incrementabletask.IIncrementable; |
45 | 45 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
46 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
47 | 46 |
import org.gvsig.tools.task.Cancellable; |
47 |
import org.slf4j.Logger; |
|
48 |
import org.slf4j.LoggerFactory; |
|
48 | 49 |
|
49 | 50 |
/** |
50 | 51 |
* Sirve datos solicitados por los drivers que salvan a raster. Hereda de |
51 | 52 |
* Rasterizer y reescribe el m?todo readData que es el que ser? llamado desde el |
52 | 53 |
* driver cada vez que vacie el buffer y necesite m?s datos. |
53 | 54 |
* |
54 |
* @version 04/06/2007 |
|
55 | 55 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
56 | 56 |
*/ |
57 | 57 |
public class RasterizerLayer implements DataServerWriter, IIncrementable { |
58 | 58 |
private static final GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
59 |
private Logger log = LoggerFactory.getLogger(RasterizerLayer.class); |
|
59 | 60 |
private ViewPort viewPort = null; |
60 | 61 |
private ViewPort viewPortBlock = null; |
61 | 62 |
private FLayers flayers = null; |
... | ... | |
100 | 101 |
env = geomManager.createEnvelope(ext.getMinX(), ext.getMinY(), ext.getMaxX(), ext.getMaxY(), SUBTYPES.GEOM2D); |
101 | 102 |
viewPortBlock.setEnvelope(env); |
102 | 103 |
} catch (CreateEnvelopeException e) { |
103 |
RasterToolsUtil.debug("Error creating the envelope", null, e);
|
|
104 |
log.debug("Error creating the envelope", null, e);
|
|
104 | 105 |
} |
105 | 106 |
viewPortBlock.setImageSize(dimension); |
106 | 107 |
viewPortBlock.refreshExtent(); |
... | ... | |
125 | 126 |
//viewPortBlock = new ViewPort(vp.getProjection()); |
126 | 127 |
//viewPortBlock.setEnvelope(env); |
127 | 128 |
} catch (CreateEnvelopeException e) { |
128 |
RasterToolsUtil.debug("Error creating the envelope", null, e);
|
|
129 |
log.debug("Error creating the envelope", null, e);
|
|
129 | 130 |
} |
130 | 131 |
|
131 | 132 |
|
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/saveas/SaveAsTocMenuEntry.java | ||
---|---|---|
53 | 53 |
import org.gvsig.raster.fmap.layers.ILayerState; |
54 | 54 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
55 | 55 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
56 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
56 | 57 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
57 | 58 |
import org.gvsig.raster.tools.app.basic.raster.process.ClippingProcess; |
58 | 59 |
import org.gvsig.raster.util.ExtendedFileFilter; |
... | ... | |
163 | 164 |
ProviderServices serv = rManager.getProviderServices(); |
164 | 165 |
extList = serv.getExtensionsSupported(fLayer.getDataStore().getDataType()[0], fLayer.getDataStore().getBandCount()); |
165 | 166 |
} catch (RasterDriverException e2) { |
166 |
RasterToolsUtil.messageBoxError("error_extensiones_soportadas", chooser, e2);
|
|
167 |
RasterSwingLibrary.messageBoxError("error_extensiones_soportadas", chooser, e2);
|
|
167 | 168 |
e2.printStackTrace(); |
168 | 169 |
return; |
169 | 170 |
} |
... | ... | |
204 | 205 |
|
205 | 206 |
long maxJp2 = 13000 * 12500 * 3; |
206 | 207 |
if (bytes > (20000 * 20000 * 3)) { |
207 |
if(!RasterToolsUtil.messageBoxYesOrNot("output_file_too_big", null))
|
|
208 |
if(!RasterSwingLibrary.messageBoxYesOrNot("output_file_too_big", null))
|
|
208 | 209 |
return; |
209 | 210 |
} |
210 | 211 |
|
211 | 212 |
if(new File(file).exists()) { |
212 |
if(!RasterToolsUtil.messageBoxYesOrNot("raster_error_file_exists", null))
|
|
213 |
if(!RasterSwingLibrary.messageBoxYesOrNot("raster_error_file_exists", null))
|
|
213 | 214 |
return; |
214 | 215 |
} |
215 | 216 |
|
216 | 217 |
if (file.endsWith(".jp2")) { |
217 | 218 |
if (bytes > maxJp2) { |
218 |
if(!RasterToolsUtil.messageBoxYesOrNot("output_file_too_big_jpeg2000", null))
|
|
219 |
if(!RasterSwingLibrary.messageBoxYesOrNot("output_file_too_big_jpeg2000", null))
|
|
219 | 220 |
return; |
220 | 221 |
} |
221 | 222 |
} |
... | ... | |
226 | 227 |
try { |
227 | 228 |
params = rManager.createWriter(file).getParams(); |
228 | 229 |
} catch (NotSupportedExtensionException e1) { |
229 |
RasterToolsUtil.messageBoxError("no_driver_escritura", this, e1);
|
|
230 |
RasterSwingLibrary.messageBoxError("no_driver_escritura", this, e1);
|
|
230 | 231 |
} catch (RasterDriverException e1) { |
231 |
RasterToolsUtil.messageBoxError("no_driver_escritura", this, e1);
|
|
232 |
RasterSwingLibrary.messageBoxError("no_driver_escritura", this, e1);
|
|
232 | 233 |
} |
233 | 234 |
|
234 | 235 |
// Lanzamiento del proceso de guardado |
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/setviewprojection/SetViewProjectionTocMenuEntry.java | ||
---|---|---|
32 | 32 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
33 | 33 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
34 | 34 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
35 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
35 | 36 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
36 | 37 |
|
37 | 38 |
|
... | ... | |
101 | 102 |
|
102 | 103 |
IProjection viewProjection = inputLayer.getMapContext().getProjection(); |
103 | 104 |
|
104 |
if(RasterToolsUtil.messageBoxYesOrNot(Messages.getText("overwrite_projection"), null)) {
|
|
105 |
if(RasterSwingLibrary.messageBoxYesOrNot(Messages.getText("overwrite_projection"), null)) {
|
|
105 | 106 |
inputLayer.setProjection(viewProjection); |
106 | 107 |
} |
107 | 108 |
} |
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/filter/FilterListener.java | ||
---|---|---|
211 | 211 |
if (obj.getName().equals(((RasterFilter) filtersInit.get(i)).getName())) |
212 | 212 |
break; |
213 | 213 |
} catch (InstantiationException e) { |
214 |
RasterToolsUtil.messageBoxError("error_creando_filtro", this, e);
|
|
214 |
RasterSwingLibrary.messageBoxError("error_creando_filtro", this, e);
|
|
215 | 215 |
} catch (IllegalAccessException e) { |
216 |
RasterToolsUtil.messageBoxError("error_creando_filtro", this, e);
|
|
216 |
RasterSwingLibrary.messageBoxError("error_creando_filtro", this, e);
|
|
217 | 217 |
} |
218 | 218 |
} |
219 | 219 |
|
... | ... | |
362 | 362 |
try { |
363 | 363 |
RasterToolsUtil.loadLayer(getFilterPanel().getViewName(), fileName, null); |
364 | 364 |
} catch (RasterNotLoadException e) { |
365 |
RasterToolsUtil.messageBoxError("error_cargar_capa", this, e);
|
|
365 |
RasterSwingLibrary.messageBoxError("error_cargar_capa", this, e);
|
|
366 | 366 |
} |
367 | 367 |
|
368 | 368 |
if(filterPanel != null) |
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/filter/mask/MaskUI.java | ||
---|---|---|
53 | 53 |
import org.gvsig.i18n.Messages; |
54 | 54 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
55 | 55 |
import org.gvsig.raster.roi.ROI; |
56 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
56 | 57 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
57 | 58 |
/** |
58 | 59 |
* Interfaz gr?fico para los filtros de mascara. |
... | ... | |
222 | 223 |
try { |
223 | 224 |
roisArray = ((FLyrRaster) layer).getRois(); |
224 | 225 |
} catch (ROIException e1) { |
225 |
RasterToolsUtil.messageBoxError(Messages.getText("problems_loading_rois"), null);
|
|
226 |
RasterSwingLibrary.messageBoxError(Messages.getText("problems_loading_rois"), null);
|
|
226 | 227 |
} |
227 | 228 |
|
228 | 229 |
if(roisArray == null || roisArray.size() == 0) |
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/colortable/ui/library/RasterColorTablesFactory.java | ||
---|---|---|
32 | 32 |
import org.gvsig.fmap.dal.coverage.store.props.ColorTable; |
33 | 33 |
import org.gvsig.gui.ColorTablePainter; |
34 | 34 |
import org.gvsig.gui.ColorTablesFactory; |
35 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
35 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
36 | 36 |
|
37 | 37 |
/** |
38 | 38 |
* Factory for color tables. This factory is useful to register color tables |
... | ... | |
73 | 73 |
} |
74 | 74 |
return result; |
75 | 75 |
} catch (FilePaletteException e) { |
76 |
RasterToolsUtil.messageBoxError(e.getMessage(), this, e);
|
|
76 |
RasterSwingLibrary.messageBoxError(e.getMessage(), this, e);
|
|
77 | 77 |
} |
78 | 78 |
return null; |
79 | 79 |
} |
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/colortable/ui/library/ColorTableLibraryPanel.java | ||
---|---|---|
51 | 51 |
import org.gvsig.gui.beans.listview.ListViewComponent; |
52 | 52 |
import org.gvsig.gui.beans.listview.ListViewItem; |
53 | 53 |
import org.gvsig.gui.beans.listview.ListViewListener; |
54 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
54 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
55 | 55 |
import org.gvsig.raster.tools.app.basic.tool.colortable.data.ColorTableData; |
56 | 56 |
import org.gvsig.raster.util.BasePanel; |
57 | 57 |
import org.gvsig.raster.util.ExtendedFileFilter; |
... | ... | |
149 | 149 |
getListViewComponent().setSelectedIndex(0); |
150 | 150 |
callColorTableChanged(); |
151 | 151 |
} catch (FilePaletteException e) { |
152 |
RasterToolsUtil.messageBoxError(e.getMessage(), this, e);
|
|
152 |
RasterSwingLibrary.messageBoxError(e.getMessage(), this, e);
|
|
153 | 153 |
} |
154 | 154 |
} |
155 | 155 |
|
... | ... | |
398 | 398 |
tableLib.save_to_1_1(palettesPath, colorTable); |
399 | 399 |
callColorTableChanged(); |
400 | 400 |
} else { |
401 |
RasterToolsUtil.messageBoxError("error_importando_tabla_color_rmf", this);
|
|
401 |
RasterSwingLibrary.messageBoxError("error_importando_tabla_color_rmf", this);
|
|
402 | 402 |
} |
403 | 403 |
break; |
404 | 404 |
} |
... | ... | |
406 | 406 |
} |
407 | 407 |
} catch (IOException e1) { |
408 | 408 |
e1.printStackTrace(); |
409 |
RasterToolsUtil.messageBoxError("error_importando_tabla_color_rmf", this);
|
|
409 |
RasterSwingLibrary.messageBoxError("error_importando_tabla_color_rmf", this);
|
|
410 | 410 |
} catch (RasterLegendIONotFound e1) { |
411 | 411 |
e1.printStackTrace(); |
412 | 412 |
} |
... | ... | |
415 | 415 |
|
416 | 416 |
if (e.getSource() == getButtonDel()) { |
417 | 417 |
if (getListViewComponent().getSelectedIndices().length > 0) { |
418 |
if (RasterToolsUtil.messageBoxYesOrNot("desea_borrar_librerias", this)) {
|
|
418 |
if (RasterSwingLibrary.messageBoxYesOrNot("desea_borrar_librerias", this)) {
|
|
419 | 419 |
File oldFile = new File(palettesPath + File.separator + getListViewComponent().getSelectedValue().getTag()); |
420 | 420 |
oldFile.delete(); |
421 | 421 |
int pos = getListViewComponent().getSelectedIndices()[0]; |
... | ... | |
456 | 456 |
*/ |
457 | 457 |
private void testLibraryChanged() { |
458 | 458 |
if (hasChanged) { |
459 |
if (RasterToolsUtil.messageBoxYesOrNot("desea_guardar_cambios", this)) {
|
|
459 |
if (RasterSwingLibrary.messageBoxYesOrNot("desea_guardar_cambios", this)) {
|
|
460 | 460 |
tableLib.save_to_1_1(palettesPath, getColorTableSelected()); |
461 | 461 |
getListViewComponent().repaint(); |
462 | 462 |
} |
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/colortable/ui/ColorTablePanel.java | ||
---|---|---|
46 | 46 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent; |
47 | 47 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
48 | 48 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
49 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
49 | 50 |
import org.gvsig.raster.swing.RasterSwingLocator; |
50 | 51 |
import org.gvsig.raster.swing.preview.PreviewBasePanelTab; |
51 | 52 |
import org.gvsig.raster.swing.preview.PreviewPanel; |
... | ... | |
244 | 245 |
else |
245 | 246 |
dataset.saveColorTableToRmf(null); |
246 | 247 |
} catch (RmfSerializerException e) { |
247 |
RasterToolsUtil.messageBoxError("error_salvando_rmf", this, e);
|
|
248 |
RasterSwingLibrary.messageBoxError("error_salvando_rmf", this, e);
|
|
248 | 249 |
} |
249 | 250 |
} |
250 | 251 |
|
... | ... | |
313 | 314 |
if (colorTableFilter != null) { |
314 | 315 |
ColorTable colorTable = (ColorTable)colorTableFilter.getParam("colorTable"); |
315 | 316 |
if (colorTable.isCompressible()) { |
316 |
if (RasterToolsUtil.messageBoxYesOrNot("comprimir_paleta", this)) {
|
|
317 |
if (RasterSwingLibrary.messageBoxYesOrNot("comprimir_paleta", this)) {
|
|
317 | 318 |
colorTable.compressPalette(); |
318 | 319 |
colorTable.setInterpolated(true); |
319 | 320 |
} |
... | ... | |
355 | 356 |
*/ |
356 | 357 |
private void accept() { |
357 | 358 |
if(!getGeneralPanel().getCheckBoxEnabled().isSelected()) { |
358 |
boolean ok = RasterToolsUtil.messageBoxYesOrNot("colortable_not_active", this);
|
|
359 |
boolean ok = RasterSwingLibrary.messageBoxYesOrNot("colortable_not_active", this);
|
|
359 | 360 |
if(ok) |
360 | 361 |
getColorTableListener().accept(); |
361 | 362 |
else |
... | ... | |
413 | 414 |
} |
414 | 415 |
|
415 | 416 |
if (e.getButton() == (ButtonsPanel.BUTTON_LAST + 2)) { |
416 |
if (RasterToolsUtil.messageBoxYesOrNot("guardar_como_predeterminado", this)) {
|
|
417 |
if (RasterSwingLibrary.messageBoxYesOrNot("guardar_como_predeterminado", this)) {
|
|
417 | 418 |
saveColorTable(); |
418 | 419 |
accept(); |
419 | 420 |
} |
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/colortable/ui/ColorTableListener.java | ||
---|---|---|
42 | 42 |
import org.gvsig.fmap.dal.coverage.util.PropertyListener; |
43 | 43 |
import org.gvsig.gui.beans.imagenavigator.ImageUnavailableException; |
44 | 44 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
45 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
45 | 46 |
import org.gvsig.raster.swing.preview.DataSourcePreview; |
46 | 47 |
import org.gvsig.raster.swing.preview.PreviewRenderProcess; |
47 | 48 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
... | ... | |
97 | 98 |
try { |
98 | 99 |
previewLayer = (FLyrRaster) fLayer.cloneLayer(); |
99 | 100 |
} catch (Exception e) { |
100 |
RasterToolsUtil.messageBoxError("preview_not_available", colorTablePanel, e);
|
|
101 |
RasterSwingLibrary.messageBoxError("preview_not_available", colorTablePanel, e);
|
|
101 | 102 |
} |
102 | 103 |
} |
103 | 104 |
} |
... | ... | |
161 | 162 |
getColorTablePanel().getLayer().getMapContext().invalidate(); |
162 | 163 |
tableLib.save_to_1_1(ColorTableLibraryPanel.palettesPath, getColorTableData().getColorTable()); |
163 | 164 |
} catch (FilterTypeException e) { |
164 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
165 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
165 | 166 |
} catch (FilterManagerException e) { |
166 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
167 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
167 | 168 |
} |
168 | 169 |
} |
169 | 170 |
|
... | ... | |
363 | 364 |
FLyrRaster lyr = (FLyrRaster)rendering.getSource(); |
364 | 365 |
applyColorTable(lyr, true); |
365 | 366 |
} catch (FilterTypeException e1) { |
366 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e1);
|
|
367 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e1);
|
|
367 | 368 |
} catch (FilterManagerException e) { |
368 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
369 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
369 | 370 |
} |
370 | 371 |
} |
371 | 372 |
|
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/clip/ui/listener/ClippingPanelListener.java | ||
---|---|---|
532 | 532 |
*/ |
533 | 533 |
private void accept() { |
534 | 534 |
if(data.getPxHeight() == 0 || data.getPxWidth() == 0) { |
535 |
RasterToolsUtil.messageBoxError(RasterToolsUtil.getText(this, "wrong_resolution"), null);
|
|
535 |
RasterSwingLibrary.messageBoxError(RasterToolsUtil.getText(this, "wrong_resolution"), null);
|
|
536 | 536 |
return; |
537 | 537 |
} |
538 | 538 |
|
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/clip/ui/panel/ClippingSelectionPanel.java | ||
---|---|---|
33 | 33 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
34 | 34 |
import org.gvsig.i18n.Messages; |
35 | 35 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
36 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
36 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
37 | 37 |
|
38 | 38 |
/** |
39 | 39 |
* Panel de seleccion de que bandas. Permite seleccionar que bandas se van a |
... | ... | |
121 | 121 |
try { |
122 | 122 |
getTableContainer().addRow(row); |
123 | 123 |
} catch (NotInitializeException e) { |
124 |
RasterToolsUtil.messageBoxError("error_rowtable", this, e);
|
|
124 |
RasterSwingLibrary.messageBoxError("error_rowtable", this, e);
|
|
125 | 125 |
} |
126 | 126 |
} |
127 | 127 |
} else { |
... | ... | |
129 | 129 |
try { |
130 | 130 |
getTableContainer().addRow(row); |
131 | 131 |
} catch (NotInitializeException e) { |
132 |
RasterToolsUtil.messageBoxError("error_rowtable", this, e);
|
|
132 |
RasterSwingLibrary.messageBoxError("error_rowtable", this, e);
|
|
133 | 133 |
} |
134 | 134 |
} |
135 | 135 |
|
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/raw/ui/listener/OpenRawFileDefaultViewListener.java | ||
---|---|---|
29 | 29 |
import javax.swing.JOptionPane; |
30 | 30 |
|
31 | 31 |
import org.gvsig.andami.PluginServices; |
32 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
32 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
33 | 33 |
import org.gvsig.raster.tools.app.basic.tool.raw.tool.VRTFileCreator; |
34 | 34 |
import org.gvsig.raster.tools.app.basic.tool.raw.ui.main.OpenRawFileControlsPanel; |
35 | 35 |
import org.gvsig.raster.tools.app.basic.tool.raw.ui.main.OpenRawFileDefaultView; |
... | ... | |
90 | 90 |
vrt.writeFile(); |
91 | 91 |
openRawView.setImageFile(vrt.getM_File()); |
92 | 92 |
} catch (IOException e) { |
93 |
RasterToolsUtil.messageBoxError("cant_create_vrt_file", this, e);
|
|
93 |
RasterSwingLibrary.messageBoxError("cant_create_vrt_file", this, e);
|
|
94 | 94 |
} |
95 | 95 |
} |
96 | 96 |
closeButtonActionPerformed(); |
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/roi/ROIDataModel.java | ||
---|---|---|
38 | 38 |
import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener; |
39 | 39 |
import org.gvsig.fmap.dal.coverage.exception.GridException; |
40 | 40 |
import org.gvsig.fmap.dal.coverage.exception.ROIException; |
41 |
import org.gvsig.fmap.dal.coverage.grid.Grid; |
|
42 | 41 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
43 | 42 |
import org.gvsig.fmap.dal.exception.DataException; |
44 | 43 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
... | ... | |
63 | 62 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
64 | 63 |
import org.gvsig.raster.roi.ROI; |
65 | 64 |
import org.gvsig.raster.roi.VectorialROI; |
65 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
66 | 66 |
import org.gvsig.raster.swing.roi.ROIPanel; |
67 | 67 |
import org.gvsig.raster.swing.roi.ROIPanelDataModel; |
68 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
69 | 68 |
import org.gvsig.raster.tools.app.basic.tool.roi.ui.listener.DrawMouseViewListener; |
70 | 69 |
|
71 | 70 |
/** |
... | ... | |
84 | 83 |
private Image curImage = null; |
85 | 84 |
private LinkedHashMap<String, ROI> rois = null; |
86 | 85 |
private ROIPanel panel = null; |
87 |
private Grid grid = null; |
|
88 | 86 |
private List<FLyrVect> fLyrsList = null; |
89 | 87 |
private File roiFile = null; |
90 | 88 |
|
... | ... | |
182 | 180 |
try { |
183 | 181 |
panel.getTable().removeAllRows(); |
184 | 182 |
} catch (NotInitializeException e) { |
185 |
RasterToolsUtil.messageBoxError("error_tabla_rois", this, e);
|
|
183 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", this, e);
|
|
186 | 184 |
} |
187 | 185 |
|
188 | 186 |
boolean repaint = roiFeatureManager.clear(graphicLayer); |
... | ... | |
209 | 207 |
try { |
210 | 208 |
roisArray = ((FLyrRaster) fLayer).getRois(); |
211 | 209 |
} catch (ROIException e) { |
212 |
RasterToolsUtil.messageBoxError("problems_loading_rois", this, e);
|
|
210 |
RasterSwingLibrary.messageBoxError("problems_loading_rois", this, e);
|
|
213 | 211 |
} |
214 | 212 |
loadROIs(roisArray); |
215 | 213 |
} |
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/roi/ui/listener/ROIPanelListener.java | ||
---|---|---|
35 | 35 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
36 | 36 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
37 | 37 |
import org.gvsig.raster.roi.ROI; |
38 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
38 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
39 | 39 |
import org.gvsig.raster.tools.app.basic.tool.roi.ROIDataModel; |
40 | 40 |
import org.gvsig.raster.tools.app.basic.tool.roi.ui.ROIWindow; |
41 | 41 |
|
... | ... | |
64 | 64 |
((FLyrRaster)dataModel.getFLayer()).setROIsFiles(fileList); |
65 | 65 |
} |
66 | 66 |
} catch (RmfSerializerException e1) { |
67 |
RasterToolsUtil.messageBoxError("error_saving_rois_rmf", this, e1);
|
|
67 |
RasterSwingLibrary.messageBoxError("error_saving_rois_rmf", this, e1);
|
|
68 | 68 |
} |
69 | 69 |
} |
70 | 70 |
|
... | ... | |
100 | 100 |
dataModel.selectDrawRoiTool(); |
101 | 101 |
} |
102 | 102 |
} catch (NotInitializeException e) { |
103 |
RasterToolsUtil.messageBoxError("error_tabla_rois", this, e);
|
|
103 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", this, e);
|
|
104 | 104 |
} |
105 | 105 |
} |
106 | 106 |
|
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/roi/ui/listener/DrawMouseViewListener.java | ||
---|---|---|
45 | 45 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.PolylineListener; |
46 | 46 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
47 | 47 |
import org.gvsig.raster.roi.VectorialROI; |
48 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
48 | 49 |
import org.gvsig.raster.swing.roi.ROIPanel; |
49 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
50 | 50 |
import org.gvsig.raster.tools.app.basic.tool.roi.ROIDataModel; |
51 | 51 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol; |
52 | 52 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol; |
... | ... | |
94 | 94 |
roiName = (String)roiDataModel.getTable().getModel().getValueAt(selectedRow,0); |
95 | 95 |
roi = (VectorialROI)roiDataModel.getROI(roiName); |
96 | 96 |
if(roi == null) { |
97 |
RasterToolsUtil.messageBoxError("error_roi_not_selected", roiDataModel, new NullPointerException("ROI no seleccionada DrawMouseViewListener L 61"));
|
|
97 |
RasterSwingLibrary.messageBoxError("error_roi_not_selected", roiDataModel, new NullPointerException("ROI no seleccionada DrawMouseViewListener L 61"));
|
|
98 | 98 |
return; |
99 | 99 |
} |
100 | 100 |
roi.addGeometry(geometry); |
... | ... | |
128 | 128 |
// tablePanel.getRoiGraphics(roiName).add(fGraphic); |
129 | 129 |
roiDataModel.getMapControl().drawGraphics(); |
130 | 130 |
} catch (NotInitializeException e) { |
131 |
RasterToolsUtil.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
131 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
132 | 132 |
} catch (DataException e) { |
133 |
RasterToolsUtil.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
133 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
134 | 134 |
} |
135 | 135 |
|
136 | 136 |
} |
... | ... | |
183 | 183 |
// tablePanel.getRoiGraphics(roiName).add(fGraphic); |
184 | 184 |
roiDataModel.getMapControl().drawGraphics(); |
185 | 185 |
} catch (NotInitializeException e) { |
186 |
RasterToolsUtil.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
186 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
187 | 187 |
} catch (DataException e) { |
188 |
RasterToolsUtil.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
188 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", roiDataModel, e);
|
|
189 | 189 |
} |
190 | 190 |
} |
191 | 191 |
|
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/roi/ui/listener/ROIsTablePanelListener.java | ||
---|---|---|
58 | 58 |
import org.gvsig.raster.roi.ROIWriter; |
59 | 59 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
60 | 60 |
import org.gvsig.raster.swing.roi.ROIPanel; |
61 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
62 | 61 |
import org.gvsig.raster.tools.app.basic.tool.roi.ROIDataModel; |
63 | 62 |
import org.gvsig.raster.tools.app.basic.tool.roi.ROIDataModel.LayerElement; |
64 | 63 |
import org.gvsig.raster.tools.app.basic.tool.roi.ROIFeatureManager; |
... | ... | |
116 | 115 |
dataModel.selectDrawRoiTool(); |
117 | 116 |
panel.setToolsEnabled(true); |
118 | 117 |
} catch (NotInitializeException e1) { |
119 |
RasterToolsUtil.messageBoxError("error_tabla_rois", panel, e1);
|
|
118 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", panel, e1);
|
|
120 | 119 |
window.close(); |
121 | 120 |
} |
122 | 121 |
} else if (e.getSource() == panel.getButton(ROIPanel.DELETE_BUTTON)) { |
... | ... | |
130 | 129 |
panel.getTable().setSelectedIndex(selectedRow); |
131 | 130 |
} |
132 | 131 |
} catch (NotInitializeException e1) { |
133 |
RasterToolsUtil.messageBoxError("error_tabla_rois", panel, e1);
|
|
132 |
RasterSwingLibrary.messageBoxError("error_tabla_rois", panel, e1);
|
|
134 | 133 |
window.close(); |
135 | 134 |
} |
136 | 135 |
} else if (e.getSource() == panel.getButton(ROIPanel.POINT_BUTTON)) { |
... | ... | |
153 | 152 |
} else if (e.getSource() == panel.getButton(ROIPanel.IMPORT_BUTTON)) { |
154 | 153 |
showChooserDialog(ROIPanel.IMPORT_BUTTON); |
155 | 154 |
} else if (e.getSource() == panel.getButton(ROIPanel.REMOVE_ROI_FILE_BUTTON)) { |
156 |
if(RasterToolsUtil.messageBoxYesOrNot("remove_roi_file_link", null)) {
|
|
155 |
if(RasterSwingLibrary.messageBoxYesOrNot("remove_roi_file_link", null)) {
|
|
157 | 156 |
dataModel.clearROIs(); |
158 | 157 |
removeLinkBetweenFileROIAndLayer(); |
159 | 158 |
} |
... | ... | |
220 | 219 |
private void saveROIToFile(File file) { |
221 | 220 |
lastDirectory = new File(file.getParent()); |
222 | 221 |
if(file.exists()) { |
223 |
if(!RasterToolsUtil.messageBoxYesOrNot("raster_error_file_exists", null))
|
|
222 |
if(!RasterSwingLibrary.messageBoxYesOrNot("raster_error_file_exists", null))
|
|
224 | 223 |
return; |
225 | 224 |
} |
226 | 225 |
ROIWriter writer = RasterLocator.getManager().createROIWriter( |
... | ... | |
278 | 277 |
roiSelectedName = (String)panel.getTable().getTable().getJTable().getValueAt(selectedRow,0); |
279 | 278 |
} |
280 | 279 |
} catch (NotInitializeException e1) { |
281 |
RasterToolsUtil.messageBoxError("error_rois_table", panel, e1);
|
|
280 |
RasterSwingLibrary.messageBoxError("error_rois_table", panel, e1);
|
|
282 | 281 |
} |
283 | 282 |
} |
284 | 283 |
|
... | ... | |
302 | 301 |
roiSelectedName = newName; |
303 | 302 |
} |
304 | 303 |
} catch (DataException e1) { |
305 |
RasterToolsUtil.messageBoxError(
|
|
304 |
RasterSwingLibrary.messageBoxError(
|
|
306 | 305 |
"error_getting_roi_features", panel, e1); |
307 | 306 |
} |
308 | 307 |
} |
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 | ||
---|---|---|
24 | 24 |
import java.awt.Dimension; |
25 | 25 |
import java.awt.GridLayout; |
26 | 26 |
|
27 |
import org.gvsig.andami.PluginServices; |
|
28 | 27 |
import org.gvsig.fmap.dal.coverage.grid.RasterFilterList; |
29 | 28 |
import org.gvsig.gui.beans.panelGroup.panels.AbstractPanel; |
30 | 29 |
import org.gvsig.gui.util.StatusComponent; |
30 |
import org.gvsig.i18n.Messages; |
|
31 | 31 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
32 | 32 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
33 | 33 |
import org.gvsig.raster.tools.app.basic.tool.properties.control.EnhancedControl; |
... | ... | |
48 | 48 |
* Contructor |
49 | 49 |
*/ |
50 | 50 |
public EnhancedPanel() { |
51 |
setLabel(PluginServices.getText(this, "realce"));
|
|
51 |
setLabel(Messages.getText("realce"));
|
|
52 | 52 |
initialize(); |
53 | 53 |
} |
54 | 54 |
|
... | ... | |
111 | 111 |
enhancedControl = new EnhancedControl(getPanelGroup(), this, fLayer, rfl); |
112 | 112 |
} |
113 | 113 |
|
114 |
|
|
115 | 114 |
private void actionEnabled() { |
116 | 115 |
IRasterLayerActions actions = null; |
117 | 116 |
if(fLayer instanceof IRasterLayerActions) |
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/EnhancedWithTrimPanel.java | ||
---|---|---|
30 | 30 |
import javax.swing.JCheckBox; |
31 | 31 |
import javax.swing.JPanel; |
32 | 32 |
|
33 |
import org.gvsig.andami.PluginServices; |
|
34 | 33 |
import org.gvsig.gui.beans.slidertext.SliderTextContainer; |
34 |
import org.gvsig.i18n.Messages; |
|
35 | 35 |
|
36 | 36 |
/** |
37 | 37 |
* Panel para los controles de brillo y contraste. |
... | ... | |
40 | 40 |
*/ |
41 | 41 |
public class EnhancedWithTrimPanel extends JPanel implements ActionListener { |
42 | 42 |
private static final long serialVersionUID = 9023137365069951866L; |
43 |
|
|
44 | 43 |
private JCheckBox active = null; |
45 | 44 |
private SliderTextContainer trimSlider = null; |
46 | 45 |
private JCheckBox removeCheck = null; |
... | ... | |
55 | 54 |
} |
56 | 55 |
|
57 | 56 |
private void init() { |
58 |
setBorder(javax.swing.BorderFactory.createTitledBorder(null, PluginServices.getText(this, "realce"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
|
|
57 |
setBorder(javax.swing.BorderFactory.createTitledBorder(null, Messages.getText("realce"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
|
|
59 | 58 |
setLayout(new GridBagLayout()); |
60 | 59 |
GridBagConstraints gbc = new GridBagConstraints(); |
61 | 60 |
gbc.anchor = GridBagConstraints.NORTH; |
... | ... | |
79 | 78 |
*/ |
80 | 79 |
public JCheckBox getActive() { |
81 | 80 |
if (active == null) { |
82 |
active = new JCheckBox(PluginServices.getText(this, "activar"));
|
|
81 |
active = new JCheckBox(Messages.getText("activar"));
|
|
83 | 82 |
active.setSelected(false); |
84 | 83 |
this.setControlEnabled(false); |
85 | 84 |
} |
... | ... | |
92 | 91 |
*/ |
93 | 92 |
public JCheckBox getRemoveCheck() { |
94 | 93 |
if (removeCheck == null) { |
95 |
removeCheck = new JCheckBox(PluginServices.getText(this, "eliminar_extremos"));
|
|
94 |
removeCheck = new JCheckBox(Messages.getText("eliminar_extremos"));
|
|
96 | 95 |
} |
97 | 96 |
return removeCheck; |
98 | 97 |
} |
... | ... | |
103 | 102 |
*/ |
104 | 103 |
public JCheckBox getTrimCheck() { |
105 | 104 |
if (trimCheck == null) { |
106 |
trimCheck = new JCheckBox(PluginServices.getText(this, "recorte_de_colas"));
|
|
105 |
trimCheck = new JCheckBox(Messages.getText("recorte_de_colas"));
|
|
107 | 106 |
} |
108 | 107 |
return trimCheck; |
109 | 108 |
} |
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 | ||
---|---|---|
28 | 28 |
|
29 | 29 |
import javax.swing.JCheckBox; |
30 | 30 |
|
31 |
import org.gvsig.andami.PluginServices; |
|
32 | 31 |
import org.gvsig.fmap.dal.coverage.datastruct.Params; |
33 | 32 |
import org.gvsig.fmap.dal.coverage.exception.FilterAddException; |
34 | 33 |
import org.gvsig.fmap.dal.coverage.exception.FilterManagerException; |
... | ... | |
41 | 40 |
import org.gvsig.gui.beans.panelGroup.AbstractPanelGroup; |
42 | 41 |
import org.gvsig.gui.beans.slidertext.listeners.SliderEvent; |
43 | 42 |
import org.gvsig.gui.beans.slidertext.listeners.SliderListener; |
43 |
import org.gvsig.i18n.Messages; |
|
44 | 44 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
45 | 45 |
import org.gvsig.raster.mainplugin.properties.RasterPropertiesTocMenuEntry; |
46 | 46 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
... | ... | |
159 | 159 |
try { |
160 | 160 |
saveStatus(); |
161 | 161 |
} catch (FilterManagerException e) { |
162 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
|
|
162 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_saving_filters"), this, e);
|
|
163 | 163 |
} catch (FilterTypeException e) { |
164 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
|
|
164 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_saving_filters"), this, e);
|
|
165 | 165 |
} |
166 | 166 |
|
167 | 167 |
setValuesFromFilterToPanel(); |
... | ... | |
301 | 301 |
* Acciones realizadas al final la aplicaci?n de filtros |
302 | 302 |
* @throws FilterTypeException |
303 | 303 |
*/ |
304 |
@SuppressWarnings("unchecked") |
|
305 | 304 |
private void endActionsForFilterSettings() throws FilterTypeException { |
306 | 305 |
ArrayList listOrder = (ArrayList) panelGroup.getProperties().get("filterOrder"); |
307 | 306 |
List<RasterFilter> listCopy = filterList.getStatusCloned(); |
... | ... | |
332 | 331 |
try { |
333 | 332 |
setValuesFromPanelToFilter(); |
334 | 333 |
} catch (FilterTypeException e) { |
335 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
334 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
336 | 335 |
} catch (FilterAddException e) { |
337 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
336 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
338 | 337 |
} |
339 | 338 |
} |
340 | 339 |
|
... | ... | |
346 | 345 |
try { |
347 | 346 |
saveStatus(); |
348 | 347 |
} catch (FilterManagerException e) { |
349 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
|
|
348 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_saving_filters"), this, e);
|
|
350 | 349 |
} catch (FilterTypeException e) { |
351 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_saving_filters"), this, e);
|
|
350 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_saving_filters"), this, e);
|
|
352 | 351 |
} |
353 | 352 |
} |
354 | 353 |
|
... | ... | |
360 | 359 |
try { |
361 | 360 |
setValuesFromPanelToFilter(); |
362 | 361 |
} catch (FilterTypeException e) { |
363 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
362 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
364 | 363 |
} catch (FilterAddException e) { |
365 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, e);
|
|
364 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
366 | 365 |
} |
367 | 366 |
} |
368 | 367 |
|
... | ... | |
473 | 472 |
enhancementManager.addFilter(params); |
474 | 473 |
endActionsForFilterSettings(); |
475 | 474 |
} catch (FilterManagerException e) { |
476 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
|
|
475 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_stats"), this, e);
|
|
477 | 476 |
} catch (FilterTypeException e) { |
478 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_stats"), this, e);
|
|
477 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_stats"), this, e);
|
|
479 | 478 |
} |
480 | 479 |
} |
481 | 480 |
|
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/TranspByPixelListener.java | ||
---|---|---|
45 | 45 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior; |
46 | 46 |
import org.gvsig.gui.beans.doubleslider.DoubleSliderEvent; |
47 | 47 |
import org.gvsig.gui.beans.doubleslider.DoubleSliderListener; |
48 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
48 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
49 | 49 |
import org.gvsig.raster.tools.app.basic.tool.properties.panel.TranspByPixelPanel; |
50 | 50 |
import org.gvsig.raster.tools.app.basic.tool.properties.panel.TranspByPixelRGBInputPanel; |
51 | 51 |
import org.gvsig.raster.tools.app.basic.tool.selectrgb.ISelectRGB; |
... | ... | |
165 | 165 |
if (theView == null) |
166 | 166 |
return; |
167 | 167 |
} catch (ClassCastException ex) { |
168 |
RasterToolsUtil.messageBoxError("error_view_not_found", this, ex);
|
|
168 |
RasterSwingLibrary.messageBoxError("error_view_not_found", this, ex);
|
|
169 | 169 |
return; |
170 | 170 |
} |
171 | 171 |
MapControl m_MapControl = theView.getMapControl(); |
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/histogram/HistogramTocMenuEntry.java | ||
---|---|---|
24 | 24 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
25 | 25 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
26 | 26 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
27 |
import org.gvsig.i18n.Messages; |
|
27 | 28 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
28 | 29 |
import org.gvsig.raster.fmap.layers.ILayerState; |
29 | 30 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
30 | 31 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
32 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
31 | 33 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
32 | 34 |
import org.gvsig.raster.tools.app.basic.tool.histogram.ui.HistogramDialog; |
33 | 35 |
|
... | ... | |
111 | 113 |
histogramDialog.setVisible(true); |
112 | 114 |
PluginServices.getMDIManager().addCentredWindow(histogramDialog); |
113 | 115 |
} catch (Exception e) { |
114 |
RasterToolsUtil.messageBoxError(RasterToolsUtil.getText(this, "histogram_error"), this, e);
|
|
116 |
RasterSwingLibrary.messageBoxError(Messages.getText("histogram_error"), this, e);
|
|
115 | 117 |
return; |
116 | 118 |
} |
117 | 119 |
} |
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/histogram/ui/HistogramPanel.java | ||
---|---|---|
22 | 22 |
import java.awt.Dimension; |
23 | 23 |
import java.awt.GridBagConstraints; |
24 | 24 |
import java.util.ArrayList; |
25 |
import java.util.List; |
|
25 | 26 |
|
26 | 27 |
import javax.swing.JButton; |
27 | 28 |
import javax.swing.JCheckBox; |
... | ... | |
52 | 53 |
* <code>HistogramPanel</code>. Interfaz de usuario para la representaci?n de |
53 | 54 |
* histogramas. |
54 | 55 |
* |
55 |
* @version 20/03/2007 |
|
56 | 56 |
* @author Diego Guerrero (diego.guerrero@uclm.es) |
57 |
* @author BorSanZa - Borja Sanchez Zamorano (borja.sanchez@iver.es)
|
|
57 |
* @author BorSanZa - Borja Sanchez Zamorano |
|
58 | 58 |
*/ |
59 | 59 |
@SuppressWarnings("unchecked") |
60 | 60 |
public class HistogramPanel extends DefaultButtonsPanel implements ButtonsPanelListener { |
... | ... | |
145 | 145 |
*/ |
146 | 146 |
private void setHistogramableSource(HistogramComputer source, String name) { |
147 | 147 |
getHistogramPanelListener().eventsEnabled = false; |
148 |
ArrayList aux = new ArrayList();
|
|
148 |
List<Object> aux = new ArrayList<Object>();
|
|
149 | 149 |
aux.add(source); |
150 | 150 |
aux.add(name); |
151 | 151 |
getComboSource().add(aux); |
... | ... | |
397 | 397 |
if (jTableBands == null) { |
398 | 398 |
jTableBands = new JTable(); |
399 | 399 |
jTableBands.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { " ", PluginServices.getText(this, "bandas") }) { |
400 |
private static final long serialVersionUID = 0L; |
|
401 |
Class[] types = new Class[] { java.lang.Boolean.class, java.lang.String.class }; |
|
402 |
boolean[] canEdit = new boolean[] { true, false }; |
|
400 |
private static final long serialVersionUID = 0L;
|
|
401 |
Class<?>[] types = new Class[] { java.lang.Boolean.class, java.lang.String.class };
|
|
402 |
boolean[] canEdit = new boolean[] { true, false };
|
|
403 | 403 |
|
404 |
public Class getColumnClass(int columnIndex) { |
|
404 |
public Class<?> getColumnClass(int columnIndex) {
|
|
405 | 405 |
return types[columnIndex]; |
406 | 406 |
} |
407 | 407 |
|
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/histogram/HistogramPanelListener.java | ||
---|---|---|
58 | 58 |
import org.gvsig.gui.beans.graphic.GraphicEvent; |
59 | 59 |
import org.gvsig.gui.beans.graphic.GraphicListener; |
60 | 60 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
61 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
61 | 62 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
62 | 63 |
import org.gvsig.raster.tools.app.basic.raster.process.HistogramProcess; |
63 | 64 |
import org.gvsig.raster.tools.app.basic.raster.process.IProcessActions; |
... | ... | |
201 | 202 |
try { |
202 | 203 |
((ArrayList) comboSource.get(i)).add(0, ((FLyrRaster) lyr).getRender().getLastRenderBuffer().getHistogramComputer()); |
203 | 204 |
} catch (QueryException e1) { |
204 |
RasterToolsUtil.messageBoxError("histogram_error", getHistogramPanel(), e1);
|
|
205 |
RasterSwingLibrary.messageBoxError("histogram_error", getHistogramPanel(), e1);
|
|
205 | 206 |
} catch (ProcessInterruptedException e1) { |
206 | 207 |
} |
207 | 208 |
|
... | ... | |
365 | 366 |
else |
366 | 367 |
setNewHistogram(null); |
367 | 368 |
} catch (HistogramException e) { |
368 |
RasterToolsUtil.messageBoxError("histogram_error", getHistogramPanel(), e);
|
|
369 |
RasterSwingLibrary.messageBoxError("histogram_error", getHistogramPanel(), e);
|
|
369 | 370 |
return; |
370 | 371 |
} catch (ProcessInterruptedException e) { |
371 | 372 |
|
... | ... | |
466 | 467 |
newHistogram[numBand][j - first][0] = datos[iBand][j][0]; |
467 | 468 |
newHistogram[numBand][j - first][1] = datos[iBand][j][1]; |
468 | 469 |
} catch (ArrayIndexOutOfBoundsException e) { |
469 |
RasterToolsUtil.messageBoxError("Error al crear el array del histograma. DataType: " + getHistogramPanel().getDataType() + " Posici?n: " + j, this, e);
|
|
470 |
RasterSwingLibrary.messageBoxError("Error al crear el array del histograma. DataType: " + getHistogramPanel().getDataType() + " Posici?n: " + j, this, e);
|
|
470 | 471 |
} |
471 | 472 |
} |
472 | 473 |
bandNames[numBand] = (String) ((DefaultTableModel) getHistogramPanel().getJTableBands().getModel()).getValueAt(iBand, 1); |
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/geolocation/listener/GeoLocationPanelListener.java | ||
---|---|---|
41 | 41 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
42 | 42 |
import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException; |
43 | 43 |
import org.gvsig.fmap.dal.coverage.util.Historical; |
44 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
44 | 45 |
import org.gvsig.fmap.geom.GeometryLocator; |
45 | 46 |
import org.gvsig.fmap.geom.GeometryManager; |
46 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
47 | 47 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
48 | 48 |
import org.gvsig.fmap.geom.primitive.Envelope; |
49 | 49 |
import org.gvsig.fmap.mapcontext.ViewPort; |
50 | 50 |
import org.gvsig.fmap.mapcontrol.MapControl; |
51 | 51 |
import org.gvsig.gui.beans.datainput.DataInputContainerListener; |
52 | 52 |
import org.gvsig.gui.beans.swing.JFileChooser; |
53 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
53 |
import org.gvsig.i18n.Messages; |
|
54 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
54 | 55 |
import org.gvsig.raster.tools.app.basic.tool.geolocation.ui.GeoLocationDialog; |
55 | 56 |
import org.gvsig.raster.tools.app.basic.tool.geolocation.ui.GeoLocationOpeningRasterPanel; |
56 | 57 |
import org.gvsig.raster.tools.app.basic.tool.geolocation.ui.GeoLocationPanel; |
... | ... | |
88 | 89 |
*/ |
89 | 90 |
public void actionPerformed(ActionEvent e) { |
90 | 91 |
if(e.getSource() == panel.getSaveButton()) { |
91 |
if(RasterToolsUtil.messageBoxYesOrNot(PluginServices.getText(this,"aviso_write_transform"), panel)) {
|
|
92 |
if(RasterSwingLibrary.messageBoxYesOrNot(Messages.getText("aviso_write_transform"), panel)) {
|
|
92 | 93 |
try { |
93 | 94 |
panel.getLayer().saveGeoToRmf(); |
94 | 95 |
panel.activeButtons(); |
95 | 96 |
} catch (RmfSerializerException e1) { |
96 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this,"error_salvando_rmf"), panel, e1);
|
|
97 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_salvando_rmf"), panel, e1);
|
|
97 | 98 |
} |
98 | 99 |
panel.setModify(false); |
99 | 100 |
} |
... | ... | |
121 | 122 |
panel.activeButtons(); |
122 | 123 |
return; |
123 | 124 |
} catch(NumberFormatException ex) { |
124 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this,"error_transformacion"), panel);
|
|
125 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_transformacion"), panel);
|
|
125 | 126 |
return; |
126 | 127 |
} |
127 | 128 |
|
... | ... | |
303 | 304 |
Double value = new Double(str); |
304 | 305 |
result[count] = value.doubleValue(); |
305 | 306 |
} catch (NumberFormatException ex) { |
306 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_file_not_valid"), panel, ex); |
|
307 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_file_not_valid"), panel, ex); |
|
308 |
inGrf.close(); |
|
307 | 309 |
return null; |
308 | 310 |
} |
309 | 311 |
str = inGrf.readLine(); |
310 | 312 |
count ++; |
311 | 313 |
} |
314 |
inGrf.close(); |
|
312 | 315 |
} catch (FileNotFoundException e) { |
313 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_file_not_found"), panel, e);
|
|
316 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_file_not_found"), panel, e);
|
|
314 | 317 |
return null; |
315 | 318 |
} catch (IOException ex) { |
316 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_lectura"), panel, ex);
|
|
319 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_lectura"), panel, ex);
|
|
317 | 320 |
return null; |
318 | 321 |
} |
319 | 322 |
return new AffineTransform(result[0], result[1], result[2], result[3], result[4], result[5]); |
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/geolocation/ui/GeoLocationDialog.java | ||
---|---|---|
38 | 38 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
39 | 39 |
import org.gvsig.fmap.mapcontrol.MapControl; |
40 | 40 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
41 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
41 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
42 | 42 |
import org.gvsig.raster.tools.app.basic.tool.geolocation.behavior.ITransformIO; |
43 | 43 |
|
44 | 44 |
|
... | ... | |
222 | 222 |
public void windowClosed() { |
223 | 223 |
//Se consulta si se desean salvar los cambios |
224 | 224 |
if(geolocationPanel.getModify()) { |
225 |
if(RasterToolsUtil.messageBoxYesOrNot(PluginServices.getText(this,"aviso_salir_salvando"), geolocationPanel)) {
|
|
225 |
if(RasterSwingLibrary.messageBoxYesOrNot(PluginServices.getText(this,"aviso_salir_salvando"), geolocationPanel)) {
|
|
226 | 226 |
try { |
227 | 227 |
geolocationPanel.getLayer().saveGeoToRmf(); |
228 | 228 |
} catch (RmfSerializerException e1) { |
229 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this,"error_salvando_rmf"), geolocationPanel, e1);
|
|
229 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this,"error_salvando_rmf"), geolocationPanel, e1);
|
|
230 | 230 |
} |
231 | 231 |
} |
232 | 232 |
geolocationPanel.setModify(false); |
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/geolocation/ui/GeoLocationOpeningRasterDialog.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import javax.swing.JPanel; |
28 | 28 |
|
29 |
import org.gvsig.andami.PluginServices; |
|
30 | 29 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
31 | 30 |
import org.gvsig.andami.ui.mdiManager.IWindowListener; |
32 | 31 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
33 | 32 |
import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException; |
34 | 33 |
import org.gvsig.fmap.mapcontrol.MapControl; |
34 |
import org.gvsig.i18n.Messages; |
|
35 | 35 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
36 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
36 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
37 | 37 |
import org.gvsig.raster.tools.app.basic.tool.geolocation.behavior.ITransformIO; |
38 | 38 |
|
39 | 39 |
|
... | ... | |
153 | 153 |
public void windowClosed() { |
154 | 154 |
//Se consulta si se desean salvar los cambios |
155 | 155 |
if(geolocationPanel.getModify()) { |
156 |
if(RasterToolsUtil.messageBoxYesOrNot(PluginServices.getText(this,"aviso_salir_salvando"), geolocationPanel)) {
|
|
156 |
if(RasterSwingLibrary.messageBoxYesOrNot(Messages.getText("aviso_salir_salvando"), geolocationPanel)) {
|
|
157 | 157 |
try { |
158 | 158 |
geolocationPanel.getLayer().saveGeoToRmf(); |
159 | 159 |
} catch (RmfSerializerException e1) { |
160 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this,"error_salvando_rmf"), geolocationPanel, e1);
|
|
160 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_salvando_rmf"), geolocationPanel, e1);
|
|
161 | 161 |
} |
162 | 162 |
} |
163 | 163 |
geolocationPanel.setModify(false); |
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/geolocation/behavior/TranslateBehavior.java | ||
---|---|---|
24 | 24 |
import java.awt.AlphaComposite; |
25 | 25 |
import java.awt.HeadlessException; |
26 | 26 |
import java.awt.Image; |
27 |
import java.awt.Point; |
|
28 |
import java.awt.Toolkit; |
|
29 | 27 |
import java.awt.event.MouseEvent; |
30 | 28 |
import java.awt.geom.AffineTransform; |
31 | 29 |
import java.awt.geom.NoninvertibleTransformException; |
... | ... | |
38 | 36 |
import org.gvsig.fmap.mapcontrol.tools.BehaviorException; |
39 | 37 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener; |
40 | 38 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
41 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
39 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
42 | 40 |
|
43 | 41 |
/** |
44 | 42 |
* Comportamiento que se aplica a la herramienta de translate. El cursor del rat?n cambiar? cuando |
... | ... | |
115 | 113 |
e1.printStackTrace(); |
116 | 114 |
} |
117 | 115 |
} catch(ClassCastException exc){ |
118 |
RasterToolsUtil.messageBoxError("error_capa_puntos", this, exc);
|
|
116 |
RasterSwingLibrary.messageBoxError("error_capa_puntos", this, exc);
|
|
119 | 117 |
} |
120 | 118 |
setActiveTool(false); |
121 | 119 |
return false; |
... | ... | |
219 | 217 |
mapControlDrawer.drawRect((int)pt.getX() + (int)d.getX(), (int)pt.getY() + (int)d.getY(), (int)size.getX(), (int)size.getY()); |
220 | 218 |
mapControlDrawer.transform(at.createInverse()); |
221 | 219 |
} catch (NoninvertibleTransformException e1) { |
222 |
RasterToolsUtil.messageBoxError("error_transformacion1", this, e1);
|
|
220 |
RasterSwingLibrary.messageBoxError("error_transformacion1", this, e1);
|
|
223 | 221 |
} |
224 | 222 |
} |
225 | 223 |
} |
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/geolocation/behavior/RotationBehavior.java | ||
---|---|---|
36 | 36 |
import org.gvsig.fmap.mapcontrol.tools.BehaviorException; |
37 | 37 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener; |
38 | 38 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener; |
39 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
39 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
40 | 40 |
|
41 | 41 |
|
42 | 42 |
/** |
... | ... | |
193 | 193 |
mapcontrolDrawer.drawRect((int)ul.getX(), (int)ul.getY(), (int)lr.getX(), (int)lr.getY()); |
194 | 194 |
mapcontrolDrawer.transform(at.createInverse()); |
195 | 195 |
} catch (NoninvertibleTransformException e1) { |
196 |
RasterToolsUtil.messageBoxError("error_transformacion1", this, e1);
|
|
196 |
RasterSwingLibrary.messageBoxError("error_transformacion1", this, e1);
|
|
197 | 197 |
} |
198 | 198 |
} |
199 | 199 |
} |
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/geolocation/behavior/ShearBehavior.java | ||
---|---|---|
35 | 35 |
import org.gvsig.fmap.mapcontrol.tools.BehaviorException; |
36 | 36 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener; |
37 | 37 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener; |
38 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
38 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
39 | 39 |
|
40 | 40 |
|
41 | 41 |
/** |
... | ... | |
136 | 136 |
lrVp = vp.fromMapPoint(lr); |
137 | 137 |
esc = Math.abs(lrPx.getX() - ulPx.getX()) / Math.abs(lrVp.getX() - ulVp.getX()); |
138 | 138 |
} catch (NoninvertibleTransformException e1) { |
139 |
RasterToolsUtil.messageBoxError("error_transformacion1", this, e1);
|
|
139 |
RasterSwingLibrary.messageBoxError("error_transformacion1", this, e1);
|
|
140 | 140 |
return; |
141 | 141 |
} |
142 | 142 |
|
... | ... | |
193 | 193 |
mapControlDrawer.drawRect((int)ul.getX(), (int)ul.getY(), (int)lr.getX(), (int)lr.getY()); |
194 | 194 |
mapControlDrawer.transform(at.createInverse()); |
195 | 195 |
} catch (NoninvertibleTransformException e1) { |
196 |
RasterToolsUtil.messageBoxError("error_transformacion1", this, e1);
|
|
196 |
RasterSwingLibrary.messageBoxError("error_transformacion1", this, e1);
|
|
197 | 197 |
} |
198 | 198 |
} |
199 | 199 |
} |
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/geolocation/behavior/ScaleBehavior.java | ||
---|---|---|
35 | 35 |
import org.gvsig.fmap.mapcontrol.tools.BehaviorException; |
36 | 36 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.RectangleListener; |
37 | 37 |
import org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener; |
38 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
38 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
39 | 39 |
|
40 | 40 |
|
41 | 41 |
/** |
... | ... | |
183 | 183 |
mapControlDrawer.drawRect((int)ul.getX(), (int)ul.getY(), (int)lr.getX(), (int)lr.getY()); |
184 | 184 |
mapControlDrawer.transform(at.createInverse()); |
185 | 185 |
} catch (NoninvertibleTransformException e1) { |
186 |
RasterToolsUtil.messageBoxError("error_transformacion1", this, e1);
|
|
186 |
RasterSwingLibrary.messageBoxError("error_transformacion1", this, e1);
|
|
187 | 187 |
} |
188 | 188 |
} |
189 | 189 |
} |
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/enhanced/ui/GraphicsPanel.java | ||
---|---|---|
49 | 49 |
import org.gvsig.raster.tools.app.basic.tool.enhanced.graphics.InputHistogram; |
50 | 50 |
import org.gvsig.raster.tools.app.basic.tool.enhanced.graphics.OutputHistogram; |
51 | 51 |
import org.gvsig.tools.locator.LocatorException; |
52 |
import org.slf4j.Logger; |
|
53 |
import org.slf4j.LoggerFactory; |
|
52 | 54 |
/** |
53 | 55 |
* Panel que contiene las gr?ficas para la modificaci?n del realce. |
54 | 56 |
* |
... | ... | |
57 | 59 |
*/ |
58 | 60 |
public class GraphicsPanel extends JPanel implements PreviewBasePanelTab, KeyListener { |
59 | 61 |
private static final long serialVersionUID = 1L; |
62 |
private Logger log = LoggerFactory.getLogger(GraphicsPanel.class); |
|
60 | 63 |
private InputHistogram input = null; |
61 | 64 |
private OutputHistogram output = null; |
62 | 65 |
private JPanel controls = null; |
... | ... | |
175 | 178 |
input = new InputHistogram(hist.getBufferHistogram(), lyr, minList, maxList); |
176 | 179 |
input.setHistogram(hist.getBufferHistogram(), minList, maxList); |
177 | 180 |
} catch (ProcessInterruptedException e) { |
178 |
RasterToolsUtil.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
181 |
log.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
179 | 182 |
} catch (HistogramException e) { |
180 |
RasterToolsUtil.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
183 |
log.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
181 | 184 |
} |
182 | 185 |
} |
183 | 186 |
return input; |
... | ... | |
199 | 202 |
try { |
200 | 203 |
input.setHistogram(hist.getBufferHistogram(), minList, maxList); |
201 | 204 |
} catch (ProcessInterruptedException e) { |
202 |
RasterToolsUtil.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
205 |
log.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
203 | 206 |
} catch (HistogramException e) { |
204 |
RasterToolsUtil.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
207 |
log.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
205 | 208 |
} |
206 | 209 |
} |
207 | 210 |
} |
... | ... | |
215 | 218 |
try { |
216 | 219 |
output = new OutputHistogram(hist.getBufferHistogram(), lyr, minList, maxList); |
217 | 220 |
} catch (ProcessInterruptedException e) { |
218 |
RasterToolsUtil.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
221 |
log.debug("Proceso de calculo de histograma interrumpido", this, e);
|
|
219 | 222 |
} catch (HistogramException e) { |
220 |
RasterToolsUtil.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
223 |
log.debug("Excepci?n en el c?lculo del histograma", this, e);
|
|
221 | 224 |
} |
222 | 225 |
} |
223 | 226 |
return output; |
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/enhanced/ui/PreviewFiltering.java | ||
---|---|---|
34 | 34 |
import org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager; |
35 | 35 |
import org.gvsig.gui.beans.imagenavigator.ImageUnavailableException; |
36 | 36 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
37 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
37 | 38 |
import org.gvsig.raster.swing.preview.DataSourcePreview; |
38 | 39 |
import org.gvsig.raster.swing.preview.PreviewRenderProcess; |
39 | 40 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
... | ... | |
158 | 159 |
} |
159 | 160 |
} |
160 | 161 |
if(exc.size() != 0) { |
161 |
RasterToolsUtil.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, exc);
|
|
162 |
RasterSwingLibrary.messageBoxError(PluginServices.getText(this, "error_adding_filters"), this, exc);
|
|
162 | 163 |
exc.clear(); |
163 | 164 |
} |
164 | 165 |
} |
... | ... | |
193 | 194 |
if (obj.getName().equals(((RasterFilter) filtersInit.get(i)).getName())) |
194 | 195 |
break; |
195 | 196 |
} catch (InstantiationException e) { |
196 |
RasterToolsUtil.messageBoxError("error_creando_filtro", this, e);
|
|
197 |
RasterSwingLibrary.messageBoxError("error_creando_filtro", this, e);
|
|
197 | 198 |
} catch (IllegalAccessException e) { |
198 |
RasterToolsUtil.messageBoxError("error_creando_filtro", this, e);
|
|
199 |
RasterSwingLibrary.messageBoxError("error_creando_filtro", this, e);
|
|
199 | 200 |
} |
200 | 201 |
} |
201 | 202 |
|
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/enhanced/ui/EnhancedListener.java | ||
---|---|---|
41 | 41 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
42 | 42 |
import org.gvsig.i18n.Messages; |
43 | 43 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
44 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
|
44 | 45 |
import org.gvsig.raster.swing.RasterSwingLocator; |
45 | 46 |
import org.gvsig.raster.swing.gcanvas.BaseFunction; |
46 | 47 |
import org.gvsig.raster.swing.gcanvas.DensitySlicingLine; |
... | ... | |
264 | 265 |
Long lValue = (Long)graphicsPanel.getLevels().getValue(); |
265 | 266 |
int value = lValue.intValue(); |
266 | 267 |
if(value > 30 || value < 2) { |
267 |
RasterToolsUtil.messageBoxInfo(Messages.getText("range_wrong") + " [2-30]", graphicsPanel);
|
|
268 |
RasterSwingLibrary.messageBoxInfo(Messages.getText("range_wrong") + " [2-30]", graphicsPanel);
|
|
268 | 269 |
if(value > 30) |
269 | 270 |
value = 30; |
270 | 271 |
if(value < 2) |
... | ... | |
474 | 475 |
enhancedDialog.getLayer().getRender().setFilterList(lyr.getRender().getFilterList()); |
475 | 476 |
enhancedDialog.getLayer().getMapContext().invalidate(); |
476 | 477 |
} catch (FilterTypeException e) { |
477 |
RasterToolsUtil.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
478 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
478 | 479 |
} catch (FilterManagerException e) { |
479 |
RasterToolsUtil.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
480 |
RasterSwingLibrary.messageBoxError(Messages.getText("error_adding_filters"), this, e);
|
|
480 | 481 |
} |
481 | 482 |
} else { |
482 | 483 |
FilterProcess filterProcess = new FilterProcess(); |
... | ... | |
514 | 515 |
try { |
515 | 516 |
RasterToolsUtil.loadLayer(enhancedDialog.getViewName(), fileName, null); |
516 | 517 |
} catch (RasterNotLoadException e) { |
517 |
RasterToolsUtil.messageBoxError("error_cargar_capa", this, e);
|
|
518 |
RasterSwingLibrary.messageBoxError("error_cargar_capa", this, e);
|
|
518 | 519 |
} |
519 | 520 |
|
520 | 521 |
if(enhancedDialog != null) |
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/overview/OverviewsTocMenuEntry.java | ||
---|---|---|
40 | 40 |
import org.gvsig.raster.fmap.layers.ILayerState; |
41 | 41 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
42 | 42 |
import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem; |
43 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
|
|
43 |
import org.gvsig.raster.swing.RasterSwingLibrary;
|
|
44 | 44 |
import org.gvsig.raster.tools.app.basic.raster.process.IProcessActions; |
45 | 45 |
import org.gvsig.raster.tools.app.basic.raster.process.OverviewsProcess; |
Also available in: Unified diff