root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / layout / commands / AddFFrameCommand.java @ 7304
History | View | Annotate | Download (1.13 KB)
1 |
|
---|---|
2 |
package com.iver.cit.gvsig.project.documents.layout.commands; |
3 |
|
4 |
import java.io.IOException; |
5 |
|
6 |
import com.iver.andami.PluginServices; |
7 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
8 |
import com.iver.cit.gvsig.fmap.edition.commands.AbstractCommand; |
9 |
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame; |
10 |
|
11 |
|
12 |
/**
|
13 |
* A?ade una geometr?a nueva al EditableFeatureSource
|
14 |
*/
|
15 |
public class AddFFrameCommand extends AbstractCommand { |
16 |
private IFFrame frame;
|
17 |
private int index; |
18 |
private EditableFeatureSource efs;
|
19 |
//private DefaultEditableFeatureSource efs;
|
20 |
public AddFFrameCommand(EditableFeatureSource efs,IFFrame f,int i){ |
21 |
this.efs=efs;
|
22 |
index=i; |
23 |
frame=f; |
24 |
} |
25 |
/**
|
26 |
* @throws IOException
|
27 |
* @throws DriverIOException
|
28 |
* @throws IOException
|
29 |
* @throws DriverIOException
|
30 |
* @see com.iver.cit.gvsig.fmap.edition.Command#undo()
|
31 |
*/
|
32 |
public void undo(){ |
33 |
efs.undoAddFFrame(index); |
34 |
} |
35 |
/**
|
36 |
* @throws DriverIOException
|
37 |
* @throws IOException
|
38 |
* @see com.iver.cit.gvsig.fmap.edition.Command#redo()
|
39 |
*/
|
40 |
public void redo(){ |
41 |
efs.doAddFFrame(frame,index); |
42 |
|
43 |
} |
44 |
public String getType() { |
45 |
return PluginServices.getText(this,"Anadir"); |
46 |
} |
47 |
|
48 |
} |