svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap / src / org / gvsig / fmap / geom / operation / CreateLabels.java @ 21128
History | View | Annotate | Download (863 Bytes)
1 |
package org.gvsig.fmap.geom.operation; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.core.geometries.utils.FLabel; |
4 |
import org.gvsig.fmap.geom.Geometry; |
5 |
import org.gvsig.fmap.geom.GeometryManager; |
6 |
|
7 |
public class CreateLabels extends GeometryOperation{ |
8 |
public static final int CODE = GeometryManager.getInstance() |
9 |
.registerGeometryOperation("createLabels", new DrawInts()); |
10 |
|
11 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) |
12 |
throws GeometryOperationException {
|
13 |
CreateLabelsOperationContext cloc = (CreateLabelsOperationContext) ctx; |
14 |
return createLabels(geom, cloc.getPosition(), cloc.isDublicates());
|
15 |
} |
16 |
|
17 |
public int getOperationIndex() { |
18 |
return CODE;
|
19 |
} |
20 |
|
21 |
private FLabel[] createLabels(Geometry geom, int position, |
22 |
boolean duplicates) {
|
23 |
FLabel[] aux = new FLabel[1]; |
24 |
aux[0] = FLabel.createFLabel(geom);
|
25 |
|
26 |
return aux;
|
27 |
} |
28 |
} |