Package org.locationtech.udig

Examples of org.locationtech.udig.TestViewportPane


    }

    @Test
    public void testRunCommands() throws Exception {
        TestHandler handler=new TestHandler();
        ((RenderManager)handler.getContext().getRenderManager()).setMapDisplay(new TestViewportPane(new Dimension(500,500)));
        handler.getTestEditBlackboard().util.setVertexRadius(4);
       
        StartHoleCuttingBehaviour behavior=new StartHoleCuttingBehaviour();
        MapMouseEvent event = new MapMouseEvent(null, 10,10, MapMouseEvent.NONE, MapMouseEvent.NONE, MapMouseEvent.BUTTON1);
View Full Code Here


        super(null, null);
        ToolContextImpl context = new ToolContextImpl();
        map = MapTests.createDefaultMap(featureTypeName, numFeatures, true, new Dimension(10,10));
        context.setMapInternal(map);
        context.setRenderManagerInternal(map.getRenderManagerInternal());
        ((RenderManager)context.getRenderManager()).setMapDisplay(new TestViewportPane(new Dimension(500,500)));
        setContext(context);
        testing=true;
        bb=new TestEditBlackboard(10,10, context.worldToScreenTransform(), map.getLayersInternal().get(0).layerToMapTransform());

        setCurrentState(EditState.NONE);
View Full Code Here

            }
            source.modifyFeatures(feature.getFeatureType().getGeometryDescriptor(), geom, filterFac.id(FeatureUtils.stringToId(filterFac, feature.getID())));
            i++;
        }
        ((EditManager) handler.getContext().getEditManager()).commitTransaction();
        ((RenderManager)handler.getContext().getRenderManager()).setMapDisplay(new TestViewportPane(new Dimension(500,500)));
       
        tool.setHandler(handler);
       
        tool.testinitEventBehaviours(new EditToolConfigurationHelper(handler.getBehaviours()));
       
View Full Code Here

    @Test
    public void testRunAndUndo() throws Exception {
        EditBlackboard map=new EditBlackboard(SCREEN.x, SCREEN.y, transform, layerToWorld);
       
        PrimitiveShape hole=map.getGeoms().get(0).newHole();
        InsertVertexCommand command1=new InsertVertexCommand(new TestHandler(), map, new TestViewportPane(new Dimension(500,500)), new EditUtils.StaticShapeProvider(hole), Point.valueOf(10,10), 0, true );
        InsertVertexCommand command2=new InsertVertexCommand(new TestHandler(), map, new TestViewportPane(new Dimension(500,500)), new EditUtils.StaticShapeProvider(hole), Point.valueOf(10,15), 0, true );

        assertEquals(0, map.getCoords(10,10).size());
        assertEquals(0, map.getCoords(10,15).size());
       
        command1.run(new NullProgressMonitor());
View Full Code Here

        handler=new TestHandler();
        features=UDIGTestUtil.createTestFeatures("DifferenceFeatureTests", new Geometry[]{line, poly}, new String[]{"line", "poly"});   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
        map = MapTests.createNonDynamicMapAndRenderer(MapTests.createGeoResource(features, true), new Dimension(500,500));
       
        Envelope env=map.getBounds(null);
        map.getRenderManagerInternal().setMapDisplay(new TestViewportPane(new Dimension((int)env.getWidth(),(int)env.getHeight())));
        map.setViewportModelInternal(new ViewportModelImpl(){
           @Override
        public AffineTransform worldToScreenTransform() {
            return new AffineTransform();
        }
View Full Code Here

   
    @Test
    public void testRunAndUndo() throws Exception {
        EditBlackboard map=new EditBlackboard(SCREEN.x, SCREEN.y, transform, layerToWorld);
       
        InsertVertexCommand command1=new InsertVertexCommand(new TestHandler(), map, new TestViewportPane(new Dimension(500,500)),
                new EditUtils.StaticShapeProvider(map.getGeoms().get(0).getShell()), Point.valueOf(10,10), 0, true );
        InsertVertexCommand command2=new InsertVertexCommand(new TestHandler(), map, new TestViewportPane(new Dimension(500,500)),
                new EditUtils.StaticShapeProvider(map.getGeoms().get(0).getShell()), Point.valueOf(10,15),0, true );

        assertEquals(0, map.getCoords(10,10).size());
        assertEquals(0, map.getCoords(10,15).size());       
       
View Full Code Here

TOP

Related Classes of org.locationtech.udig.TestViewportPane

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.