Package org.locationtech.udig.tools.edit.support

Examples of org.locationtech.udig.tools.edit.support.EditBlackboard.addPoint()


        bb.addPoint(40,10,editGeom.getShell());
        bb.addPoint(40,40,editGeom.getShell());
        bb.addPoint(10,10,editGeom.getShell());
       
        PrimitiveShape hole = editGeom.newHole();
        bb.addPoint(20,20,hole);
        bb.addPoint(30,20,hole);
        bb.addPoint(30,30,hole);
        bb.addPoint(20,20,hole);
       
        behaviour=new AcceptChangesBehaviour(Polygon.class, false);
View Full Code Here


        bb.addPoint(40,40,editGeom.getShell());
        bb.addPoint(10,10,editGeom.getShell());
       
        PrimitiveShape hole = editGeom.newHole();
        bb.addPoint(20,20,hole);
        bb.addPoint(30,20,hole);
        bb.addPoint(30,30,hole);
        bb.addPoint(20,20,hole);
       
        behaviour=new AcceptChangesBehaviour(Polygon.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
View Full Code Here

        bb.addPoint(10,10,editGeom.getShell());
       
        PrimitiveShape hole = editGeom.newHole();
        bb.addPoint(20,20,hole);
        bb.addPoint(30,20,hole);
        bb.addPoint(30,30,hole);
        bb.addPoint(20,20,hole);
       
        behaviour=new AcceptChangesBehaviour(Polygon.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
        command.setMap(handler.getContext().getMap());
View Full Code Here

       
        PrimitiveShape hole = editGeom.newHole();
        bb.addPoint(20,20,hole);
        bb.addPoint(30,20,hole);
        bb.addPoint(30,30,hole);
        bb.addPoint(20,20,hole);
       
        behaviour=new AcceptChangesBehaviour(Polygon.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
        command.setMap(handler.getContext().getMap());
        command.run(new NullProgressMonitor());
View Full Code Here

        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom editGeom = bb.getGeoms().get(0);

        handler.setCurrentShape(editGeom.getShell());

        bb.addPoint(10,10,editGeom.getShell());
        bb.addPoint(40,10,editGeom.getShell());
    
        SimpleFeatureType type = DataUtilities.createType("MultiLine", "*geom:MultiLineString"); //$NON-NLS-1$ //$NON-NLS-2$
        feature = SimpleFeatureBuilder.template(type, feature.getID());
        ((TestLayer)handler.getContext().getMap().getMapLayers().get(0)).setSchema(type);
View Full Code Here

        EditGeom editGeom = bb.getGeoms().get(0);

        handler.setCurrentShape(editGeom.getShell());

        bb.addPoint(10,10,editGeom.getShell());
        bb.addPoint(40,10,editGeom.getShell());
    
        SimpleFeatureType type = DataUtilities.createType("MultiLine", "*geom:MultiLineString"); //$NON-NLS-1$ //$NON-NLS-2$
        feature = SimpleFeatureBuilder.template(type, feature.getID());
        ((TestLayer)handler.getContext().getMap().getMapLayers().get(0)).setSchema(type);
        ((Map)handler.getContext().getMap()).getEditManagerInternal().setEditFeature(feature, layer);
View Full Code Here

        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom editGeom = bb.getGeoms().get(0);

        handler.setCurrentShape(editGeom.getShell());

        bb.addPoint(10,10,editGeom.getShell());
        bb.addPoint(40,10,editGeom.getShell());
       
        // test create LineString
        behaviour=new AcceptChangesBehaviour(LineString.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
View Full Code Here

        EditGeom editGeom = bb.getGeoms().get(0);

        handler.setCurrentShape(editGeom.getShell());

        bb.addPoint(10,10,editGeom.getShell());
        bb.addPoint(40,10,editGeom.getShell());
       
        // test create LineString
        behaviour=new AcceptChangesBehaviour(LineString.class, false);
        UndoableMapCommand command = behaviour.getCommand(handler);
        command.setMap(handler.getContext().getMap());
View Full Code Here

        AcceptChangesBehaviour behaviour=new AcceptChangesBehaviour(Point.class, false);

        EditBlackboard bb = handler.getEditBlackboard();
        EditGeom editGeom = bb.getGeoms().get(0);

        bb.addPoint(10,10,editGeom.getShell());
       
        try{
            behaviour.getCommand(handler);
            fail();
        }catch (IllegalArgumentException e) {
View Full Code Here

        FeatureIterator<SimpleFeature> features = layer.getResource(FeatureSource.class, null).getFeatures().features();
        SimpleFeature next = features.next();
        assertEquals( toCoord(bb,10,10), ((Geometry) next.getDefaultGeometry()).getCoordinates()[0] );
        assertEquals(Point.class, feature.getDefaultGeometry().getClass());
       
        bb.addPoint(40,10,bb.newGeom(null, null).getShell());
        handler.getCurrentGeom().setChanged(true);

        SimpleFeatureType type = DataUtilities.createType("MultiPoint", "*geom:MultiPoint"); //$NON-NLS-1$ //$NON-NLS-2$
        feature = SimpleFeatureBuilder.template(type, feature.getID());
        ((TestLayer)handler.getContext().getMap().getMapLayers().get(0)).setSchema(type);
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.