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 |
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 |
//private IRow rowAnt;
|
12 |
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 |
//rowAnt=efs.getRow(indexAnt);
|
21 |
} |
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 |
efs.undoModifyRow(indexAnt,previousIndex); |
29 |
//efs.undo();
|
30 |
} |
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 |
efs.doModifyRow(indexAnt,rowNext); |
38 |
//efs.redo();
|
39 |
} |
40 |
|
41 |
} |