Package org.locationtech.udig.tools.edit.commands

Examples of org.locationtech.udig.tools.edit.commands.SetCurrentGeomCommand


        // Check to see if shape is already on the blackboard
        PrimitiveShape newShape = findOnBlackboard(handler, e);

        if (newShape != null && newShape != handler.getCurrentShape()) {
            List<UndoableMapCommand> commands = new ArrayList<UndoableMapCommand>();
            commands.add(new SetCurrentGeomCommand(handler, newShape));
            commands.add(new SetEditFeatureCommand(handler, Point.valueOf(e.x, e.y), newShape));
            UndoableComposite undoableComposite = new UndoableComposite(commands);
            return undoableComposite;
        }
View Full Code Here


               
               
                CreateEditGeomCommand createEditGeomCommand = new CreateEditGeomCommand(bb, "newShape", shapeType); //$NON-NLS-1$
                commands.getCommands().add(createEditGeomCommand);
                commands.getCommands().add(EditUtils.instance.appendPathToShape(iter, shapeType, handler, bb, createEditGeomCommand.getShapeProvider()));
                commands.getCommands().add( new SetCurrentGeomCommand(handler, createEditGeomCommand.getShapeProvider()));
                commands.getCommands().add(handler.getCommand(handler.getAcceptBehaviours()));
               
                commands.getFinalizerCommands().add( new SetEditStateCommand(handler, EditState.NONE));
                return commands;
            }finally{
View Full Code Here

            if( editBlackboard.getSelection().isEmpty() || hasNoPoints() ){
                UndoableComposite composite=new UndoableComposite();
                composite.getCommands().add(new SetEditStateCommand(handler, EditState.BUSY));
                composite.getCommands().add(new RemoveAllVerticesCommand(handler));
                composite.getCommands().add(handler.getCommand(handler.getAcceptBehaviours()));
                composite.getCommands().add(new SetCurrentGeomCommand(handler, (PrimitiveShape)null));
                composite.getFinalizerCommands().add(new SetEditStateCommand(handler, EditState.MODIFYING));
                handler.getContext().sendASyncCommand(composite);
            }else{
                UndoableComposite composite=new UndoableComposite();
                composite.getFinalizerCommands().add(new SetEditStateCommand(handler, EditState.MODIFYING));
View Full Code Here

                return createEditGeomCommand.get(monitor).getShell();
            }

        }

        commands.add(new SetCurrentGeomCommand(handler, new PrimitiveProvider()));
       
        if( handler.getContext().getEditManager().getEditFeature()!=null ){
            commands.add(handler.getContext().getEditFactory().createNullEditFeatureCommand());
        }
        UndoableComposite undoableComposite = new UndoableComposite(commands);
View Full Code Here

                return createEditGeomCommand.get(monitor).getShell();
            }

        }

        commands.add(new SetCurrentGeomCommand(handler, new PrimitiveProvider()));
      
        return new UndoableComposite(commands);
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.tools.edit.commands.SetCurrentGeomCommand

Copyright © 2018 www.massapicom. 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.