svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / commands / RemoveRowCommand.java @ 3836
History | View | Annotate | Download (1010 Bytes)
1 |
package com.iver.cit.gvsig.fmap.edition.commands; |
---|---|
2 |
|
3 |
import java.io.IOException; |
4 |
|
5 |
import com.iver.cit.gvsig.fmap.DriverException; |
6 |
import com.iver.cit.gvsig.fmap.core.IRow; |
7 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
8 |
import com.iver.cit.gvsig.fmap.edition.IEditableSource; |
9 |
|
10 |
public class RemoveRowCommand implements Command { |
11 |
private IEditableSource efs;
|
12 |
private IRow geometry;
|
13 |
private int index; |
14 |
public RemoveRowCommand(IEditableSource ef,int i) throws DriverIOException, IOException{ |
15 |
efs=ef; |
16 |
index=i; |
17 |
geometry=efs.getRow(i); |
18 |
} |
19 |
|
20 |
/**
|
21 |
* @throws DriverIOException
|
22 |
* @throws IOException
|
23 |
* @see com.iver.cit.gvsig.fmap.edition.Command#undo()
|
24 |
*/
|
25 |
public void undo() throws IOException, DriverIOException { |
26 |
//efs.undo();
|
27 |
efs.undoRemoveRow(index); |
28 |
} |
29 |
/**
|
30 |
* @throws IOException
|
31 |
* @throws DriverIOException
|
32 |
* @see com.iver.cit.gvsig.fmap.edition.Command#redo()
|
33 |
*/
|
34 |
public void redo() throws DriverIOException, IOException { |
35 |
//efs.redo();
|
36 |
efs.doRemoveFeature(index); |
37 |
} |
38 |
|
39 |
} |