Revision 27186
trunk/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/layers/FFeatureLyrArcIMS.java | ||
---|---|---|
42 | 42 |
*/ |
43 | 43 |
package es.prodevelop.cit.gvsig.arcims.fmap.layers; |
44 | 44 |
|
45 |
import com.hardcode.driverManager.DriverLoadException; |
|
45 |
import java.awt.Color; |
|
46 |
import java.awt.Graphics2D; |
|
47 |
import java.awt.Point; |
|
48 |
import java.awt.geom.AffineTransform; |
|
49 |
import java.awt.geom.NoninvertibleTransformException; |
|
50 |
import java.awt.geom.Point2D; |
|
51 |
import java.awt.geom.Rectangle2D; |
|
52 |
import java.awt.image.BufferedImage; |
|
53 |
import java.net.MalformedURLException; |
|
54 |
import java.net.URL; |
|
55 |
import java.util.ArrayList; |
|
56 |
import java.util.HashMap; |
|
57 |
import java.util.Vector; |
|
46 | 58 |
|
59 |
import javax.print.attribute.PrintRequestAttributeSet; |
|
60 |
import javax.swing.ImageIcon; |
|
61 |
|
|
62 |
import org.apache.log4j.Logger; |
|
63 |
import org.cresques.cts.ICoordTrans; |
|
64 |
import org.gvsig.remoteClient.arcims.ArcImsClientP; |
|
65 |
import org.gvsig.remoteClient.arcims.ArcImsFeatureClient; |
|
66 |
import org.gvsig.remoteClient.arcims.ArcImsVectStatus; |
|
67 |
import org.gvsig.remoteClient.arcims.exceptions.ArcImsException; |
|
68 |
import org.gvsig.remoteClient.arcims.utils.FieldInformation; |
|
69 |
import org.gvsig.remoteClient.arcims.utils.MyCancellable; |
|
70 |
import org.gvsig.remoteClient.arcims.utils.ServiceInfoTags; |
|
71 |
import org.gvsig.remoteClient.arcims.utils.ServiceInformation; |
|
72 |
import org.gvsig.remoteClient.arcims.utils.ServiceInformationLayerFeatures; |
|
73 |
import org.gvsig.remoteClient.utils.Utilities; |
|
74 |
|
|
47 | 75 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
48 | 76 |
import com.hardcode.gdbms.engine.data.DataSource; |
49 | 77 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
50 |
|
|
51 | 78 |
import com.iver.andami.PluginServices; |
52 |
|
|
53 |
import com.iver.cit.gvsig.exceptions.visitors.VisitorException; |
|
54 | 79 |
import com.iver.cit.gvsig.fmap.MapContext; |
55 | 80 |
import com.iver.cit.gvsig.fmap.ViewPort; |
56 | 81 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
57 | 82 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
58 | 83 |
import com.iver.cit.gvsig.fmap.core.SymbologyFactory; |
59 | 84 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
60 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
61 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
|
62 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
63 | 85 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
64 | 86 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
65 |
import com.iver.cit.gvsig.fmap.layers.FLyrText; |
|
66 | 87 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
67 |
import com.iver.cit.gvsig.fmap.rendering.LegendListener;
|
|
88 |
import com.iver.cit.gvsig.fmap.layers.LegendChangedEvent;
|
|
68 | 89 |
import com.iver.cit.gvsig.fmap.layers.ReadableVectorial; |
69 | 90 |
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource; |
70 | 91 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
71 | 92 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.InfoByPoint; |
72 |
import com.iver.cit.gvsig.fmap.operations.Cancel; |
|
73 | 93 |
import com.iver.cit.gvsig.fmap.rendering.ILegend; |
74 | 94 |
import com.iver.cit.gvsig.fmap.rendering.IVectorLegend; |
75 |
import com.iver.cit.gvsig.fmap.layers.LegendChangedEvent; |
|
76 |
|
|
95 |
import com.iver.cit.gvsig.fmap.rendering.LegendListener; |
|
77 | 96 |
import com.iver.utiles.XMLEntity; |
78 | 97 |
import com.iver.utiles.connections.ConnectionException; |
79 | 98 |
import com.iver.utiles.swing.threads.Cancellable; |
... | ... | |
84 | 103 |
import es.prodevelop.cit.gvsig.arcims.fmap.drivers.ArcImsVectorialEditableAdapter; |
85 | 104 |
import es.prodevelop.cit.gvsig.arcims.fmap.drivers.FMapFeatureArcImsDriver; |
86 | 105 |
|
87 |
import org.apache.log4j.Logger; |
|
88 | 106 |
|
89 |
import org.cresques.cts.ICoordTrans; |
|
90 |
import org.cresques.cts.IProjection; |
|
91 |
|
|
92 |
import org.gvsig.remoteClient.arcims.ArcImsClientP; |
|
93 |
import org.gvsig.remoteClient.arcims.ArcImsFeatureClient; |
|
94 |
import org.gvsig.remoteClient.arcims.ArcImsProtocolHandler; |
|
95 |
import org.gvsig.remoteClient.arcims.ArcImsVectStatus; |
|
96 |
import org.gvsig.remoteClient.arcims.exceptions.ArcImsException; |
|
97 |
import org.gvsig.remoteClient.arcims.utils.FieldInformation; |
|
98 |
import org.gvsig.remoteClient.arcims.utils.MyCancellable; |
|
99 |
import org.gvsig.remoteClient.arcims.utils.ServiceInfoTags; |
|
100 |
import org.gvsig.remoteClient.arcims.utils.ServiceInformation; |
|
101 |
import org.gvsig.remoteClient.arcims.utils.ServiceInformationLayerFeatures; |
|
102 |
import org.gvsig.remoteClient.utils.Utilities; |
|
103 |
|
|
104 |
import java.awt.Color; |
|
105 |
import java.awt.Graphics2D; |
|
106 |
import java.awt.Point; |
|
107 |
import java.awt.geom.AffineTransform; |
|
108 |
import java.awt.geom.NoninvertibleTransformException; |
|
109 |
import java.awt.geom.Point2D; |
|
110 |
import java.awt.geom.Rectangle2D; |
|
111 |
import java.awt.image.BufferedImage; |
|
112 |
|
|
113 |
import java.io.IOException; |
|
114 |
|
|
115 |
import java.net.MalformedURLException; |
|
116 |
import java.net.ProtocolException; |
|
117 |
import java.net.URL; |
|
118 |
|
|
119 |
import java.util.ArrayList; |
|
120 |
import java.util.HashMap; |
|
121 |
import java.util.Map; |
|
122 |
import java.util.Vector; |
|
123 |
|
|
124 |
import javax.print.attribute.PrintRequestAttributeSet; |
|
125 |
|
|
126 |
import javax.swing.ImageIcon; |
|
127 |
|
|
128 |
|
|
129 | 107 |
public class FFeatureLyrArcIMS extends FLyrVect implements InfoByPoint, |
130 | 108 |
LegendListener { |
131 | 109 |
// ClassifiableVectorial, Selectable, AlphanumericData, VectorialData, |
... | ... | |
276 | 254 |
|
277 | 255 |
ISymbol symbol = (ISymbol) ((IVectorLegend) getLegend()).getSymbol(i); |
278 | 256 |
|
279 |
// FSymbol symbol = ((VectorialLegend) getLegend()).getSymbol(i); |
|
280 | 257 |
if (layerTransf != null) { |
281 | 258 |
geom.reProject(layerTransf); |
282 | 259 |
} |
... | ... | |
329 | 306 |
((IVectorLegend) getLegend()).getSymbol( |
330 | 307 |
ov_index)); |
331 | 308 |
|
332 |
// FSymbol symbol = getSymbolOrSelected(ov_index, ((VectorialLegend) getLegend()).getSymbol(ov_index)); |
|
333 | 309 |
if (layerTransf != null) { |
334 | 310 |
geom.reProject(layerTransf); |
335 | 311 |
} |
336 | 312 |
|
337 |
clonedGeom.draw(g, viewPort, symbol);
|
|
313 |
clonedGeom.drawInts(g, viewPort, symbol, cancel);
|
|
338 | 314 |
} |
339 | 315 |
} |
340 | 316 |
|
... | ... | |
513 | 489 |
logger.error("While setting initial legend ", e); |
514 | 490 |
} |
515 | 491 |
|
516 |
// //If no legend is returned create a default legend |
|
517 |
// if (drv.getShapeType() == FShape.MULTIPOINT) { |
|
518 |
// SingleSymbolLegend initialleg = new SingleSymbolLegend(); |
|
519 |
// initialleg.setShapeType(drv.getShapeType()); |
|
520 |
// try { |
|
521 |
// setLegend(initialleg); |
|
522 |
// } catch (Exception e) { |
|
523 |
// logger.error("While setting initial legend ", e); |
|
524 |
// } |
|
525 |
// return; |
|
526 |
// } |
|
527 |
// |
|
528 |
// try { |
|
529 |
// int colorind = (int) (System.currentTimeMillis() % ((long) initialColors |
|
530 |
// .size())); |
|
531 |
// FSymbol symb = new FSymbol(drv.getShapeType(), |
|
532 |
// (Color) initialColors.get(colorind)); |
|
533 |
// SingleSymbolLegend initialleg = new SingleSymbolLegend(symb); |
|
534 |
// initialleg.setShapeType(drv.getShapeType()); |
|
535 |
// setLegend(initialleg); |
|
536 |
// } catch (FieldNotFoundException e) { |
|
537 |
// logger.error("Whuile setting initial legend ", e); |
|
538 |
// } catch (DriverException e) { |
|
539 |
// logger.error("Whuile setting initial legend ", e); |
|
540 |
// } |
|
541 | 492 |
} |
542 | 493 |
|
543 | 494 |
// Classifiable |
Also available in: Unified diff