Revision 38383 branches/v2_0_0_prep/extensions/extDalTransformJoin/src/org/gvsig/app/join/daltransform/JoinTransformGui.java
JoinTransformGui.java | ||
---|---|---|
124 | 124 |
return true; |
125 | 125 |
} |
126 | 126 |
|
127 |
/* (non-Javadoc) |
|
128 |
* @see org.gvsig.daltransform.swing.DataTransformGui#beforeApplyingTransform(org.gvsig.fmap.dal.feature.FeatureStore, org.gvsig.fmap.dal.feature.FeatureStoreTransform) |
|
129 |
*/ |
|
130 |
public void beforeApplyingTransform(FeatureStore store, |
|
131 |
FeatureStoreTransform transform) { |
|
132 |
store.disableNotifications(); |
|
133 |
} |
|
134 |
|
|
135 |
/* (non-Javadoc) |
|
136 |
* @see org.gvsig.daltransform.swing.DataTransformGui#afterApplyingTransform(org.gvsig.fmap.dal.feature.FeatureStore, org.gvsig.fmap.dal.feature.FeatureStoreTransform) |
|
137 |
*/ |
|
138 |
public void afterApplyingTransform(FeatureStore store, |
|
139 |
FeatureStoreTransform transform) { |
|
140 |
store.enableNotifications(); |
|
141 |
|
|
142 |
try { |
|
143 |
reloadTablesBasedOn(store); |
|
144 |
} catch (DataException e) { |
|
145 |
|
|
146 |
logger.info("Error while refreshing table after join transformation.", e); |
|
147 |
ApplicationLocator.getManager().message( |
|
148 |
Messages.getText("_Unable_to_refresh_table_contents"), |
|
149 |
JOptionPane.ERROR_MESSAGE); |
|
150 |
} |
|
151 |
} |
|
127 |
|
|
152 | 128 |
|
153 |
private void reloadTablesBasedOn(FeatureStore featureStore) throws DataException { |
|
154 |
|
|
155 |
IWindow[] ws = PluginServices.getMDIManager().getAllWindows(); |
|
156 |
int len = ws.length; |
|
157 |
FeatureTypesTablePanel table_panel = null; |
|
158 |
FeatureStore fsto = null; |
|
159 |
for (int i=0; i<len; i++) { |
|
160 |
if (ws[i] instanceof FeatureTypesTablePanel) { |
|
161 |
table_panel = (FeatureTypesTablePanel) ws[i]; |
|
162 |
ConfigurableFeatureTableModel cftm = |
|
163 |
table_panel.getTablePanel().getTableModel(); |
|
164 |
fsto = cftm.getFeatureStore(); |
|
165 |
if (fsto == featureStore) { |
|
166 |
// refresh featuretype |
|
167 |
cftm.setFeatureType(fsto.getDefaultFeatureType()); |
|
168 |
} |
|
169 |
} |
|
170 |
} |
|
171 |
} |
|
172 |
|
|
173 | 129 |
public String toString() { |
174 | 130 |
return getName(); |
175 | 131 |
} |
Also available in: Unified diff