Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/MarkerSymbolReader.java @ 78:df17d4c2f9eb
Merged in Raimunds changes
author | Stephan Holl <stephan.holl@intevation.de> |
---|---|
date | Thu, 26 May 2011 16:13:50 +0200 |
parents | 260748e3d08f |
children | 7eba97e8201b |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MarkerSymbolReader.java Thu May 26 16:12:38 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MarkerSymbolReader.java Thu May 26 16:13:50 2011 +0200 @@ -7,6 +7,7 @@ import org.apache.log4j.Logger; import com.esri.arcgis.display.ISymbol; +import com.esri.arcgis.display.SimpleMarkerSymbol; import com.esri.arcgis.display.ArrowMarkerSymbol; import com.esri.arcgis.display.CharacterMarkerSymbol; import com.esri.arcgis.display.PictureMarkerSymbol; @@ -28,14 +29,27 @@ private ISymbol symbol; - public MarkerSymbolReader(ISymbol symbol) throws Exception{ - logger.debug("contructor()"); + public MarkerSymbolReader(ISymbol symbol) + throws Exception { + logger.debug("contructor(ISymbol)"); this.symbol = symbol; } + public MarkerSymbolReader() { + logger.debug("contructor()"); + this.symbol = null; + } + public Element read() throws Exception { + if(symbol == null) { + return parent; + } + ISymbolReader sreader = null; - if(symbol instanceof ArrowMarkerSymbol) { + if(symbol instanceof SimpleMarkerSymbol) { + sreader = new SimpleMarkerSymbolReader(symbol); + } + else if(symbol instanceof ArrowMarkerSymbol) { sreader = new ArrowMarkerSymbolReader(symbol); } else if(symbol instanceof CharacterMarkerSymbol) { @@ -59,4 +73,22 @@ } return parent; } + + public void setSymbol(ISymbol sym) { + this.symbol = sym; + } + + public boolean canRead(ISymbol sym) { + if(sym instanceof SimpleMarkerSymbol || + sym instanceof ArrowMarkerSymbol || + sym instanceof PictureMarkerSymbol || + sym instanceof CharacterMarkerSymbol || + sym instanceof MultiLayerMarkerSymbol) { + return true; + } + else { + return false; + } + } + }