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

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


                if( !started ){
                    started=true;
                } else {
                    if( shapeType!=ShapeType.POLYGON  )
                        throw new IllegalArgumentException("Holes can not to shapes that are not Polygons.  Current shape is a "+shapeType); //$NON-NLS-1$
                    CreateAndSelectHoleCommand command = new CreateAndSelectHoleCommand(currentProvider);
                    currentProvider=command.getHoleProvider();
                    commands.add(command);
                }
                start[0]=coords[0];
                start[1]=coords[1];
                // no break is intentional.  It has to fall through and add a vertext to the shape
View Full Code Here


        if( !isValid(handler, e, eventType))
            throw new IllegalStateException("Current state is illegal this method should not be called"); //$NON-NLS-1$
       
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
        commands.add(new SetEditStateCommand(handler, EditState.CREATING));
        commands.add(new CreateAndSelectHoleCommand(handler));
        commands.add(new AddVertexCommand(handler, handler.getEditBlackboard(handler.getEditLayer()),
                Point.valueOf(e.x, e.y)));
        return new UndoableComposite(commands);
    }
View Full Code Here

                        if (hole.contains(nearestPoint, true)) {
                            return createNewGeom(handler);   
                        }
                    }
                    type=ShapeType.POLYGON;
                    handler.getContext().sendSyncCommand(new CreateAndSelectHoleCommand(handler));
                }else{
                    return createNewGeom(handler);
                }
            } else {
                return createNewGeom(handler);
View Full Code Here

TOP

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

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.