Package org.locationtech.udig.project.command

Examples of org.locationtech.udig.project.command.MapCommand


    /**
     * @param e
     * @param bounds
     */
    protected void sendSelectionCommand( MapMouseEvent e, Envelope bounds ) {
        MapCommand command;
        if (e.isModifierDown(MapMouseEvent.MOD2_DOWN_MASK)) {
            command = getContext().getSelectionFactory().createBBoxSelectionCommand(bounds, BBoxSelectionCommand.ADD);
        } else if (e.isModifierDown(MapMouseEvent.MOD1_DOWN_MASK)) {
            command = getContext().getSelectionFactory().createBBoxSelectionCommand(bounds, BBoxSelectionCommand.SUBTRACT);
        } else {
View Full Code Here


      PlatformGIS.run(new IRunnableWithProgress(){

      public void run(IProgressMonitor monitor)
          throws InvocationTargetException, InterruptedException {
        try {
          MapCommand command = context.getEditFactory().createCommitCommand();
          command.setMap(getContext().getMap());
          command.run(monitor);
        } catch (Exception e) {
          ToolsPlugin.log("Exception thrown while committing", e); //$NON-NLS-1$
          Display display = Display.getDefault();
          display.asyncExec(new Runnable() {
            public void run() {
View Full Code Here

  public static void presentSelection(ILayer sourceLayer, Filter filter) {

    assert sourceLayer != null;
    assert filter != null;

    MapCommand createSelectCommand = SelectionCommandFactory.getInstance().createSelectCommand(sourceLayer, filter);
    sourceLayer.getMap().sendCommandSync(createSelectCommand);
  }
View Full Code Here

            if (found)
                return;

            SimpleFeature feature=reader.next();

            MapCommand deleteFeatureCommand = getContext().getEditFactory().createDeleteFeature(feature, layer);
            getContext().sendASyncCommand(deleteFeatureCommand);
   
            getContext().getViewportPane().repaint();
        } catch (Exception e1) {
          EditPlugin.log( null, e1);
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.command.MapCommand

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.