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

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


        Point vertexOver=handler.getEditBlackboard(handler.getEditLayer()).overVertex(Point.valueOf(e.x, e.y),
                PreferenceUtil.instance().getVertexRadius());
       
        UndoableComposite command=new UndoableComposite();
        EditBlackboard bb = handler.getCurrentShape().getEditBlackboard();
        command.getCommands().add(new SelectVertexCommand(bb, vertexOver, Type.SET));
        command.getCommands().add(new RemoveSelectedVerticesCommand(handler));
       
        return command;
    }
View Full Code Here


               
                handler.unlock(this);
                selectBehaviour=null;
                drawShapeCommand=null;
                if( e.isShiftDown() )
                    return new SelectVertexCommand(handler.getCurrentGeom().getEditBlackboard(), points,
                            SelectVertexCommand.Type.ADD);
                else{
                    return new SelectVertexCommand(handler.getCurrentGeom().getEditBlackboard(), points,
                            SelectVertexCommand.Type.SET);
                }

        }
View Full Code Here

        Selection selection = editBlackboard.getSelection();
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
        if( e.isShiftDown() ){
            if( geoms!=null && geoms.contains(handler.getCurrentGeom())
                    && !editBlackboard.getSelection().contains(point) ){
                commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD ) );
            }
        } else if (e.isControlDown()) {
            if (geoms != null && geoms.contains(handler.getCurrentGeom())) {
                if( selection.contains(point) )
                    commands.add( new SelectVertexCommand(editBlackboard, point, Type.REMOVE) );
                else{
                    commands.add( new SelectVertexCommand(editBlackboard, point, Type.ADD) );                   
                }
            }
        }else{
            if( selection.size()!=1 || !selection.contains(point) )
                commands.addnew SelectVertexCommand(editBlackboard, point, Type.SET) );
        }
        if( geoms!=null && geoms.contains(handler.getCurrentGeom()) ){
            if( handler.getCurrentState()==EditState.NONE){
                commands.add( new SetEditStateCommand( handler, EditState.MODIFYING ) );
            }
View Full Code Here

        }
        Selection selection = editBlackboard.getSelection();
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();

        if( !selection.contains(point) )
            commands.addnew SelectVertexCommand(editBlackboard, point, Type.SET) );

        if( geoms!=null && geoms.contains(handler.getCurrentGeom()) ){
            if( handler.getCurrentState()==EditState.NONE){
                commands.add( new SetEditStateCommand( handler, EditState.MODIFYING ) );
            }
View Full Code Here

TOP

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

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.