svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / commands / ModifyRowCommand.java @ 4000
History | View | Annotate | Download (1.08 KB)
1 | 3653 | fjp | package com.iver.cit.gvsig.fmap.edition.commands; |
---|---|---|---|
2 | |||
3 | import java.io.IOException; |
||
4 | |||
5 | import com.iver.cit.gvsig.fmap.core.IRow; |
||
6 | import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
||
7 | import com.iver.cit.gvsig.fmap.edition.IEditableSource; |
||
8 | |||
9 | public class ModifyRowCommand implements Command { |
||
10 | private IEditableSource efs;
|
||
11 | 4000 | caballero | //private IRow rowAnt;
|
12 | 3653 | fjp | private IRow rowNext;
|
13 | private int indexAnt; |
||
14 | private int previousIndex; |
||
15 | public ModifyRowCommand(IEditableSource ef,int i,int p,IRow newRow) throws IOException, DriverIOException{ |
||
16 | efs=ef; |
||
17 | indexAnt=i; |
||
18 | rowNext=newRow; |
||
19 | previousIndex=p; |
||
20 | 4000 | caballero | //rowAnt=efs.getRow(indexAnt);
|
21 | 3653 | fjp | } |
22 | /**
|
||
23 | * @throws DriverIOException
|
||
24 | * @throws IOException
|
||
25 | * @see com.iver.cit.gvsig.fmap.edition.Command#undo()
|
||
26 | */
|
||
27 | public void undo() throws IOException, DriverIOException { |
||
28 | 3836 | caballero | efs.undoModifyRow(indexAnt,previousIndex); |
29 | //efs.undo();
|
||
30 | 3653 | fjp | } |
31 | /**
|
||
32 | * @throws DriverIOException
|
||
33 | * @throws IOException
|
||
34 | * @see com.iver.cit.gvsig.fmap.edition.Command#redo()
|
||
35 | */
|
||
36 | public void redo() throws IOException, DriverIOException { |
||
37 | 3848 | caballero | efs.doModifyRow(indexAnt,rowNext); |
38 | 3836 | caballero | //efs.redo();
|
39 | 3653 | fjp | } |
40 | |||
41 | } |