Examples of sendCommandASync()


Examples of org.locationtech.udig.project.IMap.sendCommandASync()

        }
       
        //NavigationCommandFactory navigate = NavigationCommandFactory.getInstance();

        NavCommand show = new SetViewportBBoxCommand(areaOfInterest, world);
        imap.sendCommandASync( show );
    }
   
    /**
    *
    * @return
 
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

            // layer is intended as a background layer
           
            // We can clear the background setting using a custom command
            IMap map = layer.getMap();
            final Layer modifyLayer = (Layer) layer;
            map.sendCommandASync( new AbstractCommand(){
                public void run(IProgressMonitor monitor) throws Exception {
                    modifyLayer.setInteraction( Interaction.BACKGROUND, false );
                }
                public String getName() {
                    return "Clear Interaction";
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

        downAction = new LayerAction(){
            public void run() {
                if( selection.isEmpty() ) return;
                IMap map = getCurrentMap();
                // map.sendCommandSync( new LayerMoveDownCommand( selection ));
                map.sendCommandASync( new LayerMoveDownCommand( selection ));
            }
        };
        downAction.setEnabled(false);
        downAction.setToolTipText(Messages.LayersView_down_tooltip);
        downAction.setImageDescriptor(ProjectUIPlugin.getDefault().getImageDescriptor(ISharedImages.DOWN_CO));
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

             */
            public void run() {
                if( selection.isEmpty() ) return;
                IMap map = getCurrentMap();
                //map.sendCommandSync( new LayerMoveUpCommand( selection ));
                map.sendCommandASync( new LayerMoveUpCommand( selection ));
            }
        };
        upAction.setEnabled(false);
        upAction.setToolTipText(Messages.LayersView_up_tooltip);
        upAction.setImageDescriptor(ProjectUIPlugin.getDefault().getImageDescriptor(ISharedImages.UP_CO));
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

           
            if( layer==null){
                setSelection(filter==null?(Filter)getData():filter, destinationLayer, monitor);
            }else{
                MapCommand c=EditCommandFactory.getInstance().createCopyFeaturesCommand( layer, filter, destinationLayer);
                destinationMap.sendCommandASync(c);
            }
        }else{
            setSelection((Filter)getData(), destinationLayer, monitor);
        }
    }
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

        }else{
            map=(Map) getDestination();
        }

        Collection<Layer> layers = toCollection(data2);
        map.sendCommandASync( new AddLayersCommand(layers) );
        layers.iterator().next().getMap().sendCommandASync(new DeleteLayersCommand(layers.toArray(new Layer[0])));
    }

    @SuppressWarnings("unchecked")
    public
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

        EditBlackboard editBlackboard = EditBlackboardUtil.getEditBlackboard(ApplicationGIS.createContext(map),
                map.getEditManager().getSelectedLayer());
       
        ShapeProvider shapeProvider=new ShapeProvider(map);
       
         map.sendCommandASync(new SplitLineCommand(editBlackboard, shapeProvider,
                 new EditFeatureProvider(map), new EditLayerProvider(map),
                 new HashSet<Point>(Arrays.asList(points))));
    }
   
    static class ShapeProvider implements IBlockingProvider<PrimitiveShape>{
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

        IMap map = layer.getMap();
       
        final CoordinateReferenceSystem after = layer.getCRS();
       
        MapCommand changeProjection = new ChangeCRSCommand(after);
        map.sendCommandASync( changeProjection );
       
    }

}
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

                        bounds.translate(xTrans, yTrans);
                    } catch (Exception e1) {
                        e1.printStackTrace();
                    }
                    map.sendCommandASync(NavigationCommandFactory.getInstance().createSetViewportBBoxCommand(bounds));
                }
            });

            Button loadShapeButton = new Button(placesGroup, SWT.PUSH);
            GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandASync()

                int index = map.getMapLayers().size();
                ApplicationGIS.addLayersToMap(map, Arrays.asList(addedMapToCatalog), index);
            } else {
                Layer layer = layerFactory.createLayer(resource);
                AddLayerCommand cmd = new AddLayerCommand(layer);
                map.sendCommandASync(cmd);
            }
        }
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.