Statistics
| Revision:

root / trunk / libraries / libArcIMS / src / org / gvsig / remoteClient / arcims / styling / symbols / SimpleMarkerSymbol.java @ 8109

History | View | Annotate | Download (3.29 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
package org.gvsig.remoteClient.arcims.styling.symbols;
45

    
46
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
47

    
48
import org.gvsig.remoteClient.arcims.utils.ServiceInfoTags;
49

    
50

    
51
/**
52
 * @author jsanz
53
 *
54
 */
55
public class SimpleMarkerSymbol extends AbstractSymbol implements IArcIMSSymbol {
56
    public static final String TAG = ServiceInfoTags.tSIMPLEMARKERSYMBOL;
57
    private String color;
58
    private String width;
59
    private String type;
60

    
61
    /**
62
     * @param color
63
     * @param width
64
     * @param type
65
     */
66
    public SimpleMarkerSymbol() {
67
        color = "0,0,0";
68
        width = "3";
69
        type = SymbolUtils.POINT_TYPE_CIRCLE;
70
    }
71

    
72
    public String toString() {
73
        return "<" + TAG + getParam() + "/>\r\n";
74
    }
75

    
76
    /**
77
     * @return Returns the color.
78
     */
79
    public String getColor() {
80
        return color;
81
    }
82

    
83
    /**
84
     * @param color The color to set.
85
     */
86
    public void setColor(String color) {
87
        this.color = color;
88
    }
89

    
90
    /**
91
     * @return Returns the type.
92
     */
93
    public String getType() {
94
        return type;
95
    }
96

    
97
    /**
98
     * @param type The type to set.
99
     */
100
    public void setType(String type) {
101
        this.type = type;
102
    }
103

    
104
    /**
105
     * @return Returns the width.
106
     */
107
    public String getWidth() {
108
        return width;
109
    }
110

    
111
    /**
112
     * @param width The width to set.
113
     */
114
    public void setWidth(String width) {
115
        this.width = width;
116
    }
117

    
118
    protected String getParam() {
119
        String param = "";
120

    
121
        if (SymbolUtils.isVoid(color)) {
122
            param += (" color=\"" + color + "\"");
123
        }
124

    
125
        if (SymbolUtils.isVoid(width)) {
126
            param += (" width=\"" + width + "\"");
127
        }
128

    
129
        if (SymbolUtils.isVoid(type)) {
130
            param += (" type=\"" + type + "\"");
131
        }
132

    
133
        return param;
134
    }
135

    
136
    /* (non-Javadoc)
137
     * @see org.gvsig.remoteClient.arcims.styling.symbols.IArcIMSSymbol#getFSymbol()
138
     */
139
    public FSymbol getFSymbol() {
140
        return ArcImsFSymbolFactory.getFSymbol(this);
141
    }
142
}