comparison src/java/de/intevation/mxd/reader/MarkerSymbolReader.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
26 * The logger. 26 * The logger.
27 */ 27 */
28 private static final Logger logger = 28 private static final Logger logger =
29 Logger.getLogger(MarkerSymbolReader.class); 29 Logger.getLogger(MarkerSymbolReader.class);
30 30
31 /**
32 * Private member.
33 */
31 private ISymbol symbol; 34 private ISymbol symbol;
32 private IMarkerSymbol markerSymbol; 35 private IMarkerSymbol markerSymbol;
33 36
37 /**
38 * Constructor with symbol.
39 *
40 * @param symbol The symbol used to display points.
41 */
34 public MarkerSymbolReader(ISymbol symbol) 42 public MarkerSymbolReader(ISymbol symbol)
35 throws Exception { 43 throws Exception {
36 logger.debug("contructor(ISymbol)"); 44 logger.debug("contructor(ISymbol)");
37 this.symbol = symbol; 45 this.symbol = symbol;
38 this.markerSymbol = null; 46 this.markerSymbol = null;
39 } 47 }
40 48
49 /**
50 * Constructor with symbol.
51 *
52 * @param symbol The symbol used to display points.
53 */
41 public MarkerSymbolReader(IMarkerSymbol symbol) 54 public MarkerSymbolReader(IMarkerSymbol symbol)
42 throws Exception { 55 throws Exception {
43 logger.debug("contructor(ISymbol)"); 56 logger.debug("contructor(ISymbol)");
44 this.markerSymbol = symbol; 57 this.markerSymbol = symbol;
45 this.symbol = null; 58 this.symbol = null;
46 } 59 }
47 60
61 /**
62 * Default constructor.
63 */
48 public MarkerSymbolReader() { 64 public MarkerSymbolReader() {
49 logger.debug("contructor()"); 65 logger.debug("contructor()");
50 this.symbol = null; 66 this.symbol = null;
51 this.markerSymbol = null; 67 this.markerSymbol = null;
52 } 68 }
53 69
70 /**
71 * Reads the symbol attributes.
72 *
73 * @return The DOM element containing the attributes.
74 */
54 public Element read() { 75 public Element read() {
55 logger.debug("read()"); 76 logger.debug("read()");
56 ISymbolReader sreader = null; 77 ISymbolReader sreader = null;
57 78
58 if(symbol != null) { 79 if(symbol != null) {
125 sreader.read(); 146 sreader.read();
126 } 147 }
127 return parent; 148 return parent;
128 } 149 }
129 150
151 /**
152 * Sets the symbol to read.
153 *
154 * @param sym The symbol used to display points.
155 */
130 public void setSymbol(ISymbol sym) { 156 public void setSymbol(ISymbol sym) {
131 this.symbol = sym; 157 this.symbol = sym;
132 this.markerSymbol = null; 158 this.markerSymbol = null;
133 } 159 }
134 160
161 /**
162 * Sets the symbol to read.
163 *
164 * @param sym The symbol used to display points.
165 */
135 public void setSymbol(IMarkerSymbol sym) { 166 public void setSymbol(IMarkerSymbol sym) {
136 this.markerSymbol = sym; 167 this.markerSymbol = sym;
137 this.symbol = null; 168 this.symbol = null;
138 } 169 }
139 170
171 /**
172 * Determine whether this reader can be used to read the symbol.
173 *
174 * @param sym The ArcGIS symbol.
175 */
140 public boolean canRead(ISymbol sym) { 176 public boolean canRead(ISymbol sym) {
141 if(sym instanceof SimpleMarkerSymbol || 177 if(sym instanceof SimpleMarkerSymbol ||
142 sym instanceof ArrowMarkerSymbol || 178 sym instanceof ArrowMarkerSymbol ||
143 sym instanceof PictureMarkerSymbol || 179 sym instanceof PictureMarkerSymbol ||
144 sym instanceof CharacterMarkerSymbol || 180 sym instanceof CharacterMarkerSymbol ||
148 else { 184 else {
149 return false; 185 return false;
150 } 186 }
151 } 187 }
152 188
189 /**
190 * Determine whether this reader can be used to read the symbol.
191 *
192 * @param sym The ArcGIS symbol.
193 */
153 public boolean canRead(IMarkerSymbol sym) { 194 public boolean canRead(IMarkerSymbol sym) {
154 if(sym instanceof SimpleMarkerSymbol || 195 if(sym instanceof SimpleMarkerSymbol ||
155 sym instanceof ArrowMarkerSymbol || 196 sym instanceof ArrowMarkerSymbol ||
156 sym instanceof PictureMarkerSymbol || 197 sym instanceof PictureMarkerSymbol ||
157 sym instanceof CharacterMarkerSymbol || 198 sym instanceof CharacterMarkerSymbol ||
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)