comparison src/java/de/intevation/mxd/SimpleRendererReader.java @ 25:cbd67b1100d8

Initial commit of the first prototype.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 11:47:59 +0200
parents
children
comparison
equal deleted inserted replaced
24:c0060abb7457 25:cbd67b1100d8
1 //package de.intevation.mxd.renderer;
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)