root / trunk / extensions / extDerivedGeometries / src / es / iver / derivedGeom / utils / FShapeTypeNames.java @ 28223
History | View | Annotate | Download (2.26 KB)
1 |
package es.iver.derivedGeom.utils; |
---|---|
2 |
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government
|
4 |
*
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
6 |
* of the Valencian Government (CIT)
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
21 |
* MA 02110-1301, USA.
|
22 |
*
|
23 |
*/
|
24 |
|
25 |
import com.iver.andami.PluginServices; |
26 |
import com.iver.cit.gvsig.fmap.core.FShape; |
27 |
|
28 |
/**
|
29 |
* <p>Utility to convert a shape type in its representation in characters.</p>
|
30 |
*
|
31 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es)
|
32 |
*/
|
33 |
public class FShapeTypeNames { |
34 |
/**
|
35 |
* <p>Returns an <code>String</code> that represents a <code>FShape</code> type.</p>
|
36 |
*
|
37 |
* @param type a type defined in {@link FShape FShape}
|
38 |
* @return an <code>String</code> that represents the type
|
39 |
*/
|
40 |
public static String getFShapeTypeName(int type) { |
41 |
switch(type) {
|
42 |
case FShape.NULL:
|
43 |
return "NULL"; |
44 |
case FShape.POINT:
|
45 |
return PluginServices.getText(null, "POINT"); |
46 |
case FShape.LINE:
|
47 |
return PluginServices.getText(null, "LINE"); |
48 |
case FShape.POLYGON:
|
49 |
return PluginServices.getText(null, "POLYGON"); |
50 |
case FShape.TEXT:
|
51 |
return PluginServices.getText(null, "TEXT"); |
52 |
case FShape.MULTI:
|
53 |
return PluginServices.getText(null, "MULTI"); |
54 |
case FShape.MULTIPOINT:
|
55 |
return PluginServices.getText(null, "MULTIPOINT"); |
56 |
case FShape.CIRCLE:
|
57 |
return PluginServices.getText(null, "CIRCLE"); |
58 |
case FShape.ARC:
|
59 |
return PluginServices.getText(null, "ARC"); |
60 |
case FShape.ELLIPSE:
|
61 |
return PluginServices.getText(null, "ELLIPSE"); |
62 |
case FShape.Z:
|
63 |
return "Z"; |
64 |
default:
|
65 |
return PluginServices.getText(null, "UNKNOWN"); |
66 |
} |
67 |
} |
68 |
} |