Statistics
| Revision:

svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / gui / layout / commands / ModifyFFrameComm.java @ 3549

History | View | Annotate | Download (1.06 KB)

1

    
2
package com.iver.cit.gvsig.gui.layout.commands;
3

    
4
import java.io.IOException;
5

    
6
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
7
import com.iver.cit.gvsig.fmap.edition.commands.Command;
8
import com.iver.cit.gvsig.gui.layout.fframes.IFFrame;
9

    
10
/**
11
 * Modifica una geometr?a del EditableFeatureSource 
12
 */
13
public class ModifyFFrameComm implements Command {
14
        private EditableFeatureSource efs;
15
        private IFFrame frameNext;
16
        private IFFrame frameAnt;
17
        private int indexAnt;
18
        private int previousIndex;
19
        public ModifyFFrameComm(EditableFeatureSource ef,int i,int p,IFFrame antf,IFFrame newf){
20
                efs=ef;
21
                indexAnt=i;
22
                frameAnt=antf;
23
                frameNext=newf;
24
                previousIndex=p;
25
        }
26
        /**
27
         * @throws DriverIOException
28
         * @throws IOException
29
         * @see com.iver.cit.gvsig.fmap.edition.Command#undo()
30
         */
31
        public void undo(){
32
                efs.undoModifyFFrame(frameAnt,frameNext,indexAnt,previousIndex);
33
        }
34
        /**
35
         * @throws DriverIOException
36
         * @throws IOException
37
         * @see com.iver.cit.gvsig.fmap.edition.Command#redo()
38
         */
39
        public void redo(){
40
                previousIndex=efs.doModifyFFrame(indexAnt,frameNext);
41
        }
42
}