Package org.locationtech.udig.ui

Examples of org.locationtech.udig.ui.CRSChooserDialog


            ZoomingDialog dialog = new ZoomingDialog(getSite().getShell(), pdialog, ZoomingDialog
                    .calculateBounds(button));
            dialog.open();
            */
            CoordinateReferenceSystem crs = getMap().getViewportModel().getCRS();           
            CRSChooserDialog dialog = new CRSChooserDialog( getSite().getShell(), crs );
            int code = dialog.open();
            if( Window.OK == code ){
                CoordinateReferenceSystem result = dialog.getResult();
                if( !result.equals(crs)){
                    getMap().sendCommandSync(new ChangeCRSCommand(result));
                    updateCRS();
                }
            }
View Full Code Here


        final Button crsButton = new Button(mainComposite, SWT.PUSH);
        crsButton.setText("...");
        crsButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                CoordinateReferenceSystem crs = ApplicationGIS.getActiveMap().getViewportModel().getCRS();
                CRSChooserDialog dialog = new CRSChooserDialog(crsButton.getShell(), crs);
                int code = dialog.open();
                if (Window.OK == code) {
                    CoordinateReferenceSystem result = dialog.getResult();
                    crsText.setText(result.getName().toString());
                    crsText.setData(result);
                    newCrs = result;
                }
                validate();
View Full Code Here

          if (initVal == null) {
            initVal = allDatastores[0].getSchema()
                .getCoordinateReferenceSystem();
          }
          CRSChooserDialog dialog = new CRSChooserDialog(display
              .getActiveShell(), initVal);
          if (dialog.open() == Window.CANCEL) {
            return;
          }

          CoordinateReferenceSystem result = dialog.getResult();
          if (result != null) {
            for (ShapefileDataStore ds : allDatastores) {
              CoordinateReferenceSystem crs = ds.getSchema().getCoordinateReferenceSystem();
              if (!CRS.equalsIgnoreMetadata(result, crs))
                ds.forceSchemaCRS(result);
View Full Code Here

        final Button crsButton = new Button(composite, SWT.BORDER);
        crsButton.setText(Messages.GraticuleCRSConfigurator_Select);
        crsButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent e ) {
                CoordinateReferenceSystem crs = getCRS(getStyle());
                CRSChooserDialog dialog = new CRSChooserDialog(crsButton.getShell(), crs);
                int code = dialog.open();
                if (Window.OK == code) {
                    try {
                        crs = dialog.getResult();
                        crsText.setText(EPSG+CRS.lookupEpsgCode(crs,false));
                    } catch (FactoryException ex) {
                        MapGraphicPlugin.log(Messages.GraticuleGraphic_Error, ex);
                        getLayer().setStatus(Layer.ERROR);
                        getLayer().setStatusMessage(ex.getMessage());
View Full Code Here

            ZoomingDialog dialog = new ZoomingDialog(getSite().getShell(), pdialog, ZoomingDialog
                    .calculateBounds(button));
            dialog.open();
            */
            CoordinateReferenceSystem crs = getMap().getViewportModel().getCRS();           
            CRSChooserDialog dialog = new CRSChooserDialog( getSite().getShell(), crs );
            int code = dialog.open();
            if( Window.OK == code ){
                CoordinateReferenceSystem result = dialog.getResult();
                if( !result.equals(crs)){
                    getMap().sendCommandSync(new ChangeCRSCommand(result));
                    updateCRS();
                }
            }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.ui.CRSChooserDialog

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.