Package org.geotools.swing.event

Examples of org.geotools.swing.event.MapPaneEvent


        MapContent mapContent = new MapContent();
        mapPane.setMapContent(mapContent);
       
        assertTrue(listener.await(MapPaneEvent.Type.NEW_MAPCONTENT, WAIT_TIMEOUT));
       
        MapPaneEvent event = listener.getEvent(MapPaneEvent.Type.NEW_MAPCONTENT);
        Object o = event.getData();
        assertNotNull(o);
        assertTrue(o instanceof MapContent);
        assertTrue(o == mapContent);
    }
View Full Code Here


        listener.setExpected(MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
       
        mapPane.setDisplayArea(WORLD);
        assertTrue(listener.await(MapPaneEvent.Type.DISPLAY_AREA_CHANGED, WAIT_TIMEOUT));
       
        MapPaneEvent event = listener.getEvent(MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
        assertNotNull(event.getData());
        assertTrue(event.getData() instanceof ReferencedEnvelope);
       
        // Since no screen area has been set the envelope sent via the
        // event should be equal to that passed to setDisplayArea
        ReferencedEnvelope eventEnv = (ReferencedEnvelope) event.getData();
        assertTrue(WORLD.boundsEquals2D(eventEnv, TOL));
    }
View Full Code Here

                } else if (mapContent.getViewport().getBounds().isEmpty()) {
                    setFullExtent();
                    doSetDisplayArea(fullExtent);
                }

                publishEvent(new MapPaneEvent(this,
                        MapPaneEvent.Type.DISPLAY_AREA_CHANGED,
                        getDisplayArea()));

                acceptRepaintRequests.set(true);
                drawLayers(true);
View Full Code Here

                    setFullExtent();
                    doSetDisplayArea(mapContent.getViewport().getBounds());
                }
            }

            MapPaneEvent event = new MapPaneEvent(
                    this, MapPaneEvent.Type.NEW_MAPCONTENT, mapContent);
            publishEvent(event);
           
            drawLayers(false);
        }
View Full Code Here

        } else {
            pendingDisplayArea = new ReferencedEnvelope(envelope);
        }

        // Publish the resulting display area with the event
        publishEvent( new MapPaneEvent(this,
                MapPaneEvent.Type.DISPLAY_AREA_CHANGED,
                getDisplayArea()) );
    }
View Full Code Here

     * Publishes a {@linkplain MapPaneEvent} of type
     * {@code MapPaneEvent.Type.RENDERING_STARTED} to listeners.
     */
    @Override
    public void onRenderingStarted(RenderingExecutorEvent ev) {
        publishEvent(new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STARTED));
    }
View Full Code Here

            labelCache.clear();
        }

        clearLabelCache.set(false);
        repaint();
        publishEvent(new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED));
    }
View Full Code Here

     * Publishes a {@linkplain MapPaneEvent} of type
     * {@code MapPaneEvent.Type.RENDERING_STOPPED} to listeners.
     */
    @Override
    public void onRenderingFailed(RenderingExecutorEvent ev) {
        publishEvent(new MapPaneEvent(this, MapPaneEvent.Type.RENDERING_STOPPED));
    }
View Full Code Here

TOP

Related Classes of org.geotools.swing.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.