Revision 21144 branches/v2_0_0_prep/libraries/libFMap/src/org/gvsig/fmap/mapcontext/rendering/legend/FGraphicLabel.java
FGraphicLabel.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
import org.gvsig.fmap.core.geometries.utils.FLabel; |
49 | 49 |
import org.gvsig.fmap.geom.Geometry; |
50 |
import org.gvsig.fmap.geom.operation.CreateLabels; |
|
51 |
import org.gvsig.fmap.geom.operation.CreateLabelsOperationContext; |
|
52 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
53 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
|
50 | 54 |
import org.gvsig.fmap.geom.primitive.Point2D; |
51 | 55 |
import org.gvsig.fmap.mapcontext.ViewPort; |
52 | 56 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
... | ... | |
70 | 74 |
// TODO: Lo correcto deber?a ser hacer que FLabel |
71 | 75 |
// siga el patr?n COMPOSITE por ejemplo para que los |
72 | 76 |
// multipoint se etiqueten bien, no solo el primer punto. |
73 |
FLabel[] labels = geom.createLabels(0, true); |
|
77 |
CreateLabelsOperationContext cloc=new CreateLabelsOperationContext(); |
|
78 |
cloc.setPosition(0); |
|
79 |
cloc.setDublicates(true); |
|
80 |
FLabel[] labels=null; |
|
81 |
try { |
|
82 |
labels = (FLabel[])geom.invokeOperation(CreateLabels.CODE,cloc); |
|
83 |
} catch (GeometryOperationNotSupportedException e) { |
|
84 |
// TODO Auto-generated catch block |
|
85 |
e.printStackTrace(); |
|
86 |
} catch (GeometryOperationException e) { |
|
87 |
// TODO Auto-generated catch block |
|
88 |
e.printStackTrace(); |
|
89 |
} |
|
90 |
// FLabel[] labels = geom.createLabels(0, true); |
|
74 | 91 |
theLabel = labels[0]; |
75 | 92 |
theLabel.setString(theText); |
76 | 93 |
} |
Also available in: Unified diff