Revision 34231 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/table/gui/FeatureTypeEditingPanel.java
FeatureTypeEditingPanel.java | ||
---|---|---|
63 | 63 |
import javax.swing.table.TableColumn; |
64 | 64 |
import javax.swing.table.TableModel; |
65 | 65 |
|
66 |
import org.slf4j.Logger; |
|
67 |
import org.slf4j.LoggerFactory; |
|
68 |
|
|
66 | 69 |
import org.gvsig.andami.PluginServices; |
67 | 70 |
import org.gvsig.andami.messages.NotificationManager; |
68 | 71 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
... | ... | |
75 | 78 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
76 | 79 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
77 | 80 |
import org.gvsig.gui.beans.swing.JButton; |
78 |
import org.slf4j.Logger; |
|
79 |
import org.slf4j.LoggerFactory; |
|
80 | 81 |
|
81 | 82 |
|
82 | 83 |
/** |
... | ... | |
123 | 124 |
*/ |
124 | 125 |
private static final long serialVersionUID = -2847526298987536118L; |
125 | 126 |
|
126 |
public MyTableModel(FeatureStore fs) { |
|
127 |
try { |
|
128 |
editableType = fs.getDefaultFeatureType() |
|
129 |
.getEditable(); |
|
130 |
} catch (DataException e) { |
|
131 |
NotificationManager.addError(PluginServices.getText(this, |
|
132 |
"create_editabletype"), e); |
|
133 |
} |
|
127 |
public MyTableModel() { |
|
128 |
|
|
134 | 129 |
|
135 | 130 |
} |
136 | 131 |
|
... | ... | |
252 | 247 |
|
253 | 248 |
/** |
254 | 249 |
* This method initializes |
250 |
* @throws DataException |
|
255 | 251 |
* |
256 | 252 |
*/ |
257 |
public FeatureTypeEditingPanel(FeatureStore fs) { |
|
253 |
public FeatureTypeEditingPanel(FeatureStore fs) throws DataException {
|
|
258 | 254 |
super(); |
259 | 255 |
this.featureStore = fs; |
256 |
this.editableType = fs.getDefaultFeatureType().getEditable(); |
|
260 | 257 |
initialize(); |
261 | 258 |
// Add a new row |
262 | 259 |
TableModel tm; |
263 |
tm = new MyTableModel(fs);
|
|
260 |
tm = new MyTableModel(); |
|
264 | 261 |
getJTableFields().setModel(tm); |
265 | 262 |
// Esto lo a?ado aqu? porque si no tiene registros, no hace caso. |
266 | 263 |
// (Por eso no |
Also available in: Unified diff