Examples of overVertex()


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

       
        if( handler.getCurrentState()==EditState.CREATING && addPoint){
            Point clickPoint = Point.valueOf(e.x, e.y);
            EditBlackboard editBlackboard = handler.getEditBlackboard(handler.getEditLayer());
           
            Point destination = editBlackboard.overVertex(clickPoint, PreferenceUtil.instance().getVertexRadius());
            if( destination==null ){
               
                AddVertexCommand addVertexCommand = new AddVertexCommand(handler, editBlackboard, clickPoint);

                try {
View Full Code Here

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

        handler.getBehaviours().add(creator);

        ILayer selectedLayer = handler.getEditLayer();
        EditBlackboard editBlackboard = handler.getEditBlackboard(selectedLayer);
        int vertexRadius = PreferenceUtil.instance().getVertexRadius();
        Point nearestPoint = editBlackboard.overVertex(dragStarted, vertexRadius);

        if( nearestPoint==null )
            nearestPoint=dragStarted;
       
        initShapePath(nearestPoint);
View Full Code Here

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

        EditBlackboard editBlackboard2 = handler.getEditBlackboard(handler.getEditLayer());
        editBlackboard2.startBatchingEvents();
        try {
            if (tracker == null) {
                handler.lock(this);
                Point closestPoint = editBlackboard2.overVertex(Point.valueOf(e.x, e.y),
                        PreferenceUtil.instance().getVertexRadius(), false);
                Map<EditGeom, Boolean> changedStatus=new HashMap<EditGeom, Boolean>();
                for( EditGeom geom : editBlackboard2.getGeoms() ) {
                    changedStatus.put(geom, geom.isChanged());
                }
View Full Code Here

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

    public boolean isValid( EditToolHandler handler, MapMouseEvent e, EventType eventType ) {
        boolean currentGeomNotNull = handler.getCurrentGeom()!=null;
        boolean eventTypePressed = eventType==EventType.PRESSED;
        boolean button1Changed=e.button==MapMouseEvent.BUTTON1;
        EditBlackboard editBlackboard = handler.getEditBlackboard(handler.getEditLayer());
        boolean overPoint = editBlackboard.overVertex(Point.valueOf(e.x,e.y), PreferenceUtil.instance().getVertexRadius())!=null;

        return currentGeomNotNull && eventTypePressed && button1Changed
        && !e.modifiersDown() && e.buttons==MapMouseEvent.BUTTON1 && overPoint;
    }
View Full Code Here

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

        ILayer editLayer = handler.getEditLayer();
       
        EditBlackboard editBlackboard = handler.getEditBlackboard(editLayer);
        final int vertexRadius = PreferenceUtil.instance().getVertexRadius();
       
        Point vertexOver=editBlackboard.overVertex(point, vertexRadius);
       
        if( vertexOver == null ) {
            // we are not over any points
            return true;            
        }
View Full Code Here

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

    }

    public UndoableMapCommand getCommand( EditToolHandler handler, MapMouseEvent e,
            EventType eventType ) {
        EditBlackboard editBlackboard = handler.getCurrentShape().getEditBlackboard();
        Point point=editBlackboard.overVertex(Point.valueOf(e.x, e.y),
                PreferenceUtil.instance().getVertexRadius());
        if( point.equals(handler.getCurrentShape().getPoint(0))){
            List<UndoableMapCommand> commands=new ArrayList<UndoableMapCommand>();
            commands.add(new ReversePointsInShapeCommand(handler, handler.getCurrentShape()));
            commands.add(new SetEditStateCommand(handler, EditState.CREATING));
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.