Revision 46306 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/legend/gui/GeneralLayerPropertiesPage.java

View differences:

GeneralLayerPropertiesPage.java
191 191
            I18nManager i18nManager = ToolsLocator.getI18nManager();
192 192
            info = layer.getInfoString();
193 193
            if (info == null) {
194
                Envelope fullExtentViewPort = layer.getFullEnvelope();
195
                IProjection mapProjection = layer.getMapContext().getProjection();
196
                buff.append(i18nManager.getTranslation("Extent"));
197
                buff.append(" ");
198
                buff.append(mapProjection.getAbrev());
199
                buff.append(" (")
200
                        .append(i18nManager.getTranslation("view_projection"))
201
                        .append("):\n\t");
202
                buff.append(i18nManager.getTranslation("Superior"))
203
                        .append(":\t")
204
                        .append(fullExtentViewPort.getMaximum(1))
205
                        .append("\n\t");
206
                buff.append(i18nManager.getTranslation("Inferior"))
207
                        .append(":\t")
208
                        .append(fullExtentViewPort.getMinimum(1))
209
                        .append("\n\t");
210
                buff.append(i18nManager.getTranslation("Izquierda"))
211
                        .append(":\t")
212
                        .append(fullExtentViewPort.getMinimum(0))
213
                        .append("\n\t");
214
                buff.append(i18nManager.getTranslation("Derecha"))
215
                        .append(":\t")
216
                        .append(fullExtentViewPort.getMaximum(0))
217
                        .append("\n");
218

  
219
                if (layer.getProjection() != null
220
                        && !layer.getProjection().getAbrev().equals(
221
                                mapProjection.getAbrev())) {
222
                    IProjection nativeLayerProj = layer.getProjection();
223
                    ICoordTrans ct = mapProjection.getCT(nativeLayerProj);
224
                    Envelope nativeLayerExtent = fullExtentViewPort.convert(ct);
225
                    buff.append(i18nManager.getTranslation("Extent"))
226
                            .append(" ");
227
                    buff.append(nativeLayerProj.getAbrev());
228
                    buff.append(" (")
229
                            .append(i18nManager.getTranslation("layer_native_projection"))
230
                            .append("):\n\t");
231
                    buff.append(i18nManager.getTranslation("Superior"))
232
                            .append(":\t")
233
                            .append(nativeLayerExtent.getMaximum(1))
234
                            .append("\n\t");
235
                    buff.append(i18nManager.getTranslation("Inferior"))
236
                            .append(":\t")
237
                            .append(nativeLayerExtent.getMinimum(1))
238
                            .append("\n\t");
239
                    buff.append(i18nManager.getTranslation("Izquierda"))
240
                            .append(":\t")
241
                            .append(nativeLayerExtent.getMinimum(0))
242
                            .append("\n\t");
243
                    buff.append(i18nManager.getTranslation("Derecha"))
244
                            .append(":\t")
245
                            .append(nativeLayerExtent.getMaximum(0))
246
                            .append("\n");
247
                }
248

  
249
                if (layer instanceof FLyrVect) {
250
                    try {
251
                        GeometryType geomType = ((FLyrVect) layer).getTypeVectorLayer();
252
                        buff.append("\n")
253
                                .append(i18nManager.getTranslation("type"))
254
                                .append(": ")
255
                                .append(geomType.getFullName())
256
                                .append("\n");
257
                    } catch (Exception e) {
258
                        logger.warn("Can't get gemetry type for layer '" + layer.getName() + "'.", e);
259
                        buff.append("\n")
260
                                .append(i18nManager.getTranslation("type"))
261
                                .append(": ")
262
                                .append("unknow")
263
                                .append("\n");
264
                    }
265

  
266
                }
267
                info = buff.toString();
194
                  info = "";
195
//                Envelope fullExtentViewPort = layer.getFullEnvelope();
196
//                IProjection mapProjection = layer.getMapContext().getProjection();
197
//                buff.append(i18nManager.getTranslation("Extent"));
198
//                buff.append(" ");
199
//                buff.append(mapProjection.getAbrev());
200
//                buff.append(" (")
201
//                        .append(i18nManager.getTranslation("view_projection"))
202
//                        .append("):\n\t");
203
//                buff.append(i18nManager.getTranslation("Superior"))
204
//                        .append(":\t")
205
//                        .append(fullExtentViewPort.getMaximum(1))
206
//                        .append("\n\t");
207
//                buff.append(i18nManager.getTranslation("Inferior"))
208
//                        .append(":\t")
209
//                        .append(fullExtentViewPort.getMinimum(1))
210
//                        .append("\n\t");
211
//                buff.append(i18nManager.getTranslation("Izquierda"))
212
//                        .append(":\t")
213
//                        .append(fullExtentViewPort.getMinimum(0))
214
//                        .append("\n\t");
215
//                buff.append(i18nManager.getTranslation("Derecha"))
216
//                        .append(":\t")
217
//                        .append(fullExtentViewPort.getMaximum(0))
218
//                        .append("\n");
219
//
220
//                if (layer.getProjection() != null
221
//                        && !layer.getProjection().getAbrev().equals(
222
//                                mapProjection.getAbrev())) {
223
//                    IProjection nativeLayerProj = layer.getProjection();
224
//                    ICoordTrans ct = mapProjection.getCT(nativeLayerProj);
225
//                    Envelope nativeLayerExtent = fullExtentViewPort.convert(ct);
226
//                    buff.append(i18nManager.getTranslation("Extent"))
227
//                            .append(" ");
228
//                    buff.append(nativeLayerProj.getAbrev());
229
//                    buff.append(" (")
230
//                            .append(i18nManager.getTranslation("layer_native_projection"))
231
//                            .append("):\n\t");
232
//                    buff.append(i18nManager.getTranslation("Superior"))
233
//                            .append(":\t")
234
//                            .append(nativeLayerExtent.getMaximum(1))
235
//                            .append("\n\t");
236
//                    buff.append(i18nManager.getTranslation("Inferior"))
237
//                            .append(":\t")
238
//                            .append(nativeLayerExtent.getMinimum(1))
239
//                            .append("\n\t");
240
//                    buff.append(i18nManager.getTranslation("Izquierda"))
241
//                            .append(":\t")
242
//                            .append(nativeLayerExtent.getMinimum(0))
243
//                            .append("\n\t");
244
//                    buff.append(i18nManager.getTranslation("Derecha"))
245
//                            .append(":\t")
246
//                            .append(nativeLayerExtent.getMaximum(0))
247
//                            .append("\n");
248
//                }
249
//
250
//                if (layer instanceof FLyrVect) {
251
//                    try {
252
//                        GeometryType geomType = ((FLyrVect) layer).getTypeVectorLayer();
253
//                        buff.append("\n")
254
//                                .append(i18nManager.getTranslation("type"))
255
//                                .append(": ")
256
//                                .append(geomType.getFullName())
257
//                                .append("\n");
258
//                    } catch (Exception e) {
259
//                        logger.warn("Can't get gemetry type for layer '" + layer.getName() + "'.", e);
260
//                        buff.append("\n")
261
//                                .append(i18nManager.getTranslation("type"))
262
//                                .append(": ")
263
//                                .append("unknow")
264
//                                .append("\n");
265
//                    }
266
//
267
//                }
268
//                info = buff.toString();
268 269
            }
269 270
        } catch (Exception e) {
270 271
            logger.warn("Can't get layer information.", e);
271
            info = buff.toString();
272
            info = ""; //buff.toString();
272 273
        }
273 274
        return info;
274 275
    }

Also available in: Unified diff