Revision 47386
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/vectorial/impl/DefaultGraphicLayer.java | ||
---|---|---|
23 | 23 |
package org.gvsig.fmap.mapcontext.layers.vectorial.impl; |
24 | 24 |
|
25 | 25 |
import java.util.Iterator; |
26 |
import org.apache.commons.lang3.StringUtils; |
|
26 | 27 |
|
27 | 28 |
import org.cresques.cts.ICoordTrans; |
28 | 29 |
import org.cresques.cts.IProjection; |
... | ... | |
52 | 53 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
53 | 54 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend; |
54 | 55 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
56 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
|
55 | 57 |
import org.gvsig.tools.dispose.DisposableIterator; |
56 | 58 |
import org.gvsig.tools.exception.BaseException; |
57 | 59 |
import org.slf4j.Logger; |
... | ... | |
163 | 165 |
store.beginComplexNotification(); |
164 | 166 |
// Just in case another thread is going to read from the store |
165 | 167 |
synchronized (store) { |
168 |
if(StringUtils.isNotBlank(label)){ |
|
169 |
ISymbol symbol = this.getSymbol(idsym); |
|
170 |
if(symbol instanceof ITextSymbol){ |
|
171 |
ITextSymbol textSymbol = (ITextSymbol)(symbol.clone()); |
|
172 |
textSymbol.setText(label); |
|
173 |
idsym = this.addSymbol(textSymbol); |
|
174 |
} |
|
175 |
} |
|
166 | 176 |
if (store.isEditing() || store.isAppending() ) { |
167 | 177 |
insertGeometry(groupId, geom, idsym, label, tag, priority); |
168 | 178 |
} else { |
Also available in: Unified diff