Revision 24759 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/General.java
General.java | ||
---|---|---|
51 | 51 |
import java.awt.SystemColor; |
52 | 52 |
import java.awt.event.ActionEvent; |
53 | 53 |
import java.awt.event.ActionListener; |
54 |
import java.awt.geom.Rectangle2D; |
|
55 | 54 |
import java.text.NumberFormat; |
56 | 55 |
import java.text.ParseException; |
57 | 56 |
import java.util.Iterator; |
... | ... | |
73 | 72 |
|
74 | 73 |
import org.cresques.cts.ICoordTrans; |
75 | 74 |
import org.cresques.cts.IProjection; |
76 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
77 |
import org.gvsig.fmap.data.ReadException; |
|
78 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
79 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
80 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
75 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
76 |
import org.gvsig.fmap.dal.exception.DataException; |
|
77 |
import org.gvsig.fmap.dal.exception.ReadException; |
|
78 |
import org.gvsig.fmap.dal.explorer.filesystem.FilesystemStoreParameters; |
|
79 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
80 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
81 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
81 | 82 |
import org.gvsig.fmap.data.feature.db.DBParameters; |
82 | 83 |
import org.gvsig.fmap.data.feature.db.DBStoreParameters; |
83 |
import org.gvsig.fmap.data.feature.file.FileStoreParameters; |
|
84 | 84 |
import org.gvsig.fmap.geom.primitive.Envelope; |
85 | 85 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
86 | 86 |
import org.gvsig.fmap.mapcontext.layers.FLyrDefault; |
87 | 87 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
88 | 88 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
89 | 89 |
import org.gvsig.gui.beans.swing.JBlank; |
90 |
import org.gvsig.tools.exception.DriverException; |
|
90 | 91 |
|
91 | 92 |
import com.iver.andami.PluginServices; |
92 | 93 |
import com.iver.andami.messages.NotificationManager; |
... | ... | |
238 | 239 |
} else { |
239 | 240 |
cmbLinkField = new JComboBox(); |
240 | 241 |
} |
241 |
} catch (ReadException e) {
|
|
242 |
} catch (DataException e) {
|
|
242 | 243 |
NotificationManager.addError("No se pudo obtener la tabla", e); |
243 | 244 |
} |
244 | 245 |
|
... | ... | |
616 | 617 |
if (!layer.getProjection().getAbrev().equals(viewPortProj.getAbrev())) { |
617 | 618 |
IProjection nativeLayerProj = layer.getProjection(); |
618 | 619 |
ICoordTrans ct = viewPortProj.getCT(nativeLayerProj); |
619 |
Rectangle2D r=new Rectangle2D.Double(fullExtentViewPort.getMinimum(0),fullExtentViewPort.getMinimum(1),fullExtentViewPort.getLength(0),fullExtentViewPort.getLength(1)); |
|
620 |
Rectangle2D nativeLayerExtent = ct.convert(r); |
|
620 |
// Rectangle2D r=new Rectangle2D.Double(fullExtentViewPort.getMinimum(0),fullExtentViewPort.getMinimum(1),fullExtentViewPort.getLength(0),fullExtentViewPort.getLength(1)); |
|
621 |
// Rectangle2D nativeLayerExtent = ct.convert(r); |
|
622 |
Envelope nativeLayerExtent = ct.convert(fullExtentViewPort); |
|
621 | 623 |
buff.append(PluginServices.getText(this,"Extent") + " "); |
622 | 624 |
buff.append(nativeLayerProj.getAbrev()); |
623 | 625 |
buff.append(" (" + PluginServices.getText(this, "layer_native_projection") + "):\n\t"); |
624 |
buff.append(PluginServices.getText(this,"Superior") + ":\t" + nativeLayerExtent.getMaxY() + "\n\t"); |
|
625 |
buff.append(PluginServices.getText(this,"Inferior") + ":\t" + nativeLayerExtent.getMinY() + "\n\t"); |
|
626 |
buff.append(PluginServices.getText(this,"Izquierda") + ":\t" + nativeLayerExtent.getMinX() + "\n\t"); |
|
627 |
buff.append(PluginServices.getText(this,"Derecha") + ":\t" + nativeLayerExtent.getMaxX() + "\n\n"); |
|
626 |
buff.append(PluginServices.getText(this, "Superior") |
|
627 |
+ ":\t" + nativeLayerExtent.getMaximum(1) + "\n\t"); |
|
628 |
buff.append(PluginServices.getText(this, "Inferior") |
|
629 |
+ ":\t" + nativeLayerExtent.getMinimum(1) + "\n\t"); |
|
630 |
buff.append(PluginServices.getText(this, "Izquierda") |
|
631 |
+ ":\t" + nativeLayerExtent.getMinimum(0) + "\n\t"); |
|
632 |
buff.append(PluginServices.getText(this, "Derecha") + ":\t" |
|
633 |
+ nativeLayerExtent.getMaximum(0) + "\n\n"); |
|
628 | 634 |
|
629 | 635 |
} |
630 | 636 |
if (layer instanceof FLyrVect) { |
... | ... | |
638 | 644 |
info=buff.toString(); |
639 | 645 |
|
640 | 646 |
DataStoreParameters parameters=fStore.getParameters(); |
641 |
if (parameters instanceof FileStoreParameters){
|
|
647 |
if (parameters instanceof FilesystemStoreParameters) {
|
|
642 | 648 |
info = info + "\n" + |
643 |
PluginServices.getText(this,"fichero") +": " + ((FileStoreParameters)parameters).getFile(); |
|
649 |
PluginServices.getText(this, "fichero") |
|
650 |
+ ": " |
|
651 |
+ ((FilesystemStoreParameters) parameters) |
|
652 |
.getFile(); |
|
644 | 653 |
}else if (parameters instanceof DBParameters){ |
645 | 654 |
info = info + "\n" + fStore.getName() + "\n"; |
646 | 655 |
|
... | ... | |
713 | 722 |
* @throws DriverException |
714 | 723 |
* @throws DriverIOException |
715 | 724 |
*/ |
716 |
private IMonitorableTask getCreateSpatialIndexTask() throws ReadException {
|
|
725 |
private IMonitorableTask getCreateSpatialIndexTask() throws DataException {
|
|
717 | 726 |
// FIXME REVISAR ESTO (Quizas lanzar TaskException) |
718 | 727 |
return new CreateSpatialIndexMonitorableTask((FLyrVect)layer); |
719 | 728 |
} |
Also available in: Unified diff