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

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


    @Ignore
    @Test
    public void testCutHole() throws Exception {
        EditBlackboard editBlackboard = handler.getEditBlackboard();
        EditGeom geom = editBlackboard.getGeoms().get(0);
        editBlackboard.addPoint(0,0,geom.getShell());
        editBlackboard.addPoint(40,0,geom.getShell());
        editBlackboard.addPoint(40,40,geom.getShell());
        editBlackboard.addPoint(0,40,geom.getShell());
        editBlackboard.addPoint(0,0,geom.getShell());
        handler.setCurrentShape(geom.getShell());
View Full Code Here


    @Test
    public void testCutHole() throws Exception {
        EditBlackboard editBlackboard = handler.getEditBlackboard();
        EditGeom geom = editBlackboard.getGeoms().get(0);
        editBlackboard.addPoint(0,0,geom.getShell());
        editBlackboard.addPoint(40,0,geom.getShell());
        editBlackboard.addPoint(40,40,geom.getShell());
        editBlackboard.addPoint(0,40,geom.getShell());
        editBlackboard.addPoint(0,0,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
View Full Code Here

    public void testCutHole() throws Exception {
        EditBlackboard editBlackboard = handler.getEditBlackboard();
        EditGeom geom = editBlackboard.getGeoms().get(0);
        editBlackboard.addPoint(0,0,geom.getShell());
        editBlackboard.addPoint(40,0,geom.getShell());
        editBlackboard.addPoint(40,40,geom.getShell());
        editBlackboard.addPoint(0,40,geom.getShell());
        editBlackboard.addPoint(0,0,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
        handler.getMouseTracker().setDragStarted(Point.valueOf(10,10));
View Full Code Here

        EditBlackboard editBlackboard = handler.getEditBlackboard();
        EditGeom geom = editBlackboard.getGeoms().get(0);
        editBlackboard.addPoint(0,0,geom.getShell());
        editBlackboard.addPoint(40,0,geom.getShell());
        editBlackboard.addPoint(40,40,geom.getShell());
        editBlackboard.addPoint(0,40,geom.getShell());
        editBlackboard.addPoint(0,0,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
        handler.getMouseTracker().setDragStarted(Point.valueOf(10,10));
       
View Full Code Here

        EditGeom geom = editBlackboard.getGeoms().get(0);
        editBlackboard.addPoint(0,0,geom.getShell());
        editBlackboard.addPoint(40,0,geom.getShell());
        editBlackboard.addPoint(40,40,geom.getShell());
        editBlackboard.addPoint(0,40,geom.getShell());
        editBlackboard.addPoint(0,0,geom.getShell());
        handler.setCurrentShape(geom.getShell());
       
        handler.getMouseTracker().setDragStarted(Point.valueOf(10,10));
       
        MapMouseEvent event=new MapMouseEvent(null, 20,10,MapMouseEvent.NONE,MapMouseEvent.BUTTON1, MapMouseEvent.BUTTON1);
View Full Code Here

        SimpleFeature feature = resource.getFeatures().features().next();
        ((EditManager)handler.getContext().getEditManager()).setEditFeature(feature, (Layer) layer);
       
        final EditBlackboard editBlackboard = handler.getEditBlackboard();
        PrimitiveShape shell = editBlackboard.getGeoms().get(0).getShell();
        editBlackboard.addPoint(100,100,shell);
        shell.getEditGeom().setShapeType(ShapeType.POINT);
        editBlackboard.newGeom("newone", null); //$NON-NLS-1$
       
        CreateShapeBehaviour behav=new CreateShapeBehaviour(new ShapeFactory(){
            @Override
View Full Code Here

    public void rollback( IProgressMonitor monitor ) throws Exception {
        EditBlackboard bb = oldGeom.getEditBlackboard();
        EditGeom geom = bb.newGeom(oldGeom.getFeatureIDRef().get(), oldGeom.getShapeType());
        for( Point p : oldGeom.getShell() ) {
            bb.addPoint(p.getX(), p.getY(), geom.getShell());
        }
       
        for( PrimitiveShape shape : oldGeom.getHoles() ) {
            PrimitiveShape hole = geom.newHole();
            for( Point p : shape ) {
View Full Code Here

        }
       
        for( PrimitiveShape shape : oldGeom.getHoles() ) {
            PrimitiveShape hole = geom.newHole();
            for( Point p : shape ) {
                bb.addPoint(p.getX(), p.getY(), hole);
            }
        }

    }
View Full Code Here

            if (deselectCreatedFeature) {
                EditBlackboard bb = geom.getEditBlackboard();
                EditGeom newGeom = bb.newGeom(geom.getFeatureIDRef().get(), geom.getShapeType());
                PrimitiveShape shell = geom.getShell();
                for( org.locationtech.udig.tools.edit.support.Point point : shell ) {
                    bb.addPoint(point.getX(), point.getY(), newGeom.getShell());
                }

                List<PrimitiveShape> holes = geom.getHoles();
                for( PrimitiveShape primitiveShape : holes ) {
                    PrimitiveShape newHole = newGeom.newHole();
View Full Code Here

                List<PrimitiveShape> holes = geom.getHoles();
                for( PrimitiveShape primitiveShape : holes ) {
                    PrimitiveShape newHole = newGeom.newHole();
                    for( Point point2 : primitiveShape ) {
                        bb.addPoint(point2.getX(), point2.getY(), newHole);
                    }
                }
                geom = newGeom;
            } else {
                EditUtils.instance.refreshLayer(layer, Collections.singleton(addFeatureCommand
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.