Revision 6071 trunk/extensions/extCAD/src/com/iver/cit/gvsig/ViewCommandStackExtension.java
ViewCommandStackExtension.java | ||
---|---|---|
4 | 4 |
import com.iver.andami.plugins.Extension; |
5 | 5 |
import com.iver.cit.gvsig.fmap.FMap; |
6 | 6 |
import com.iver.cit.gvsig.fmap.edition.IEditableSource; |
7 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
|
8 |
import com.iver.cit.gvsig.fmap.edition.commands.CommandListener; |
|
7 | 9 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
8 | 10 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
9 | 11 |
import com.iver.cit.gvsig.gui.View; |
... | ... | |
15 | 17 |
* |
16 | 18 |
* @author Vicente Caballero Navarro |
17 | 19 |
*/ |
18 |
public class ViewCommandStackExtension extends Extension { |
|
20 |
public class ViewCommandStackExtension extends Extension implements CommandListener{
|
|
19 | 21 |
public static CommandStackDialog csd=null; |
20 | 22 |
/** |
21 | 23 |
* @see com.iver.andami.plugins.IExtension#initialize() |
... | ... | |
39 | 41 |
if (layers.getLayer(i) instanceof FLyrVect){ |
40 | 42 |
FLyrVect lyrVect=(FLyrVect)layers.getLayer(i); |
41 | 43 |
if (lyrVect.isEditing() && lyrVect.isActive()){ |
44 |
VectorialEditableAdapter vea = (VectorialEditableAdapter) lyrVect |
|
45 |
.getSource(); |
|
46 |
vea.getCommandRecord().addCommandListener(this); |
|
42 | 47 |
csd=new CommandStackDialog(); |
43 | 48 |
csd.setModel(((IEditableSource)lyrVect.getSource()).getCommandRecord()); |
44 | 49 |
PluginServices.getMDIManager().addView(csd); |
50 |
return; |
|
45 | 51 |
} |
46 | 52 |
} |
47 | 53 |
} |
... | ... | |
55 | 61 |
* @see com.iver.andami.plugins.IExtension#isEnabled() |
56 | 62 |
*/ |
57 | 63 |
public boolean isEnabled() { |
58 |
|
|
64 |
|
|
59 | 65 |
return true; |
60 | 66 |
} |
61 | 67 |
|
... | ... | |
69 | 75 |
return false; |
70 | 76 |
|
71 | 77 |
} |
78 |
|
|
79 |
public void commandRepaint() { |
|
80 |
CADExtension.getCADTool().clearSelection(); |
|
81 |
|
|
82 |
} |
|
83 |
|
|
84 |
public void commandRefresh() { |
|
85 |
CADExtension.getCADTool().clearSelection(); |
|
86 |
} |
|
72 | 87 |
} |
Also available in: Unified diff