comparison src/java/de/intevation/mxd/reader/SimpleRendererReader.java @ 26:3e24fffdf2bb

Moved reader components to reader folder.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 12:26:17 +0200
parents src/java/de/intevation/mxd/SimpleRendererReader.java@cbd67b1100d8
children 40c0b4e5f91a
comparison
equal deleted inserted replaced
25:cbd67b1100d8 26:3e24fffdf2bb
1 //package de.intevation.mxdaderr;
2
3 import java.io.IOException;
4
5 import org.apache.log4j.Logger;
6
7 import com.esri.arcgis.carto.IFeatureRenderer;
8 import com.esri.arcgis.display.ISymbol;
9 import com.esri.arcgis.carto.SimpleRenderer;
10 import com.esri.arcgis.display.SimpleMarkerSymbol;
11
12 /**
13 * Reads simple renderer information.
14 *
15 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
16 */
17 public class SimpleRendererReader implements IRendererReader{
18
19 //Member
20 private ISymbol symbol;
21 private IFeatureRenderer renderer;
22 private static final Logger logger = Logger.getLogger(FeatureLayerReader.class);
23
24 //Constructor
25 public SimpleRendererReader(IFeatureRenderer renderer){
26 this.renderer = renderer;
27 }
28
29
30 //Methods
31 public boolean read() throws IOException{
32 logger.debug("read()");
33 if(renderer instanceof SimpleRenderer){
34 SimpleRenderer sr = (SimpleRenderer)renderer;
35 System.out.println("--------------------");
36 System.out.println("Renderer inforamtion:");
37 System.out.println("Label\t\t = " + sr.getLabel());
38 System.out.println("Description\t\t = " + sr.getDescription());
39 System.out.println("");
40 symbol = sr.getSymbol();
41 try{
42 ISymbolReader isr= new SimpleMarkerSymbolReader(symbol);
43 isr.read();
44 return true;
45 }
46 catch(Exception e){
47 e.printStackTrace();
48 }
49 }
50 return false;
51 }
52
53 public void getRenderer() throws IOException{
54 logger.debug("getRenderer() -> not implemented jet.");
55 }
56 }
57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)