Package org.geotools.map

Examples of org.geotools.map.MapContent$LayerList


    }

    @Test(expected=UnsupportedOperationException.class)
    public void removeLayerThrowsException() {
        Layer layer = new MockLayer(WORLD);
        MapContent mc = new SingleLayerMapContent(layer);

        mc.removeLayer(layer);
    }
View Full Code Here


            public void dispose() {
                layerDisposed[0] = true;
            }
        };
       
        MapContent mc = new SingleLayerMapContent(layer);
        mc.dispose();
        assertFalse(layerDisposed[0]);
    }
View Full Code Here

        assertTrue(executor instanceof DefaultRenderingExecutor);
    }
   
    @Test
    public void settingRendererLinksToMapContent() {
        MapContent mapContent = new MapContent();
        mapPane.setMapContent(mapContent);
       
        GTRenderer renderer = new MockRenderer();
        mapPane.setRenderer(renderer);
       
View Full Code Here

    @Test
    public void settingMapContentLinksToRenderer() {
        GTRenderer renderer = new MockRenderer();
        mapPane.setRenderer(renderer);
       
        MapContent mapContent = new MapContent();
        mapPane.setMapContent(mapContent);
       
        assertTrue(renderer.getMapContent() == mapContent);
    }
View Full Code Here

   
    @Test
    public void setMapContentFiresEvent() {
        listener.setExpected(MapPaneEvent.Type.NEW_MAPCONTENT);
       
        MapContent mapContent = new MapContent();
        mapPane.setMapContent(mapContent);
       
        assertTrue(listener.await(MapPaneEvent.Type.NEW_MAPCONTENT, WAIT_TIMEOUT));
       
        MapPaneEvent event = listener.getEvent(MapPaneEvent.Type.NEW_MAPCONTENT);
View Full Code Here

        assertTrue(o == mapContent);
    }
   
    @Test
    public void setDisplayArea_WithMapContentSet() {
        MapContent mapContent = new MapContent();
        mapPane.setMapContent(mapContent);
        mapPane.setDisplayArea(WORLD);
        assertDisplayArea(WORLD, mapPane.getDisplayArea());
    }
View Full Code Here

        assertTrue(mapPane.getDisplayArea().isEmpty());
    }
   
    @Test
    public void setDisplayAreaFiresEvent_WithMapContent() {
        mapPane.setMapContent(new MapContent());
        listener.setExpected(MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
       
        mapPane.setDisplayArea(WORLD);
        assertTrue(listener.await(MapPaneEvent.Type.DISPLAY_AREA_CHANGED, WAIT_TIMEOUT));
    }
View Full Code Here

        assertTrue(WORLD.boundsEquals2D(eventEnv, TOL));
    }
   
    @Test
    public void displayAreaIsSetFromMapContent() {
        MapContent mapContent = createMapContent(WORLD);
        mapPane.setMapContent(mapContent);
       
        // Since no screen area has been set the map pane's bounds should
        // be equal to the feature collection bounds
        assertTrue(WORLD.boundsEquals2D(mapPane.getDisplayArea(), TOL));
View Full Code Here

        assertTrue(WORLD.boundsEquals2D(mapPane.getDisplayArea(), TOL));
    }
   
    @Test
    public void addingLayerBeyondCurrentBoundsDoesNotChangeDisplayArea() {
        MapContent mapContent = createMapContent(SMALL_WORLD);
        mapPane.setMapContent(mapContent);

        // add larger layer and check that display area is unchanged
        mapContent.addLayer(createLayer(WORLD));
        assertTrue(SMALL_WORLD.boundsEquals2D(mapPane.getDisplayArea(), TOL));
    }
View Full Code Here

        mapPane.reset();
    }
   
    @Test
    public void resetAfterRemovingAllLayersIsIgnored() {
        MapContent mapContent = createMapContent(WORLD);
        mapPane.setMapContent(mapContent);
        mapContent.removeLayer(mapContent.layers().get(0));

        // just checking no exception is thrown
        mapPane.reset();
    }
View Full Code Here

TOP

Related Classes of org.geotools.map.MapContent$LayerList

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.