Mercurial > mxd2map
comparison src/java/de/intevation/mxd/reader/ClassBreakRendererReader.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/ClassBreakRendererReader.java@cbd67b1100d8 |
children | 40c0b4e5f91a |
comparison
equal
deleted
inserted
replaced
25:cbd67b1100d8 | 26:3e24fffdf2bb |
---|---|
1 //package de.intevation.mxd.reader; | |
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.carto.ClassBreaksRenderer; | |
9 | |
10 /** | |
11 * Reads the ClassBreaksRender Object Attributes. | |
12 * | |
13 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
14 */ | |
15 public class ClassBreakRendererReader implements IRendererReader{ | |
16 | |
17 //Member | |
18 private static final Logger logger = | |
19 Logger.getLogger(ClassBreakRendererReader.class); | |
20 | |
21 private ClassBreaksRenderer renderer; | |
22 | |
23 //Constructor | |
24 public ClassBreakRendererReader(IFeatureRenderer renderer) throws Exception{ | |
25 logger.debug("contructor()"); | |
26 if(renderer instanceof ClassBreaksRenderer) | |
27 this.renderer = (ClassBreaksRenderer)renderer; | |
28 else | |
29 throw new Exception("Not a ClassBreaksRenderer!"); | |
30 } | |
31 | |
32 | |
33 //Methods | |
34 public boolean read() throws IOException{ | |
35 logger.debug("read()"); | |
36 System.out.println("--------------------"); | |
37 System.out.println("Renderer information:"); | |
38 System.out.println("Ramp\t\t = " + renderer.getColorRamp()); | |
39 System.out.println("Class count\t\t = " + renderer.getClassCount()); | |
40 | |
41 for(int i = 0; i < renderer.getClassCount(); i++){ | |
42 System.out.println("Class " + i + "\t\t = " + renderer.esri_getClass(i)); | |
43 } | |
44 System.out.println("Break count\t\t = " + renderer.getBreakCount()); | |
45 for(int i = 0; i < renderer.getBreakCount(); i++){ | |
46 System.out.println("Break " + i + "\t\t = " + renderer.getBreak(i)); | |
47 } | |
48 System.out.println(""); | |
49 return true; | |
50 } | |
51 | |
52 public void getRenderer() throws IOException{ | |
53 logger.debug("getRenderer() -> not implemented jet."); | |
54 } | |
55 } | |
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |