Mercurial > dive4elements > gnv-client
view gnv-artifacts/src/main/java/de/intevation/gnv/raster/DemuxRingsHandler.java @ 1034:50a5ce7a47b7
Implemented an odv exporter for product type 'Horizontales Schnittprofil' (issue260).
gnv-artifacts/trunk@1082 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 10 May 2010 10:29:55 +0000 |
parents | feae2f9d6c6f |
children | f953c9a559d8 |
line wrap: on
line source
package de.intevation.gnv.raster; import de.intevation.gnv.raster.Vectorizer.Edge; import de.intevation.gnv.raster.Vectorizer.RingsHandler; import java.util.ArrayList; import java.util.List; /** * Ring Handler that demultiplexes to a list of other ring handlers. * Handy if you want to pipe the polygons and line strings produced * by the Vectorize to more than one handler at once. * * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class DemuxRingsHandler implements RingsHandler { /** * The list of internal ring handlers. */ protected ArrayList<RingsHandler> handlers; /** * Default constructor. */ public DemuxRingsHandler() { handlers = new ArrayList<RingsHandler>(); } /** * Add a ring handler to the list of handlers. * @param handler The handler to add to the internal list. */ public void addHandler(RingsHandler handler) { handlers.add(handler); } public void handleRings( List<Edge> rings, int value, int width, int height ) { for (RingsHandler handler: handlers) { handler.handleRings(rings, value, width, height); } } /** * Empties the internal list of ring handlers. */ public void clear() { handlers.clear(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :