Examples of IMap


Examples of org.locationtech.udig.project.IMap

    BufferedImage image = new BufferedImage(width, height,
        BufferedImage.TYPE_INT_ARGB);

    Graphics2D g = image.createGraphics();
   
    IMap renderedMap;
    try {
      monitor.worked(1);
      pattern = Messages.ExportMapToImageWizard_renderingTaskname;
      args = new Object[]{map.getName()};
      monitor.setTaskName(MessageFormat.format(pattern, args));
      int scaleDenom = MapSelectorPageWithScaleColumn.getScaleDenom(map);
      BoundsStrategy boundsStrategy = new BoundsStrategy(scaleDenom);
     
      //final Map mapCopy = (Map) EcoreUtil.copy((EObject) map);
      final Map mapCopy = (Map) ApplicationGIS.copyMap(map);
       
      DrawMapParameter drawMapParameter =
          new DrawMapParameter(g,
                               new java.awt.Dimension(width, height),
                               mapCopy,
                               boundsStrategy,
                               imageSettingsPage.getFormat().getDPI(),
                               imageSettingsPage.getSelectionHandling(),
                               monitor);
     
      renderedMap = ApplicationGIS.drawMap(drawMapParameter);
    }
    finally {
      g.dispose();
    }
    monitor.worked(1);
    pattern = Messages.ExportMapToImageWizard_writingTaskname;
    args = new Object[]{map.getName()};
    monitor.setTaskName(MessageFormat.format(pattern, args));
    imageSettingsPage.getFormat().write(renderedMap, image, destination);
    String baseFile = destination.getPath().substring(0, destination.getPath().lastIndexOf("."));
    createWorldFile(renderedMap.getViewportModel().worldToScreenTransform().createInverse(), baseFile);
    createProjectionFile(baseFile, renderedMap.getViewportModel().getCRS());

    addToCatalog(destination);
   
    monitor.done();
  }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

     */
    private LayerAction downAction() {
        downAction = new LayerAction(){
            public void run() {
                if( selection.isEmpty() ) return;
                IMap map = getCurrentMap();
                // map.sendCommandSync( new LayerMoveDownCommand( selection ));
                map.sendCommandASync( new LayerMoveDownCommand( selection ));
            }
        };
        downAction.setEnabled(false);
        downAction.setToolTipText(Messages.LayersView_down_tooltip);
        downAction.setImageDescriptor(ProjectUIPlugin.getDefault().getImageDescriptor(ISharedImages.DOWN_CO));
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.