root / trunk / libraries / libArcIMS / src / org / gvsig / remoteClient / arcims / styling / symbols / SimpleLineSymbol.java @ 8109
History | View | Annotate | Download (4.63 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2006 Prodevelop and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* Prodevelop Integraci?n de Tecnolog?as SL
|
34 |
* Conde Salvatierra de ?lava , 34-10
|
35 |
* 46004 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963 510 612
|
39 |
* +34 963 510 968
|
40 |
* gis@prodevelop.es
|
41 |
* http://www.prodevelop.es
|
42 |
*/
|
43 |
|
44 |
/**
|
45 |
*
|
46 |
*/
|
47 |
package org.gvsig.remoteClient.arcims.styling.symbols; |
48 |
|
49 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
50 |
|
51 |
import org.gvsig.remoteClient.arcims.utils.ServiceInfoTags; |
52 |
|
53 |
|
54 |
/**
|
55 |
* @author jsanz
|
56 |
*
|
57 |
*/
|
58 |
public class SimpleLineSymbol extends AbstractSymbol implements IArcIMSSymbol { |
59 |
public static final String TAG = ServiceInfoTags.tSIMPLELINESYMBOL; |
60 |
private String color; |
61 |
private String width; |
62 |
private String type; |
63 |
private String captype; |
64 |
private String jointype; |
65 |
private String transparency; |
66 |
|
67 |
/**
|
68 |
* The constructor sets default values
|
69 |
*/
|
70 |
public SimpleLineSymbol() {
|
71 |
color = "0,0,0";
|
72 |
width = "0";
|
73 |
type = SymbolUtils.LINE_TYPE_SOLID; |
74 |
captype = SymbolUtils.CAP_TYPE_ROUND; |
75 |
jointype = SymbolUtils.JOIN_TYPE_BEVEL; |
76 |
transparency = "1";
|
77 |
} |
78 |
|
79 |
public String toString() { |
80 |
return "<" + TAG + getParam() + "/>\r\n"; |
81 |
} |
82 |
|
83 |
protected String getParam() { |
84 |
String param = ""; |
85 |
|
86 |
if (SymbolUtils.isVoid(color)) {
|
87 |
param += (" color=\"" + color + "\""); |
88 |
} |
89 |
|
90 |
if (SymbolUtils.isVoid(width)) {
|
91 |
param += (" width=\"" + width + "\""); |
92 |
} |
93 |
|
94 |
if (SymbolUtils.isVoid(type)) {
|
95 |
param += (" type=\"" + type + "\""); |
96 |
} |
97 |
|
98 |
if (SymbolUtils.isVoid(captype)) {
|
99 |
param += (" captype=\"" + captype + "\""); |
100 |
} |
101 |
|
102 |
if (SymbolUtils.isVoid(jointype)) {
|
103 |
param += (" jointype=\"" + jointype + "\""); |
104 |
} |
105 |
|
106 |
if (SymbolUtils.isVoid(transparency)) {
|
107 |
param += (" transparency=\"" + transparency + "\""); |
108 |
} |
109 |
|
110 |
return param;
|
111 |
} |
112 |
|
113 |
/**
|
114 |
* @return Returns the color.
|
115 |
*/
|
116 |
public String getColor() { |
117 |
return color;
|
118 |
} |
119 |
|
120 |
/**
|
121 |
* @param color The color to set.
|
122 |
*/
|
123 |
public void setColor(String color) { |
124 |
this.color = color;
|
125 |
} |
126 |
|
127 |
/**
|
128 |
* @return Returns the type.
|
129 |
*/
|
130 |
public String getType() { |
131 |
return type;
|
132 |
} |
133 |
|
134 |
/**
|
135 |
* @param type The type to set.
|
136 |
*/
|
137 |
public void setType(String type) { |
138 |
this.type = type;
|
139 |
} |
140 |
|
141 |
/**
|
142 |
* @return Returns the width.
|
143 |
*/
|
144 |
public String getWidth() { |
145 |
return width;
|
146 |
} |
147 |
|
148 |
/**
|
149 |
* @param width The width to set.
|
150 |
*/
|
151 |
public void setWidth(String width) { |
152 |
this.width = width;
|
153 |
} |
154 |
|
155 |
/**
|
156 |
* @return Returns the captype.
|
157 |
*/
|
158 |
public String getCaptype() { |
159 |
return captype;
|
160 |
} |
161 |
|
162 |
/**
|
163 |
* @param captype The captype to set.
|
164 |
*/
|
165 |
public void setCaptype(String captype) { |
166 |
this.captype = captype;
|
167 |
} |
168 |
|
169 |
/**
|
170 |
* @return Returns the jointype.
|
171 |
*/
|
172 |
public String getJointype() { |
173 |
return jointype;
|
174 |
} |
175 |
|
176 |
/**
|
177 |
* @param jointype The jointype to set.
|
178 |
*/
|
179 |
public void setJointype(String jointype) { |
180 |
this.jointype = jointype;
|
181 |
} |
182 |
|
183 |
/**
|
184 |
* @return Returns the transparency.
|
185 |
*/
|
186 |
public String getTransparency() { |
187 |
return transparency;
|
188 |
} |
189 |
|
190 |
/**
|
191 |
* @param transparency The transparency to set.
|
192 |
*/
|
193 |
public void setTransparency(String transparency) { |
194 |
this.transparency = transparency;
|
195 |
} |
196 |
|
197 |
/* (non-Javadoc)
|
198 |
* @see org.gvsig.remoteClient.arcims.styling.symbols.IArcIMSSymbol#getFSymbol()
|
199 |
*/
|
200 |
public FSymbol getFSymbol() {
|
201 |
return ArcImsFSymbolFactory.getFSymbol(this); |
202 |
} |
203 |
} |