Mercurial > mxd2map
annotate src/java/de/intevation/mxd/reader/LineSymbolReader.java @ 135:a4ab239509f1
Updated the default values and reader error handling.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 22 Jun 2011 13:55:22 +0200 |
parents | fb93f20478cc |
children | f4eb506499f5 |
rev | line source |
---|---|
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.mxd.reader; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 import java.lang.Exception; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 import org.w3c.dom.Element; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 import org.apache.log4j.Logger; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 import com.esri.arcgis.display.ISymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 import com.esri.arcgis.display.ILineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import com.esri.arcgis.display.MultiLayerLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 import com.esri.arcgis.display.SimpleLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 import com.esri.arcgis.display.MarkerLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 import com.esri.arcgis.display.PictureLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 import com.esri.arcgis.display.CartographicLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 import com.esri.arcgis.display.HashLineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 /** |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 * Wrapper for line symbol reader. |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 * |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 */ |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 public class LineSymbolReader |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 extends AbstractSymbolReader { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 /** |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 * The logger. |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 */ |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 private static final Logger logger = |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 Logger.getLogger(LineSymbolReader.class); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 private ISymbol symbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 private ILineSymbol lineSymbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 public LineSymbolReader() throws Exception{ |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 logger.debug("contructor()"); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 this.symbol = null; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 this.lineSymbol = null; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 public LineSymbolReader(ISymbol symbol) throws Exception{ |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 logger.debug("contructor(ISymbol)"); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 this.symbol = symbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 this.lineSymbol = null; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 public LineSymbolReader(ILineSymbol symbol) throws Exception{ |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 logger.debug("contructor(ILineSymbol)"); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 this.lineSymbol = symbol; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 this.symbol= null; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 |
115
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
53 public Element read() { |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 ISymbolReader sreader = null; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 if(symbol != null) { |
115
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
56 try { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
57 if(symbol instanceof SimpleLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
58 sreader = new SimpleLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
59 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
60 else if(symbol instanceof MarkerLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
61 sreader = new MarkerLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
62 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
63 else if(symbol instanceof PictureLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
64 sreader = new PictureLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
65 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
66 else if(symbol instanceof MultiLayerLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
67 sreader = new MultiLayerLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
68 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
69 else if(symbol instanceof CartographicLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
70 sreader = new CartoLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
71 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
72 else if(symbol instanceof HashLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
73 sreader = new HashLineSymbolReader(symbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
74 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
75 else { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
76 logger.debug("The reader for type " + symbol.getClass().toString() + |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
77 " is not implemented!"); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
78 return parent; |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
79 } |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 } |
115
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
81 catch(Exception e) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
82 logger.error( |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
83 "Could not read the symbol " + |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
84 symbol.getClass().toString()); |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
85 return parent; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
86 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
88 else if(lineSymbol != null) { |
115
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
89 try { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
90 if(lineSymbol instanceof SimpleLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
91 sreader = new SimpleLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
92 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
93 else if(lineSymbol instanceof MarkerLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
94 sreader = new MarkerLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
95 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
96 else if(lineSymbol instanceof PictureLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
97 sreader = new PictureLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
98 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
99 else if(lineSymbol instanceof MultiLayerLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
100 sreader = new MultiLayerLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
101 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
102 else if(lineSymbol instanceof CartographicLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
103 sreader = new CartoLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
104 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
105 else if(lineSymbol instanceof HashLineSymbol) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
106 sreader = new HashLineSymbolReader(lineSymbol); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
107 } |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
108 else { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
109 logger.debug("The reader for type " + |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
110 lineSymbol.getClass().toString() + |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
111 " is not implemented!"); |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
112 return parent; |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
113 } |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
114 } |
115
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
115 catch(Exception e) { |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
116 logger.error( |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
117 "Could not read the symbol " + |
fb93f20478cc
Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
72
diff
changeset
|
118 symbol.getClass().toString()); |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
119 return parent; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
120 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
121 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
122 else { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
123 return parent; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
124 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
125 if (sreader != null) { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
126 sreader.setParent(parent); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
127 sreader.setUtil(util); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
128 sreader.read(); |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
129 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
130 return parent; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
131 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
132 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
133 public void setSymbol(ISymbol sym) { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
134 this.symbol = sym; |
72
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
135 this.lineSymbol = null; |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
136 } |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
137 |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
138 public void setSymbol(ILineSymbol sym) { |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
139 this.lineSymbol = sym; |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
140 this.symbol = null; |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
141 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
142 |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
143 public boolean canRead(ISymbol sym) { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
144 if(sym instanceof SimpleLineSymbol || |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
145 sym instanceof MarkerLineSymbol || |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
146 sym instanceof PictureLineSymbol || |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
147 sym instanceof MultiLayerLineSymbol || |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
148 sym instanceof CartographicLineSymbol || |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
149 sym instanceof HashLineSymbol) { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
150 return true; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
151 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
152 else { |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
153 return false; |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
154 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
155 } |
72
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
156 |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
157 public boolean canRead(ILineSymbol sym) { |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
158 if(sym instanceof SimpleLineSymbol || |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
159 sym instanceof MarkerLineSymbol || |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
160 sym instanceof PictureLineSymbol || |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
161 sym instanceof MultiLayerLineSymbol || |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
162 sym instanceof CartographicLineSymbol || |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
163 sym instanceof HashLineSymbol) { |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
164 return true; |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
165 } |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
166 else { |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
167 return false; |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
168 } |
2cbe423b1fda
Added wrapper for fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
71
diff
changeset
|
169 } |
71
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
170 } |
260748e3d08f
Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
171 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |