rrenkert@26: //package de.intevation.mxd.reader; rrenkert@25: rrenkert@25: import java.io.IOException; rrenkert@25: rrenkert@25: import org.apache.log4j.Logger; rrenkert@25: rrenkert@25: import com.esri.arcgis.carto.IFeatureRenderer; rrenkert@25: import com.esri.arcgis.carto.ClassBreaksRenderer; rrenkert@25: rrenkert@25: /** rrenkert@25: * Reads the ClassBreaksRender Object Attributes. rrenkert@25: * rrenkert@25: * @author Raimund Renkert rrenkert@25: */ rrenkert@25: public class ClassBreakRendererReader implements IRendererReader{ rrenkert@25: rrenkert@25: //Member rrenkert@25: private static final Logger logger = rrenkert@25: Logger.getLogger(ClassBreakRendererReader.class); rrenkert@25: rrenkert@25: private ClassBreaksRenderer renderer; rrenkert@25: rrenkert@25: //Constructor rrenkert@25: public ClassBreakRendererReader(IFeatureRenderer renderer) throws Exception{ rrenkert@25: logger.debug("contructor()"); rrenkert@25: if(renderer instanceof ClassBreaksRenderer) rrenkert@25: this.renderer = (ClassBreaksRenderer)renderer; rrenkert@25: else rrenkert@25: throw new Exception("Not a ClassBreaksRenderer!"); rrenkert@25: } rrenkert@25: rrenkert@25: rrenkert@25: //Methods rrenkert@25: public boolean read() throws IOException{ rrenkert@25: logger.debug("read()"); rrenkert@25: System.out.println("--------------------"); rrenkert@25: System.out.println("Renderer information:"); rrenkert@25: System.out.println("Ramp\t\t = " + renderer.getColorRamp()); rrenkert@25: System.out.println("Class count\t\t = " + renderer.getClassCount()); rrenkert@25: rrenkert@25: for(int i = 0; i < renderer.getClassCount(); i++){ rrenkert@25: System.out.println("Class " + i + "\t\t = " + renderer.esri_getClass(i)); rrenkert@25: } rrenkert@25: System.out.println("Break count\t\t = " + renderer.getBreakCount()); rrenkert@25: for(int i = 0; i < renderer.getBreakCount(); i++){ rrenkert@25: System.out.println("Break " + i + "\t\t = " + renderer.getBreak(i)); rrenkert@25: } rrenkert@25: System.out.println(""); rrenkert@25: return true; rrenkert@25: } rrenkert@25: rrenkert@25: public void getRenderer() throws IOException{ rrenkert@25: logger.debug("getRenderer() -> not implemented jet."); rrenkert@25: } rrenkert@25: } rrenkert@25: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :