Revision 10627 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/commands/RemoveRowCommand.java
RemoveRowCommand.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 | 4 |
|
5 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
6 |
import com.iver.cit.gvsig.exceptions.commands.EditionCommandException; |
|
7 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
|
5 | 8 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
9 |
import com.iver.cit.gvsig.fmap.edition.EditableAdapter; |
|
6 | 10 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
7 | 11 |
import com.iver.cit.gvsig.fmap.edition.IEditableSource; |
8 | 12 |
|
9 | 13 |
public class RemoveRowCommand extends AbstractCommand { |
10 | 14 |
|
11 |
private IEditableSource efs;
|
|
15 |
private EditableAdapter efs;
|
|
12 | 16 |
private int index; |
13 | 17 |
private int sourceType=EditionEvent.GRAPHIC; |
14 |
public RemoveRowCommand(IEditableSource ef,int i,int sourceType) throws DriverIOException, IOException{
|
|
18 |
public RemoveRowCommand(EditableAdapter ef,int i,int sourceType){
|
|
15 | 19 |
super(); |
16 | 20 |
efs=ef; |
17 | 21 |
index=i; |
... | ... | |
23 | 27 |
* @throws IOException |
24 | 28 |
* @see com.iver.cit.gvsig.fmap.edition.Command#undo() |
25 | 29 |
*/ |
26 |
public void undo() throws IOException, DriverIOException {
|
|
30 |
public void undo() throws EditionCommandException {
|
|
27 | 31 |
efs.undoRemoveRow(index,sourceType); |
28 | 32 |
} |
29 | 33 |
/** |
... | ... | |
31 | 35 |
* @throws DriverIOException |
32 | 36 |
* @see com.iver.cit.gvsig.fmap.edition.Command#redo() |
33 | 37 |
*/ |
34 |
public void redo() throws DriverIOException, IOException { |
|
35 |
efs.doRemoveRow(index,sourceType); |
|
38 |
public void redo() throws EditionCommandException { |
|
39 |
try { |
|
40 |
efs.doRemoveRow(index,sourceType); |
|
41 |
} catch (ReadDriverException e) { |
|
42 |
throw new EditionCommandException(efs.getWriter().getName(),e); |
|
43 |
} catch (ExpansionFileReadException e) { |
|
44 |
throw new EditionCommandException(efs.getWriter().getName(),e); |
|
45 |
} |
|
36 | 46 |
} |
37 | 47 |
|
38 | 48 |
public String getType() { |
Also available in: Unified diff