Examples of RenderManager


Examples of org.locationtech.udig.project.internal.render.RenderManager

    /**
     * This method will calculate the current width based on ScaleUtils and
     * the current RenderManager.
     */
    public void setScale(double scaleDenominator) {
        RenderManager rm = getRenderManagerInternal();
        IMapDisplay display = rm.getMapDisplay();
        ReferencedEnvelope newExtents = ScaleUtils.calculateBoundsFromScale(scaleDenominator,
                display.getDisplaySize(), display.getDPI(), getBounds());
        setWidth(newExtents.getWidth());
    }
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

        setMapInternal(impl.getMapInternal());
        setRenderManagerInternal(impl.getRenderManagerInternal());
    }

    public IViewportModel getViewportModel() {
        RenderManager renderManagerInternal2 = getRenderManagerInternal();
        if (renderManagerInternal2 != null) {
            return renderManagerInternal2.getViewportModelInternal();
        }
        return getMap().getViewportModel();
    }
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

        org.locationtech.udig.project.internal.Map mapInternal = getMapInternal();
        if (mapInternal == null) {
            // we're in the middle of a map closing or map deleteing or something.
            return Collections.emptySet();
        }
        RenderManager manager = mapInternal.getRenderManagerInternal();
        if (manager == null) {
            return Collections.emptySet();
        }
        RendererCreator rendererCreator = manager.getRendererCreator();
        if (rendererCreator == null) {
            return Collections.emptySet();
        }
        Collection<AbstractRenderMetrics> metrics = rendererCreator
                .getAvailableRendererMetrics(this);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

        for (Layer layer : layers) {
            layer.eSetDeliver(false);
        }

        RenderManager rm = getMapInternal().getRenderManagerInternal();
        if (rm != null) {
            rm.disableRendering();
        }

        showCommitDialog(dialogMessage);

    }
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

        for (Layer layer1 : layers) {
            layer1.eSetDeliver(true);
        }

        RenderManager rm = getMapInternal().getRenderManagerInternal();
        if (rm != null) {
            rm.enableRendering();
        }

        for (Layer layer : getMapInternal().getLayersInternal()) {
            FeatureStore<?, ?> resource = layer.getResource(FeatureStore.class, ProgressManager
                    .instance().get());
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case RenderPackage.RENDER_MANAGER: {
            RenderManager renderManager = (RenderManager) theEObject;
            T result = caseRenderManager(renderManager);
            if (result == null)
                result = caseIRenderManager(renderManager);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

     * @param boundsStrategy the strategy to use for setting the bounds on the viewport model
     * @param baseMapBounds the bounds of the reference map, depending on the boundsStrategy it may be null.
     * @return a render context
     */
    public static RenderContext configureMapForRendering(Map map, final Dimension destinationSize, final int dpi, BoundsStrategy boundsStrategy, ReferencedEnvelope baseMapBounds) {
        RenderManager manager = RenderFactory.eINSTANCE.createRenderManagerViewer();

        map.setRenderManagerInternal(manager);

        RenderContext tools = new RenderContextImpl();
        tools.setMapInternal(map);
        tools.setRenderManagerInternal(manager);

        ProjectUIPlugin
                .trace(
                        ApplicationGIS.class,
                        "Firing size changed event. Changing to size: " + destinationSize.width + " by " + destinationSize.height, null); //$NON-NLS-1$ //$NON-NLS-2$

        manager.setMapInternal(map);
        manager.setMapDisplay(new IMapDisplay(){
            public java.awt.Dimension getDisplaySize() {
                return new java.awt.Dimension(destinationSize.width,
                        destinationSize.height);
            }

            public int getWidth() {
                return destinationSize.width;
            }

            public int getHeight() {
                return destinationSize.height;
            }

            public int getDPI() {
                return dpi;
            }
        });

        ViewportModel model = map.getViewportModelInternal();

        manager.setViewportModelInternal(model);

        model.setCRS(map.getViewportModel().getCRS());
        model.zoomToBox(map.getViewportModel().getBounds());

        ProjectUIPlugin.trace(ApplicationGIS.class,
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

    public GlassPane(ViewportPane parent){
        this.parent = parent;

        // create a new site
        Map map = parent.getMapEditor().getMap();
        RenderManager manager = map.getRenderManagerInternal();
        site = new GlassPaneSite(manager, map);
    }
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetRenderManagerInternal(RenderManager newRenderManagerInternal,
            NotificationChain msgs) {
        RenderManager oldRenderManagerInternal = renderManagerInternal;
        renderManagerInternal = newRenderManagerInternal;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    ProjectPackage.MAP__RENDER_MANAGER_INTERNAL, oldRenderManagerInternal,
                    newRenderManagerInternal);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

                @Override
                public void refreshImage() {
                    //do nothing
                }
            });
        RenderManager rm=map.getRenderManagerInternal();
        rm.setMapDisplay(new TestMapDisplay(displaySize));
        rm.getRendererCreator().getLayers().add(layer);
           
            map.getViewportModelInternal().setCRS(layer.getCRS());
           
            final Runnable job = new Runnable() {
                @Override
                public void run() {
                    map.getViewportModelInternal().zoomToExtent();
                }
            };
            final Thread jobThread = new Thread(job);
            jobThread.start();
            jobThread.join();
           
        MultiLayerRenderer renderer=(MultiLayerRenderer) RenderFactory.eINSTANCE.createCompositeRenderer();
        RenderContext context=new CompositeRenderContextImpl();
        context.setRenderManagerInternal(rm);
        context.setMapInternal(map);
            context.setGeoResourceInternal(layer.getGeoResources().get(0));
            context.setLayerInternal(layer);
        renderer.setContext(context);
        context = rm.getRendererCreator().getConfiguration().iterator().next();
        ((CompositeRenderContext) renderer.getContext()).addContexts(Collections.singleton(context));
        RenderExecutor ex=RenderFactory.eINSTANCE.createRenderExecutor(renderer);
        rm.setRenderExecutor(ex);
        }
    return map;
  }
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.