Package org.locationtech.udig.mapgraphic

Examples of org.locationtech.udig.mapgraphic.MapGraphicChooserDialog


        return graphic!=null;
    }

    public void perform() {
        graphic = null;
        MapGraphicChooserDialog dialog = new MapGraphicChooserDialog(Display.getCurrent().getActiveShell(), false);
        dialog.setBlockOnOpen(true);
       
        dialog.open();
       
        if( dialog.getReturnCode() == Window.OK ){
            List<MapGraphicResource> selectedResources = dialog.getSelectedResources();
            if( selectedResources!=null && !selectedResources.isEmpty()){
                this.graphic = selectedResources.get(0);
            }
        }
    }
View Full Code Here


    public void init( IWorkbenchWindow window ) {
    }

    public void run( IAction action ) {
        MapGraphicChooserDialog d = new MapGraphicChooserDialog(Display.getCurrent().getActiveShell(), true);
        d.open();
       
        List<IGeoResource> resources = new ArrayList<IGeoResource>();
        for( IGeoResource geoResource : d.getSelectedResources() ) {
            resources.add(geoResource);
        }
        ApplicationGIS.addLayersToMap(null, resources, -1);

View Full Code Here

    private void queryForMapGraphic() {
        final Display display = findDisplay();
        display.asyncExec(new Runnable(){
            public void run() {
                MapGraphicChooserDialog dialog = new MapGraphicChooserDialog(display
                        .getActiveShell(), false);
                dialog.open();
                if (dialog.getSelectedResources().isEmpty()) {
                    layer = NULL;
                } else {
                    IGeoResource resource = dialog.getSelectedResources().get(0);
                    setMapGraphic((MapGraphicResource) resource);
                }
                setDirty(true);

            }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.mapgraphic.MapGraphicChooserDialog

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.