Examples of newGeom()


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

        bb.addPoint(20,10, geom1.getShell());
        bb.addPoint(20,20, geom1.getShell());
        bb.addPoint(10,10, geom1.getShell());
        handler.setCurrentShape(geom1.getShell());
       
        EditGeom geom2 = bb.newGeom(feature2.getID(), null);
       
        bb.addPoint(100,100, geom2.getShell());
        bb.addPoint(200,100, geom2.getShell());
        bb.addPoint(200,200, geom2.getShell());
        bb.addPoint(100,100, geom2.getShell());
View Full Code Here

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

     */
    @Test
    public void testCreateFeature() throws Exception {
        EditBlackboard bb = handler.getEditBlackboard();
       
        EditGeom geom1 = bb.newGeom("newOne", ShapeType.LINE); //$NON-NLS-1$
        bb.addPoint(10,10, geom1.getShell());
        bb.addPoint(20,10, geom1.getShell());
        bb.addPoint(20,20, geom1.getShell());
        bb.addPoint(10,10, geom1.getShell());
       
View Full Code Here

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

        bb.addPoint(20,10, geom1.getShell());
        bb.addPoint(20,20, geom1.getShell());
        bb.addPoint(10,10, geom1.getShell());
       
       
        EditGeom geom2 = bb.newGeom(feature.getID(), null);
        bb.addPoint(100,100, geom2.getShell());
        bb.addPoint(200,100, geom2.getShell());
        bb.addPoint(200,200, geom2.getShell());
        bb.addPoint(100,100, geom2.getShell());
        handler.setCurrentShape(geom2.getShell());
View Full Code Here

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

       
        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
            public GeneralPath create( int width, int height ) {
                GeneralPath path=new GeneralPath();
View Full Code Here

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

      for (Coordinate coord : coordinates) {
        array.add(coord);
      }
      Iterator<Coordinate> coorIt = array.iterator();

      EditGeom newEditGeom = bb.newGeom("", ShapeType.LINE); //$NON-NLS-1$
      PrimitiveShape shape = newEditGeom.getShell();
      handler.setCurrentShape(shape);
      handler.setCurrentState(EditState.MODIFYING);

      Coordinate coor = null;
View Full Code Here

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

        return "RemoveAllVerticesCommand"; //$NON-NLS-1$
    }

    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() ) {
View Full Code Here

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

            geom.getFeatureIDRef().set(oldID);

            getMap().getEditManagerInternal().setEditFeature(oldFeature, (Layer) oldLayer);
            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());
                }
View Full Code Here

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

        handler.setCurrentState(currentState);
        EditGeom newCurrentGeom=null;
        List<EditGeom> empty = bb.getGeoms();
       
        for( EditGeom original : removed ) {
            EditGeom inBlackboard = bb.newGeom(original.getFeatureIDRef().get(), original.getShapeType());
            inBlackboard.setChanged(original.isChanged());
            if( original == currentGeom )
                newCurrentGeom=inBlackboard;
           
            PrimitiveShape destination = inBlackboard.getShell();
View Full Code Here

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

            geom.getFeatureIDRef().set(oldID);

            getMap().getEditManagerInternal().setEditFeature(oldFeature, (Layer) oldLayer);
            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());
                }
View Full Code Here

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

       
        EditBlackboard editBlackboard = handler.getEditBlackboard(layer);
       
        EditGeom editGeom = editBlackboard.getGeoms().get(0);
        if( editGeom.getShell().getNumPoints()>0 )
            editGeom=editBlackboard.newGeom(null, type);
        else{
            editGeom.setShapeType(type);
        }
       
        this.currentState=handler.getCurrentState();
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.