Revision 31496 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/table/gui/FeatureTypeEditingPanel.java

View differences:

FeatureTypeEditingPanel.java
47 47
import java.awt.event.ActionListener;
48 48
import java.text.ParseException;
49 49
import java.util.ArrayList;
50
import java.util.List;
50 51

  
51 52
import javax.swing.DefaultCellEditor;
52 53
import javax.swing.JComboBox;
......
66 67
import org.gvsig.andami.messages.NotificationManager;
67 68
import org.gvsig.andami.ui.mdiManager.IWindow;
68 69
import org.gvsig.andami.ui.mdiManager.WindowInfo;
69
import org.gvsig.app.project.documents.table.FeatureTableOperations;
70
import org.gvsig.app.project.documents.table.TableOperations;
70 71
import org.gvsig.fmap.dal.DataTypes;
71 72
import org.gvsig.fmap.dal.exception.DataException;
72 73
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
......
74 75
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
75 76
import org.gvsig.fmap.dal.feature.FeatureStore;
76 77
import org.gvsig.gui.beans.swing.JButton;
78
import org.slf4j.Logger;
79
import org.slf4j.LoggerFactory;
77 80

  
78 81

  
79 82
/**
......
85 88
public class FeatureTypeEditingPanel extends JPanel implements IWindow {
86 89
	private static final long serialVersionUID = -4284879326692474318L;
87 90

  
91
	private static final  Logger logger = LoggerFactory.getLogger(FeatureTypeEditingPanel.class);
92

  
88 93
	WindowInfo windowInfo = null;
89 94

  
90 95
	private JLabel jLabel = null;
......
113 118

  
114 119
	private class MyTableModel extends AbstractTableModel {
115 120

  
121
		/**
122
		 * 
123
		 */
124
		private static final long serialVersionUID = -2847526298987536118L;
125

  
116 126
		public MyTableModel(FeatureStore fs) {
117 127
			try {
118 128
				editableType = fs.getDefaultFeatureType()
......
167 177
			return null;
168 178
		}
169 179

  
180
		@SuppressWarnings("unchecked")
170 181
		public Class getColumnClass(int columnIndex) {
171 182
			return super.getColumnClass(columnIndex);
172 183
		}
......
410 421
			jBtnNewField = new JButton();
411 422
			jBtnNewField.setText(PluginServices.getText(this, "new_field"));
412 423
			jBtnNewField.addActionListener(new java.awt.event.ActionListener() {
413
				private ArrayList tempFieldNames = new ArrayList();
424
				private List<String> tempFieldNames = new ArrayList<String>();
414 425

  
415 426
				{
416 427
					try {
......
421 432
							tempFieldNames.add(ad.getName());
422 433
						}
423 434
					} catch (Exception ex) {
435
						logger.warn("Can't initialize tempFieldNames",ex);
424 436
					}
425 437
				}
426 438

  
......
436 448
									return;
437 449
								}
438 450
								if (ead.getDataType() == DataTypes.STRING
439
										&& ead.getSize() > FeatureTableOperations.MAX_FIELD_LENGTH) {
451
										&& ead.getSize() > TableOperations.MAX_FIELD_LENGTH) {
440 452
									NotificationManager.showMessageInfo( PluginServices.getText(this,
441 453
													"max_length_is")
442
													+ ":" + FeatureTableOperations.MAX_FIELD_LENGTH, null);
443
									ead.setSize(FeatureTableOperations.MAX_FIELD_LENGTH);
454
													+ ":" + TableOperations.MAX_FIELD_LENGTH, null);
455
									ead.setSize(TableOperations.MAX_FIELD_LENGTH);
444 456
								}
445 457
								tempFieldNames.add(ead.getName());
446 458
								jTableFields.revalidate();

Also available in: Unified diff