Package org.locationtech.udig.project.command

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


            // 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


        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500, 512));
        ValidateOverlaps validator = new ValidateOverlaps();
        validator.op(Display.getDefault(), map.getLayersInternal().get(0),
                new NullProgressMonitor());
        assertEquals(1, validator.genericResults.failedFeatures.size()); //only line[0] and line[1] should fail (counts as 1)
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

        IGeoResource resource = MapTests.createGeoResource(features, true);
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateGeometry isValidGeometry = new ValidateGeometry();
        isValidGeometry.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        assertEquals(1,isValidGeometry.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineMustBeASinglePart isValidLine = new ValidateLineMustBeASinglePart();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineNoSelfIntersect isValidLine = new ValidateLineNoSelfIntersect();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineNoSelfOverlapping isValidLine = new ValidateLineNoSelfOverlapping();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

            }                   
        }, GeoToolsAdapters.progress(monitor) );
       
        final Geometry hole = union[0];
       
        MapCommand drillHoleCommand = new AbstractCommand(){
           
            public void run( IProgressMonitor monitor ) throws Exception {
                for( Layer targetLayer : getMap().getLayersInternal() ){
                    //make hole filter for target layer
                    if( targetLayer == layer ){
View Full Code Here

TOP

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

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.