Package org.geotools.swt.event

Examples of org.geotools.swt.event.MapPaneEvent


            if (renderer != null) {
                renderer.setMapContent(this.content);
            }

            MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.NEW_CONTEXT);
            publishEvent(ev);
        }
    }
View Full Code Here


            setTransforms(envelope, curPaintArea);
        }
        ReferencedEnvelope adjustedEnvelope = getDisplayArea();
        content.getViewport().setBounds(adjustedEnvelope);

        MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
        publishEvent(ev);
    }
View Full Code Here

        // swtImage = new Image(this.getDisplay(), awtToSwt(baseImage, curPaintArea.width,
        // curPaintArea.height));
        // if (gc != null && !gc.isDisposed() && swtImage != null)
        // gc.drawImage(swtImage, imageOrigin.x, imageOrigin.y);

        MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED);
        publishEvent(ev);
    }
View Full Code Here

     * {@code MapPaneEvent.Type.RENDERING_STOPPED} to listeners.
     *
     * @see MapPaneListener#onRenderingStopped(org.geotools.swing.event.MapPaneEvent)
     */
    public void onRenderingCancelled() {
        MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED);
        publishEvent(ev);
    }
View Full Code Here

     * {@code MapPaneEvent.Type.RENDERING_STOPPED} to listeners.
     *
     * @see MapPaneListener#onRenderingStopped(org.geotools.swing.event.MapPaneEvent)
     */
    public void onRenderingFailed() {
        MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED);
        publishEvent(ev);
    }
View Full Code Here

                if (mapAOI == null) {
                    return;
                }

                if (redrawBaseImage) {
                    MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STARTED);
                    publishEvent(ev);

                    baseImage = new BufferedImage(curPaintArea.width + 1, curPaintArea.height + 1, BufferedImage.TYPE_INT_ARGB);
                    Graphics2D g2d = baseImage.createGraphics();
                    g2d.fillRect(0, 0, curPaintArea.width + 1, curPaintArea.height + 1);
                    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

                    // renderer.setContext(context);
                    java.awt.Rectangle awtRectangle = Utils.toAwtRectangle(curPaintArea);
                    renderer.paint(g2d, awtRectangle, mapAOI, getWorldToScreenTransform());
                    // swtImage.dispose();

                    if (swtImage != null && !swtImage.isDisposed()) {
                        swtImage.dispose();
                        swtImage = null;
                    }
                    // System.out.println("READRAWBASEIMAGE");
                    swtImage = new Image(getDisplay(), awtToSwt(baseImage, curPaintArea.width + 1, curPaintArea.height + 1));
                }

                if (swtImage != null) {
                    drawFinalImage(swtImage);
                }

                MapPaneEvent ev = new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED);
                publishEvent(ev);
                clearLabelCache = true;
                onRenderingCompleted();
                redrawBaseImage = false;
            }
View Full Code Here

TOP

Related Classes of org.geotools.swt.event.MapPaneEvent

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.