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

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


        EditBlackboard editBlackboard = handler.getEditBlackboard(handler.getEditLayer());
        List<EditGeom> intersectingGeoms = EditUtils.instance.getIntersectingGeom(editBlackboard,
                Point.valueOf(e.x, e.y), treatUnknownGeomsAsPolygon);
       
        if (e.isModifierDown(MapMouseEvent.MOD1_DOWN_MASK) && !intersectingGeoms.isEmpty()) {
            return new DeselectEditGeomCommand(handler, intersectingGeoms);
        } else if (e.isShiftDown() && !intersectingGeoms.isEmpty()) {
            return null;
        }
        // Check to see if shape is already on the blackboard
        PrimitiveShape newShape = findOnBlackboard(handler, e);
View Full Code Here


public class DeselectEditShapeAcceptBehaviour implements Behaviour {

    public UndoableMapCommand getCommand( EditToolHandler handler ) {
        UndoableComposite composite = new UndoableComposite();
        List<EditGeom> geoms = handler.getEditBlackboard(handler.getEditLayer()).getGeoms();
        composite.getCommands().add(new DeselectEditGeomCommand(handler, geoms ));
        composite.getCommands().add(new SetEditStateCommand(handler, EditState.NONE));
        return composite;
    }
View Full Code Here

            try{
                PathIterator iter = drawCommand.getShape().getPathIterator(AffineTransform.getTranslateInstance(0,0), 1.0);
                UndoableComposite commands=new UndoableComposite();
                commands.getCommands().add(handler.getContext().getEditFactory().createNullEditFeatureCommand());
                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);
View Full Code Here

            throw new IllegalArgumentException("Current State is not valid for behaviour"); //$NON-NLS-1$
        List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
        commands.add(handler.getContext().getEditFactory().createNullEditFeatureCommand());
        ILayer editLayer = handler.getEditLayer();
        EditBlackboard bb = handler.getEditBlackboard(editLayer);
        commands.add(new DeselectEditGeomCommand(handler, bb.getGeoms()));
        commands.add(new StartEditingCommand(handler, e, type));
       
        UndoableComposite undoableComposite = new UndoableComposite(commands);
        undoableComposite.setMap(handler.getContext().getMap());
        try {
View Full Code Here

    List<EditGeom> list = new LinkedList<EditGeom>();
    EditBlackboard bb = handler.getCurrentEditBlackboard();
    list.addAll(bb.getGeoms());

    // Deselects the selected painted geometry
    composite.addCommand(new DeselectEditGeomCommand(handler, list));
  }
View Full Code Here

        EditToolHandler handler = parameters.handler;
        EditBlackboard editBlackboard = handler.getEditBlackboard(handler
                .getEditLayer());
        if (hasDirtyGeom(handler)) {
            commands.addCommand(handler.getCommand(handler.getAcceptBehaviours()));
            commands.addCommand(new DeselectEditGeomCommand(handler, editBlackboard.getGeoms()));
        }
    }
View Full Code Here

TOP

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

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.