Package org.locationtech.udig.project.render

Examples of org.locationtech.udig.project.render.IRenderMetricsFactory


     *      org.eclipse.core.runtime.IConfigurationElement)
     */
    public void process( IExtension extension, IConfigurationElement element ) {

        try {
            IRenderMetricsFactory createExecutableExtension = (IRenderMetricsFactory) element.createExecutableExtension("class"); //$NON-NLS-1$
           
            InternalRenderMetricsFactory metricsFactory = new InternalRenderMetricsFactory(createExecutableExtension, element);            
            rFactories.add(new IdRenderMetricsFactory(metricsFactory, element.getNamespaceIdentifier() + "." + element.getAttribute("id"))); //$NON-NLS-1$ //$NON-NLS-2$);
           
        } catch (CoreException e) {
View Full Code Here


     *      org.eclipse.core.runtime.IConfigurationElement)
     */
    public void process( IExtension extension, IConfigurationElement element ) {

        try {
            IRenderMetricsFactory createExecutableExtension = (IRenderMetricsFactory) element.createExecutableExtension("class"); //$NON-NLS-1$
            InternalRenderMetricsFactory metricsFactory = new InternalRenderMetricsFactory(
                    createExecutableExtension, element);

           
            List<IGeoResource> data = layer.getGeoResources();
View Full Code Here

        return Collections.emptyList();
      }
        }
        for( InternalRenderMetrics internalRenderMetrics : availableRenderers ) {
            IRenderContext renderContext = internalRenderMetrics.getRenderContext();
            IRenderMetricsFactory renderMetricsFactory = internalRenderMetrics.getRenderMetricsFactory();
            AbstractRenderMetrics createMetrics = renderMetricsFactory.createMetrics(renderContext);
            metrics.add(createMetrics);
        }
        return metrics;
    }
View Full Code Here

     */
    private List<AbstractRenderMetrics> createRenderMetrics(Collection<IRenderMetricsFactory> factories, Layer layer, ReferencedEnvelope bounds){
        ArrayList<AbstractRenderMetrics> metrics = new ArrayList<AbstractRenderMetrics>();
       
        for( Iterator<IRenderMetricsFactory> iterator = factories.iterator(); iterator.hasNext(); ) {
            IRenderMetricsFactory renderMetricsFactory = (IRenderMetricsFactory) iterator.next();
           
            List<IGeoResource> data = layer.getGeoResources();
            for( IGeoResource resource : data ) {
                RenderContext context;
                try{
                    if (IMultiLayerRenderer.class.isAssignableFrom(renderMetricsFactory.getRendererType())){
                        context = new CompositeRenderContextImpl();
                    }else{
                        context = new RenderContextImpl(layer instanceof SelectionLayer);
                    }
                }catch (Throwable e){
                    context = new RenderContextImpl(layer instanceof SelectionLayer);
                }
               
                context.setMapInternal(manager.getMapInternal());
                context.setRenderManagerInternal(manager);
                context.setLayerInternal(layer);
                context.setGeoResourceInternal(resource);
                context.setImageSize(new Dimension(tilesize, tilesize));
                context.setImageBounds(bounds);
               
                try {
                    if (renderMetricsFactory.canRender(context)){
                        AbstractRenderMetrics metric = ((InternalRenderMetricsFactory.InternalRenderMetrics) renderMetricsFactory.createMetrics(context)).delegate;
                        // we need to assign an id here for the metrics sorting
                        metric.setId(  ((RenderMetricsFactoryExtensionPointProcessor.IdRenderMetricsFactory)renderMetricsFactory).getId() );
                        metrics.add(metric);
                       
                    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.render.IRenderMetricsFactory

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.