Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.editing.app / org.gvsig.editing.app.mainplugin / src / main / java / org / gvsig / editing / IEditionManager.java @ 40557

History | View | Annotate | Download (2.86 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 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 3
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
 */
24
package org.gvsig.editing;
25

    
26
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
27
import org.gvsig.editing.layers.ILayerEdited;
28
import org.gvsig.fmap.dal.exception.DataException;
29
import org.gvsig.fmap.dal.exception.ReadException;
30
import org.gvsig.fmap.dal.feature.EditableFeature;
31
import org.gvsig.fmap.dal.feature.Feature;
32
import org.gvsig.fmap.dal.feature.FeatureStore;
33
import org.gvsig.fmap.geom.Geometry;
34
import org.gvsig.fmap.mapcontext.exceptions.CancelEditingLayerException;
35
import org.gvsig.fmap.mapcontext.layers.FLayer;
36
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
37
import org.gvsig.fmap.mapcontrol.MapControl;
38
import org.gvsig.tools.observer.Observable;
39

    
40
public interface IEditionManager extends Observable {
41

    
42
    
43
    public static int CANCEL_EDITING = 0;
44
    public static int ACCEPT_EDITING = 1;
45
    public static int CONTINUE_EDITING = 2;
46

    
47
        /**
48
         * @param lyr
49
         * @return
50
         */
51
        public ILayerEdited getLayerEdited(FLayer lyr);
52

    
53
        public void editLayer(FLyrVect lv, DefaultViewPanel vista)
54
                        throws DataException;
55

    
56
        /**
57
         * @return Returns the activeLayerEdited. Null if there isn't any active AND
58
         *         edited
59
         */
60
        public ILayerEdited getActiveLayerEdited();
61

    
62
        /**
63
         * @return Returns the mapCtrl.
64
         */
65
        public MapControl getMapControl();
66

    
67
        /**
68
         * @param mapCtrl
69
         *            The mapCtrl to set.
70
         */
71
        public void setMapControl(MapControl mapCtrl);
72

    
73
        public Feature insertGeometry(Geometry geometry);
74
        
75
        public Feature insertFeature(Feature feature);
76
        
77
        public Feature insertGeometry(Geometry geometry, Feature feature) ;
78
        
79
        public Feature insertAndSelectGeometry(String toolName, Geometry geometry);
80
        
81
        public EditableFeature updateGeometry(FeatureStore store, Feature feature, Geometry geometry);
82
        
83
    public EditableFeature updateFeature(FeatureStore store, Feature feature);
84
    
85
    public void stopEditLayer(DefaultViewPanel view, FLyrVect lv, int mode)
86
        throws CancelEditingLayerException, ReadException;
87

    
88
}