本文整理汇总了Java中org.geomajas.command.dto.GeometrySplitResponse类的典型用法代码示例。如果您正苦于以下问题:Java GeometrySplitResponse类的具体用法?Java GeometrySplitResponse怎么用?Java GeometrySplitResponse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GeometrySplitResponse类属于org.geomajas.command.dto包,在下文中一共展示了GeometrySplitResponse类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fetchGeometries
import org.geomajas.command.dto.GeometrySplitResponse; //导入依赖的package包/类
private void fetchGeometries() {
Geometry geometry = service.getGeometry();
Geometry splitLine = service.getGeometryEditService().getGeometry();
if (splitLine.getCoordinates() != null && splitLine.getCoordinates().length > 1) {
geometry.setPrecision(-1);
splitLine.setPrecision(-1);
GeometrySplitRequest request = new GeometrySplitRequest(geometry, splitLine);
GwtCommand command = new GwtCommand(GeometrySplitRequest.COMMAND);
command.setCommandRequest(request);
GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<GeometrySplitResponse>() {
public void execute(GeometrySplitResponse response) {
//showAreas(response.getGeometries());
fetchCentroids(response.getGeometries());
}
});
}
}
示例2: fetch
import org.geomajas.command.dto.GeometrySplitResponse; //导入依赖的package包/类
private void fetch() {
Geometry geometry = service.getGeometry();
Geometry splitLine = service.getGeometryEditService().getGeometry();
if (splitLine.getCoordinates() != null && splitLine.getCoordinates().length > 1) {
geometry.setPrecision(-1);
splitLine.setPrecision(-1);
GeometrySplitRequest request = new GeometrySplitRequest(geometry, splitLine);
GwtCommand command = new GwtCommand(GeometrySplitRequest.COMMAND);
command.setCommandRequest(request);
GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<GeometrySplitResponse>() {
public void execute(GeometrySplitResponse response) {
showAreas(response.getGeometries());
}
});
}
}
示例3: calculate
import org.geomajas.command.dto.GeometrySplitResponse; //导入依赖的package包/类
private void calculate(final GeometryArrayFunction callback) {
geometry.setPrecision(-1);
splitLine.setPrecision(-1);
GeometrySplitRequest request = new GeometrySplitRequest(geometry, splitLine);
GwtCommand command = new GwtCommand(GeometrySplitRequest.COMMAND);
command.setCommandRequest(request);
GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<GeometrySplitResponse>() {
public void execute(GeometrySplitResponse response) {
callback.execute(response.getGeometries().toArray(new Geometry[response.getGeometries().size()]));
}
});
}
示例4: getEmptyCommandResponse
import org.geomajas.command.dto.GeometrySplitResponse; //导入依赖的package包/类
@Override
public GeometrySplitResponse getEmptyCommandResponse() {
return new GeometrySplitResponse();
}