Package org.locationtech.udig.project.ui.render.displayAdapter

Examples of org.locationtech.udig.project.ui.render.displayAdapter.ViewportPane


    public SelectionCommandFactory getSelectionFactory() {
        return selectionFactory;
    }
    public void sendCommand( IDrawCommand command ) {
        command.setMap(getMap());
        ViewportPane viewportPane = ((ViewportPane) getRenderManagerInternal().getMapDisplay());
        viewportPane.addDrawCommand(command);
        Rectangle validArea;
        try{
        validArea = command.getValidArea();
        }catch (Exception e) {
            validArea=null;
        }
        if( validArea!=null )
            viewportPane.repaint(validArea.x, validArea.y, validArea.width, validArea.height);
        else
            viewportPane.repaint();
    }
View Full Code Here


        final Layer layer = (Layer) adaptableFeature.getAdapter(Layer.class);

        IDrawCommand command = DrawCommandFactory.getInstance().createDrawFeatureCommand(feature,
                layer);

        ViewportPane pane = (ViewportPane) layer.getMapInternal().getRenderManager()
                .getMapDisplay();
        pane.addDrawCommand(command);

        PlatformGIS.syncInDisplayThread(PlatformUI.getWorkbench().getDisplay(), new Runnable(){
            public void run() {

                boolean result;
                result = MessageDialog.openConfirm(PlatformUI.getWorkbench().getDisplay()
                        .getActiveShell(), Messages.DeleteFeature_confirmation_title,
                        Messages.DeleteFeature_confirmation_text);

                if (result) {
                    UndoableMapCommand c = EditCommandFactory.getInstance().createDeleteFeature(
                            feature, layer);
                    executeCommand(c, layer.getMap());
                }
            }
        });
        command.setValid(false);
        pane.repaint();

    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.render.displayAdapter.ViewportPane

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.