Package org.locationtech.udig.project.internal

Examples of org.locationtech.udig.project.internal.Map


    org.locationtech.udig.project.ui.internal.LayersView.LayerAction upAction;

    private MapEditorListener partServiceListener = new MapEditorListener();

    void updateLabels() {
        final Map currentMap;
        synchronized (this) {
            currentMap = this.currentMap;
        }
        if (currentMap == null)
            return;
View Full Code Here


        PlatformGIS.asyncInDisplayThread(new Runnable(){
            public void run() {
                if (PlatformUI.getWorkbench().isClosing())
                    return;

                final Map currentMap;
                synchronized (this) {
                    currentMap = LayersView.this.currentMap;
                }
                if (currentMap == null)
                    return;

                List<Layer> layers = currentMap.getLayersInternal();
                if (!requiresCheckboxUpdate(layers)) {
                    return;
                }

                final List<Layer> checkedLayers = new ArrayList<Layer>();
                for( Layer layer : layers ) {
                    if (layer.isVisible()) {
                        checkedLayers.add(layer);
                    }
                }

                if (viewer != null) {
                    // viewer.refresh(false);
                    viewer.setCheckedElements(checkedLayers.toArray());
                    ILayer selectedLayer = currentMap.getEditManager().getSelectedLayer();
                    if (selectedLayer != null)
                        viewer.setSelection(new StructuredSelection(selectedLayer), true);
                }
            }
View Full Code Here

    }

    @Override
    protected void performApply() {
        summaryControl.applyEdit();
        final Map map = (Map) getElement();

        if (!newName.equals(oldName)) {
            map.setName(newName);
        }
        if (!newAbstract.equals(oldAbstract)) {
            map.setAbstract(newAbstract);
        }
    }
View Full Code Here

    }
   
    @Override
    protected void performDefaults() {
        summaryControl.cancelEdit();
        final Map map = (Map) getElement();
        if( !newAbstract.equals(oldAbstract)){
            newAbstract = oldAbstract;
            abstractData.setInfo(oldAbstract);
            summaryControl.refresh(abstractData);
            map.setAbstract(oldAbstract);
        }
        if( !newName.equals(oldName) ){
            newName = oldName;
            nameData.setInfo(oldName);
            summaryControl.refresh(nameData);
            map.setName(oldName);
        }
    }
View Full Code Here

    public MapCRSPropertyPage() {
    }

    @Override
    public void setElement( IAdaptable element ) {
        Map map;
        if( element instanceof Map){
            map=(Map)element;
        }else{
            map=(Map) element.getAdapter(Map.class);
        }
View Full Code Here

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetMapInternal(Map newMapInternal, NotificationChain msgs) {
        Map oldMapInternal = mapInternal;
        mapInternal = newMapInternal;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    RenderPackage.RENDER_MANAGER__MAP_INTERNAL, oldMapInternal, newMapInternal);
            if (msgs == null)
View Full Code Here

                outlinePage = new PageEditorOutlinePage(this, new TreeViewer());
            }
            return outlinePage;
        }
        if (type.isAssignableFrom(Map.class)) {
            Map found = null;
            for( Box box : page.getBoxes() ) {
                if (box instanceof IAdaptable) {
                    Object obj2 = ((IAdaptable) box).getAdapter(Map.class);
                    if (obj2 instanceof Map) {
                        /*
 
View Full Code Here

      createResources(resources, monitor);
      IProject activeProject = ApplicationGIS.getActiveProject();

      CreateMapCommand command = new CreateMapCommand("NewMap",resources , activeProject);
      activeProject.sendSync(command);
      Map createdMap = (Map) command.getCreatedMap();
      viewer.setMap(createdMap);
      viewer.init(this);

     
      // ---------------
          this.selectionProvider = new MapEditorSelectionProvider();

          selectionProvider.setActiveMap(createdMap, this);
          getSite().setSelectionProvider(selectionProvider);

          selectionProvider.setSelection(new StructuredSelection(new Object[]{createdMap}));
         
          createContextMenu();
         
          if(acquireToolbar()) {
            toolManager = ApplicationGIS.getToolManager();
            IActionBars bars = getViewSite().getActionBars();
        IToolBarManager toolbarManager = bars.getToolBarManager();
            toolManager.contributeModalTools(toolbarManager, bars);
            toolbarManager.add(new Separator());
            toolManager.contributeActionTools(toolbarManager, bars);
            toolManager.setCurrentEditor(this);
          }
          if(createdMap.getLayersInternal().size() > 0) {
            createdMap.getEditManagerInternal().setSelectedLayer(createdMap.getLayersInternal().get(createdMap.getMapLayers().size()-1));
          }
         
          enableDropSupport();
         
          initMap(createdMap);
View Full Code Here

        /*
         * They are being dropped on a Map
         */
        if (getCurrentLocation() == LOCATION_ON && getCurrentTarget() instanceof Map) {
            Map map = (Map) getCurrentTarget();

            /*
             * If all the layers belong to the target map, do nothing.
             */
            if (map.getContextModel().getLayers().containsAll(layers)) {
                return false;
            }
            copyToMap(map, layers);
        }

View Full Code Here

    /**
     * Updates the crs label in the statusbar.
     */
    protected void updateCRS() {
        Map map = getMap();
        if (map == null) {
            getSite().getPage().closeEditor(this, false);
            return;
        }
        CoordinateReferenceSystem crs = map.getViewportModel().getCRS();
        if (crs == null || crs.getName() == null) {
            return;
        }

        final String full = crs.getName().getCode();
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.Map

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.