Statistics
| Revision:

gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.lib / org.gvsig.vectorediting.lib.prov / org.gvsig.vectorediting.lib.prov.circlecr / src / main / java / org / gvsig / vectorediting / lib / prov / circlecr / CircumferenceCDEditingProviderFactory.java @ 2866

History | View | Annotate | Download (2.25 KB)

1 159 llmarques
/**
2
 * gvSIG. Desktop Geographic Information System.
3 88 fdiaz
 *
4 159 llmarques
 * Copyright ? 2007-2014 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23 88 fdiaz
 */
24 159 llmarques
25 88 fdiaz
package org.gvsig.vectorediting.lib.prov.circlecr;
26
27
import org.gvsig.fmap.geom.Geometry;
28
import org.gvsig.tools.dynobject.DynObject;
29
import org.gvsig.tools.service.spi.Provider;
30
import org.gvsig.tools.service.spi.ProviderServices;
31
import org.gvsig.vectorediting.lib.api.EditingServiceInfo;
32 2616 fdiaz
import org.gvsig.vectorediting.lib.spi.AbstractEditingProviderFactory;
33 88 fdiaz
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceinfo;
34
35 2866 fdiaz
public class CircumferenceCDEditingProviderFactory extends AbstractEditingProviderFactory {
36 88 fdiaz
37 2866 fdiaz
    public static final String PROVIDER_NAME = "insert-circumference-cd";
38 88 fdiaz
39 159 llmarques
    private final static String PROVIDER_DESCRIPTION =
40 2866 fdiaz
        "Creates circumferences from the center and diametre";
41 88 fdiaz
42 2866 fdiaz
    public CircumferenceCDEditingProviderFactory() {
43 2616 fdiaz
        super(PROVIDER_NAME, PROVIDER_DESCRIPTION);
44 159 llmarques
    }
45 88 fdiaz
46 2616 fdiaz
47
    @Override
48 159 llmarques
    public EditingServiceInfo getServiceInfo() {
49
        EditingServiceInfo serviceInfo =
50 170 llmarques
            new DefaultEditingServiceinfo(PROVIDER_NAME, "", true, null,
51 1201 jjdelcerro
                new int[] { Geometry.TYPES.LINE, Geometry.TYPES.MULTILINE, Geometry.TYPES.CURVE, Geometry.TYPES.MULTICURVE });
52 88 fdiaz
53 159 llmarques
        return serviceInfo;
54
    }
55 88 fdiaz
56 159 llmarques
    @Override
57
    protected Provider doCreate(DynObject parameters, ProviderServices services) {
58 2866 fdiaz
        return new CircumferenceCDEditingProvider(services, parameters);
59 159 llmarques
    }
60 88 fdiaz
61
}