comparison src/java/de/intevation/mxd/reader/FillSymbolReader.java @ 181:0bde090506f9

Added comments.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 11 Jul 2011 14:28:38 +0200
parents f4eb506499f5
children df4e0946ef02
comparison
equal deleted inserted replaced
180:f4eb506499f5 181:0bde090506f9
25 * The logger. 25 * The logger.
26 */ 26 */
27 private static final Logger logger = 27 private static final Logger logger =
28 Logger.getLogger(FillSymbolReader.class); 28 Logger.getLogger(FillSymbolReader.class);
29 29
30 /**
31 * Private member.
32 */
30 private ISymbol symbol; 33 private ISymbol symbol;
31 private IFillSymbol fillSymbol; 34 private IFillSymbol fillSymbol;
32 35
33 public FillSymbolReader() throws Exception{ 36 /**
37 * Default constructor.
38 */
39 public FillSymbolReader()
40 throws Exception {
34 logger.debug("contructor()"); 41 logger.debug("contructor()");
35 this.symbol = null; 42 this.symbol = null;
36 this.fillSymbol = null; 43 this.fillSymbol = null;
37 } 44 }
38 45
39 public FillSymbolReader(ISymbol symbol) throws Exception{ 46 /**
47 * Constructor with symbol.
48 *
49 * @param symbol The symbol used to display polygons.
50 */
51 public FillSymbolReader(ISymbol symbol)
52 throws Exception {
40 logger.debug("contructor(ISymbol)"); 53 logger.debug("contructor(ISymbol)");
41 this.symbol = symbol; 54 this.symbol = symbol;
42 this.fillSymbol = null; 55 this.fillSymbol = null;
43 } 56 }
44 57
45 public FillSymbolReader(IFillSymbol symbol) throws Exception{ 58 /**
59 * Constructor with symbol.
60 *
61 * @param symbol The symbol used to display polygons.
62 */
63 public FillSymbolReader(IFillSymbol symbol)
64 throws Exception {
46 logger.debug("contructor(ILineSymbol)"); 65 logger.debug("contructor(ILineSymbol)");
47 this.fillSymbol = symbol; 66 this.fillSymbol = symbol;
48 this.symbol= null; 67 this.symbol= null;
49 } 68 }
50 69
70 /**
71 * Read the symbol attributes.
72 *
73 * @return DOM element containing the symbol attributes.
74 */
51 public Element read() { 75 public Element read() {
52 ISymbolReader sreader = null; 76 ISymbolReader sreader = null;
53 if(symbol != null) { 77 if(symbol != null) {
54 try { 78 try {
55 if(symbol instanceof SimpleFillSymbol) { 79 if(symbol instanceof SimpleFillSymbol) {
115 sreader.read(); 139 sreader.read();
116 } 140 }
117 return parent; 141 return parent;
118 } 142 }
119 143
144 /**
145 * Sets the symbol to read.
146 *
147 * @param the symbol used to display polygons.
148 */
120 public void setSymbol(ISymbol sym) { 149 public void setSymbol(ISymbol sym) {
121 this.symbol = sym; 150 this.symbol = sym;
122 this.fillSymbol = null; 151 this.fillSymbol = null;
123 } 152 }
124 153
154 /**
155 * Sets the symbol to read.
156 *
157 * @param the symbol used to display polygons.
158 */
125 public void setSymbol(IFillSymbol sym) { 159 public void setSymbol(IFillSymbol sym) {
126 this.symbol = null; 160 this.symbol = null;
127 this.fillSymbol = sym; 161 this.fillSymbol = sym;
128 } 162 }
129 163
164 /**
165 * Determine whether this reader can be used to read the symbol.
166 *
167 * @param sym The ArcGIS symbol.
168 */
130 public boolean canRead(ISymbol sym) { 169 public boolean canRead(ISymbol sym) {
131 if(sym instanceof SimpleFillSymbol || 170 if(sym instanceof SimpleFillSymbol ||
132 sym instanceof MarkerFillSymbol || 171 sym instanceof MarkerFillSymbol ||
133 sym instanceof MultiLayerFillSymbol || 172 sym instanceof MultiLayerFillSymbol ||
134 sym instanceof LineFillSymbol) { 173 sym instanceof LineFillSymbol) {
137 else { 176 else {
138 return false; 177 return false;
139 } 178 }
140 } 179 }
141 180
181 /**
182 * Determine whether this reader can be used to read the symbol.
183 *
184 * @param sym The ArcGIS symbol.
185 */
142 public boolean canRead(IFillSymbol sym) { 186 public boolean canRead(IFillSymbol sym) {
143 if(sym instanceof SimpleFillSymbol || 187 if(sym instanceof SimpleFillSymbol ||
144 sym instanceof MarkerFillSymbol || 188 sym instanceof MarkerFillSymbol ||
145 sym instanceof MultiLayerFillSymbol || 189 sym instanceof MultiLayerFillSymbol ||
146 sym instanceof LineFillSymbol) { 190 sym instanceof LineFillSymbol) {
148 } 192 }
149 else { 193 else {
150 return false; 194 return false;
151 } 195 }
152 } 196 }
153
154 } 197 }
155 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 198 // 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)