Revision 5124 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/AnnotationStrategy.java
AnnotationStrategy.java | ||
---|---|---|
81 | 81 |
int numReg; |
82 | 82 |
FLyrAnnotation lyrAnnotation=(FLyrAnnotation)capa; |
83 | 83 |
ISpatialIndex isi=lyrAnnotation.getISpatialIndex(); |
84 |
List list=isi.query(elExtent); |
|
85 |
int sc = list.size(); |
|
86 |
VectorialLegend l=(VectorialLegend)lyrAnnotation.getLegend(); |
|
84 |
List list=null; |
|
85 |
int sc=0; |
|
86 |
if (isi!=null){ |
|
87 |
list=isi.query(elExtent); |
|
88 |
sc = list.size(); |
|
89 |
} |
|
90 |
VectorialLegend l=(VectorialLegend)lyrAnnotation.getLegend(); |
|
87 | 91 |
FBitSet bitSet=lyrAnnotation.getRecordset().getSelection(); |
88 | 92 |
|
89 | 93 |
boolean inPixels=lyrAnnotation.isInPixels(); |
... | ... | |
92 | 96 |
System.out.println("Dibujando Anotaciones..."); |
93 | 97 |
this.viewPort=viewPort;//capa.getFMap().getViewPort(); |
94 | 98 |
AffineTransform at=viewPort.getAffineTransform(); |
95 |
//try {
|
|
99 |
try { |
|
96 | 100 |
|
97 |
//int numRows=lyrAnnotation.getSource().getShapeCount();
|
|
101 |
int numRows=lyrAnnotation.getSource().getShapeCount(); |
|
98 | 102 |
//long numRows=lyrAnnotation.getRecordset().getRowCount(); |
103 |
if (isi==null) |
|
104 |
sc=numRows; |
|
99 | 105 |
FontMetrics metrics = g.getFontMetrics(); |
100 | 106 |
for (numReg = 0; numReg < sc; numReg++) { |
101 | 107 |
if (cancel.isCanceled()) { |
102 | 108 |
break; |
103 | 109 |
} |
104 |
Integer idRec = (Integer) list.get(numReg); |
|
105 |
int numOriginal= idRec.intValue(); |
|
106 |
//if (((FLyrAnnotation) capa).getDelBitSet().get(numReg))continue; |
|
110 |
int numOriginal; |
|
111 |
if (isi!=null){ |
|
112 |
Integer idRec = (Integer) list.get(numReg); |
|
113 |
numOriginal= idRec.intValue(); |
|
114 |
}else{ |
|
115 |
numOriginal=numReg; |
|
116 |
} |
|
117 |
//if (((FLyrAnnotation) capa).getDelBitSet().get(numReg))continue; |
|
107 | 118 |
//int numOriginal=numReg; |
108 | 119 |
if (lyrAnnotation.getSource() instanceof EditableAdapter) |
109 | 120 |
numOriginal=((EditableAdapter)lyrAnnotation.getSource()).getCalculatedIndex(numReg); |
... | ... | |
123 | 134 |
} |
124 | 135 |
} |
125 | 136 |
} |
126 |
//} catch (DriverIOException e) {
|
|
127 |
// e.printStackTrace();
|
|
128 |
//}
|
|
137 |
} catch (DriverIOException e) { |
|
138 |
e.printStackTrace(); |
|
139 |
} |
|
129 | 140 |
} |
130 | 141 |
/** |
131 | 142 |
* Construcci?n del rect?ngulo |
Also available in: Unified diff