Package org.locationtech.udig.project.internal.render

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,
                    RenderPackage.VIEWPORT_MODEL__RENDER_MANAGER_INTERNAL,
                    oldRenderManagerInternal, newRenderManagerInternal);
View Full Code Here


    public double getScaleDenominator() {
        if (!validState()) {
            return -1;
        }
        RenderManager renderManager = getRenderManagerInternal();
        ReferencedEnvelope bounds2 = getBounds();
        if (renderManager == null || renderManager.getMapDisplay() == null)
            return -1;

        IMapDisplay display = renderManager.getMapDisplay();
        return ScaleUtils.calculateScaleDenominator(bounds2, display.getDisplaySize(),
                display.getDPI());

    }
View Full Code Here

    /**
     * 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

        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

        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

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

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

        showCommitDialog(dialogMessage);

    }
View Full Code Here

        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

            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

     * @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

    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

TOP

Related Classes of org.locationtech.udig.project.internal.render.RenderManager

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.