Package org.geotools.renderer

Examples of org.geotools.renderer.RenderListener


    public PDFMaxSizeEnforcer(final GTRenderer renderer, final PdfGraphics2D graphics, final int maxSize) {
        this.maxSize = maxSize;
        this.pdfBytes = graphics.getContent().getInternalBuffer();

        if (maxSize > 0) {
            renderer.addRenderListener(new RenderListener() {

                public void featureRenderer(SimpleFeature feature) {
                    if(pdfBytes.size() >  maxSize) {
                        renderer.stopRendering();
                    }
View Full Code Here


        this.renderer = renderer;
        this.maxErrors = maxErrors;
        this.errors = 0;

        if (maxErrors > 0) {
            renderer.addRenderListener(new RenderListener() {

                public void featureRenderer(SimpleFeature feature) {
                }

                public void errorOccurred(Exception e) {
View Full Code Here

    RenderingHints hints = new RenderingHints(hintsMap);

    renderer.setJava2DHints(hints);
    renderer.setContext(mapContext);

    renderer.addRenderListener(new RenderListener() {
      public void errorOccurred(final Exception ex) {
        renderer.stopRendering();
      }

      public void featureRenderer(SimpleFeature feature) {
View Full Code Here

       
        DefaultMapContext mc = new DefaultMapContext(DefaultGeographicCRS.WGS84);
        mc.addLayer(squareFS, style);
       
        renderer.setContext(mc);
        renderer.addRenderListener(new RenderListener() {
       
            public void featureRenderer(SimpleFeature feature) {
                count++;
            }
       
View Full Code Here

        MapContext context = new MapContext();
        context.addLayer(coverage, style);
        StreamingRenderer renderer = new StreamingRenderer();
        renderer.setContext(context);

        RenderListener listener = new RenderListener() {
            public void featureRenderer(SimpleFeature feature) {}

            public void errorOccurred(Exception e) {
                e.printStackTrace();
                fail("Failed to render coverage");
View Full Code Here

        protected BlockingQueue<RenderingRequest> getRequestsQueue() {
            return queue;
       
        };
        sr.setMapContent(mc);
        sr.addRenderListener(new RenderListener() {
            public void featureRenderer(SimpleFeature feature) {
                assertTrue(commandsCount.get() > 0);
                features++;
            }
            public void errorOccurred(Exception e) {
View Full Code Here

        mapContext.addLayer(fs, createLineStyle());
       
        // setup the renderer and listen for errors
        final StreamingRenderer sr = new StreamingRenderer();
        sr.setContext(mapContext);
        sr.addRenderListener(new RenderListener() {
            public void featureRenderer(SimpleFeature feature) {
                features++;
            }
            public void errorOccurred(Exception e) {
                errors++;
View Full Code Here

                return new RenderingBlockingQueue(1);
           
        };
        sr.setMapContent(mapContent);
        final List<Exception> exceptions = new ArrayList<Exception>();
        sr.addRenderListener(new RenderListener() {
            public void featureRenderer(SimpleFeature feature) {
                features++;
            }
           
            public void errorOccurred(Exception e) {
View Full Code Here

        renderer = new StreamingRenderer();
        content = new MapContent();
        content.getViewport().setCoordinateReferenceSystem(DefaultGeographicCRS.WGS84);

        renderer.setMapContent(content);
        renderer.addRenderListener(new RenderListener() {

            public void featureRenderer(SimpleFeature feature) {
                renderedIds.add(feature.getID());
            }
View Full Code Here

        StreamingRenderer sr = new StreamingRenderer();
        sr.setMapContent(mc);

        // collect rendered features
        final List<SimpleFeature> features = new ArrayList<SimpleFeature>();
        RenderListener renderedFeaturesCollector = new RenderListener() {
           
            @Override
            public void featureRenderer(SimpleFeature feature) {
                features.add(feature);
            }
View Full Code Here

TOP

Related Classes of org.geotools.renderer.RenderListener

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.