Revision 25068 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/TableManageFields.java
TableManageFields.java | ||
---|---|---|
47 | 47 |
package com.iver.cit.gvsig; |
48 | 48 |
|
49 | 49 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
50 |
import org.gvsig.project.document.table.FeatureTableDocument; |
|
51 |
import org.gvsig.project.document.table.gui.FeatureTableDocumentPanel; |
|
50 | 52 |
|
51 | 53 |
import com.iver.andami.PluginServices; |
52 | 54 |
import com.iver.andami.plugins.Extension; |
53 | 55 |
import com.iver.andami.ui.mdiManager.IWindow; |
54 |
import com.iver.cit.gvsig.project.documents.table.ProjectTable; |
|
55 | 56 |
import com.iver.cit.gvsig.project.documents.table.gui.DlgFieldManager; |
56 |
import com.iver.cit.gvsig.project.documents.table.gui.Table; |
|
57 | 57 |
|
58 | 58 |
|
59 | 59 |
/** |
... | ... | |
69 | 69 |
public void execute(String s) { |
70 | 70 |
IWindow v = PluginServices.getMDIManager().getActiveWindow(); |
71 | 71 |
|
72 |
Table t = (Table) v;
|
|
73 |
ProjectTable pt = t.getModel();
|
|
74 |
FeatureStore fs = pt.getModel();
|
|
72 |
FeatureTableDocumentPanel t = (FeatureTableDocumentPanel) v;
|
|
73 |
FeatureTableDocument pt = t.getModel();
|
|
74 |
FeatureStore fs = pt.getStore();
|
|
75 | 75 |
if (fs.canAlterFeatureType()) |
76 | 76 |
{ |
77 | 77 |
// IFieldManager fieldManager = (IFieldManager) writer; |
... | ... | |
107 | 107 |
return false; |
108 | 108 |
} |
109 | 109 |
|
110 |
if (v instanceof Table) {
|
|
111 |
Table t = (Table) v;
|
|
112 |
FeatureStore fs = t.getModel().getModel();
|
|
110 |
if (v instanceof FeatureTableDocumentPanel) {
|
|
111 |
FeatureTableDocumentPanel t = (FeatureTableDocumentPanel) v;
|
|
112 |
FeatureStore fs = t.getModel().getStore();
|
|
113 | 113 |
// ProjectTable pt = t.getModel(); |
114 | 114 |
return fs.isEditing(); |
115 | 115 |
|
... | ... | |
138 | 138 |
return false; |
139 | 139 |
} |
140 | 140 |
|
141 |
if (v instanceof Table) {
|
|
141 |
if (v instanceof FeatureTableDocumentPanel) {
|
|
142 | 142 |
return true; |
143 | 143 |
} |
144 | 144 |
return false; |
Also available in: Unified diff