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

Examples of org.locationtech.udig.tools.edit.commands.CreateEditGeomCommand$ShapeProvider


                EditBlackboard bb = handler.getEditBlackboard(handler.getEditLayer());
                commands.getCommands().add(new DeselectEditGeomCommand(handler, bb.getGeoms()));
                ShapeType shapeType = determineLayerType(handler);
               
               
                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


        return null;
    }

    private UndoableComposite startNewShape( final EditToolHandler handler, EditBlackboard blackboard ) {
        List<UndoableMapCommand> commands = new ArrayList<UndoableMapCommand>();
        final CreateEditGeomCommand createEditGeomCommand = new CreateEditGeomCommand(
                blackboard, "freeHandDraw", ShapeType.LINE); //$NON-NLS-1$
        commands.add(createEditGeomCommand);
        class PrimitiveProvider implements IBlockingProvider<PrimitiveShape> {

            public PrimitiveShape get(IProgressMonitor monitor, Object... params) {
                return createEditGeomCommand.get(monitor).getShell();
            }

        }

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

     */
    private UndoableMapCommand createNewGeom( EditToolHandler handler ) {
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
       
        EditBlackboard editBlackboard = handler.getCurrentShape().getEditBlackboard();
        final CreateEditGeomCommand createEditGeomCommand = new CreateEditGeomCommand(
                editBlackboard, "freeHandDraw"+System.currentTimeMillis(), ShapeType.LINE); //$NON-NLS-1$
        commands.add(createEditGeomCommand);
        class PrimitiveProvider implements IBlockingProvider<PrimitiveShape> {
            public PrimitiveShape get(IProgressMonitor monitor, Object... params) {
                return createEditGeomCommand.get(monitor).getShell();
            }

        }

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

TOP

Related Classes of org.locationtech.udig.tools.edit.commands.CreateEditGeomCommand$ShapeProvider

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.