Package org.geomajas.gwt.client.map.feature

Examples of org.geomajas.gwt.client.map.feature.FeatureTransaction.execute()


    if (event.getNativeButton() != Event.BUTTON_RIGHT) {
      FeatureTransaction featureTransaction = getFeatureTransaction();
      if (featureTransaction != null && parent.getEditMode() == EditMode.INSERT_MODE) {
        // The creation of a new point:
        FeatureOperation op = new AddCoordinateOp(getGeometryIndex(), getWorldPosition(event));
        featureTransaction.execute(op);
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
        updateGeometricInfo();
      } else if (featureTransaction != null && parent.getEditMode() == EditMode.DRAG_MODE &&
          dragTargetId != null) {
View Full Code Here


          dragTargetId != null) {
        // Done dragging a point:
        TransactionGeomIndex index = TransactionGeomIndexUtil.getIndex(dragTargetId);
        // TODO: check validity
        FeatureOperation op = new SetCoordinateOp(index, getWorldPosition(event));
        featureTransaction.execute(op);
        if (dragTransaction != null) {
          mapWidget.render(dragTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
          dragTransaction = null;
        }
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
View Full Code Here

  public void onClick(MenuItemClickEvent event) {
    FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
    if (ft != null && index != null && coordinate != null) {
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE);
      InsertCoordinateOp op = new InsertCoordinateOp(index, coordinate);
      ft.execute(op);
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.ALL);
    }
  }

  /**
 
View Full Code Here

    if (event.getNativeButton() != Event.BUTTON_RIGHT) {
      FeatureTransaction featureTransaction = getFeatureTransaction();
      if (featureTransaction != null && parent.getEditMode() == EditMode.INSERT_MODE) {
        // The creation of a new point:
        FeatureOperation op = new AddCoordinateOp(getGeometryIndex(), getWorldPosition(event));
        featureTransaction.execute(op);
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
        updateGeometricInfo();
      } else if (featureTransaction != null && parent.getEditMode() == EditMode.DRAG_MODE
          && dragTargetId != null) {
View Full Code Here

          && dragTargetId != null) {
        // Done dragging a point:
        TransactionGeomIndex index = TransactionGeomIndexUtil.getIndex(dragTargetId);
        // TODO: check validity
        FeatureOperation op = new SetCoordinateOp(index, getWorldPosition(event));
        featureTransaction.execute(op);
        if (dragTransaction != null) {
          mapWidget.render(dragTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
          dragTransaction = null;
        }
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
View Full Code Here

    if (event.getNativeButton() != Event.BUTTON_RIGHT) {
      FeatureTransaction featureTransaction = getFeatureTransaction();
      if (featureTransaction != null && parent.getEditMode() == EditMode.INSERT_MODE) {
        // The creation of a new point:
        FeatureOperation op = new AddCoordinateOp(getGeometryIndex(), getWorldPosition(event));
        featureTransaction.execute(op);
        parent.setEditMode(EditMode.DRAG_MODE);

        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
        updateGeometricInfo();
View Full Code Here

          && dragTargetId != null) {
        // Done dragging a point:
        TransactionGeomIndex index = TransactionGeomIndexUtil.getIndex(dragTargetId);
        // TODO: snap ???
        FeatureOperation op = new SetCoordinateOp(index, getWorldPosition(event));
        featureTransaction.execute(op);
        if (dragTransaction != null) {
          mapWidget.render(dragTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
          dragTransaction = null;
        }
        mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.ALL);
View Full Code Here

  public void onClick(MenuItemClickEvent event) {
    FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
    if (ft != null && index != null) {
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE);
      RemoveCoordinateOp op = new RemoveCoordinateOp(index);
      ft.execute(op);
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.ALL);
    }
  }

  /**
 
View Full Code Here

  public void onClick(MenuItemClickEvent event) {
    FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
    if (ft != null && index != null) {
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE);
      RemoveRingOp op = new RemoveRingOp(index);
      ft.execute(op);
      mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.ALL);
    }
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.