Package org.geotools.data

Examples of org.geotools.data.FeatureListener


*/
public class EditEventListeners {

    public void createAndAddListener(Layer layer, IProgressMonitor monitor) throws IOException {
        FeatureSource source=layer.getResource(FeatureSource.class, monitor);
        source.addFeatureListener(new FeatureListener(){

            public void changed( FeatureEvent featureEvent ) {
                switch( featureEvent.getEventType() ) {
                case FeatureEvent.FEATURES_ADDED:
                    // do something
View Full Code Here


           
            CopyFeatureCollection c = new CopyFeatureCollection(schema, features, monitor, worked,
                    mt, attributeMap, targetLayer.layerToMapTransform());
            Envelope env = c.env;
            targetLayer.eSetDeliver(false);
            FeatureListener listener = new FeatureListener() {
            long lastUpdate = System.currentTimeMillis();
            long count = 0;
        public void changed(FeatureEvent event) {
          if(event.getType() == Type.ADDED) {
            count ++;
View Full Code Here

    public Name getName() {
        return getSchema().getName();
    }

    public void addFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = new WrappingFeatureListener(this, listener);
        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }
View Full Code Here

        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }

    public void removeFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = (FeatureListener) listeners.get(listener);
        if (wrapper != null) {
            wrapped.removeFeatureListener(wrapper);
            listeners.remove(listener);
        }
    }
View Full Code Here

    /**
     * Used to connect/disconnect a FeatureListener if any map layer listeners are registered.
     */
    protected synchronized void connectDataListener(boolean listen) {
        if (sourceListener == null) {
            sourceListener = new FeatureListener() {
                public void changed(FeatureEvent featureEvent) {
                    fireMapLayerListenerLayerChanged(MapLayerEvent.DATA_CHANGED);
                }
            };
        }
View Full Code Here

    public Name getName() {
        return getSchema().getName();
    }

    public void addFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = new WrappingFeatureListener(this, listener);
        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }
View Full Code Here

        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }

    public void removeFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = (FeatureListener) listeners.get(listener);
        if (wrapper != null) {
            wrapped.removeFeatureListener(wrapper);
            listeners.remove(listener);
        }
    }
View Full Code Here

    public Name getName() {
        return getSchema().getName();
    }

    public void addFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = new WrappingFeatureListener(this, listener);
        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }
View Full Code Here

        listeners.put(listener, wrapper);
        wrapped.addFeatureListener(wrapper);
    }

    public void removeFeatureListener(FeatureListener listener) {
        FeatureListener wrapper = (FeatureListener) listeners.get(listener);
        if (wrapper != null) {
            wrapped.removeFeatureListener(wrapper);
            listeners.remove(listener);
        }
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.FeatureListener

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.