Revision 41707 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/dal/feature/swing/table/ConfigurationTableModel.java

View differences:

ConfigurationTableModel.java
49 49
    private static final int ALIAS_COLUMN = 2;
50 50
    private static final int TYPE_COLUMN = 3;
51 51
    private static final int SIZE_COLUMN = 4;
52
    private static final int PATTERN_COLUMN = 5;
52
    private static final int PRECISION_COLUMN = 5;
53
    private static final int PATTERN_COLUMN = 6;
54
    
55
    private static final int COLUMN_COUNT = 7;
56
    
57
    
53 58

  
54 59
    private ConfigurableFeatureTableModel configurable;
55 60

  
......
60 65

  
61 66
    public int getColumnCount() {
62 67
        // 1: visibility, 2: field name, 3: alias, 4:Type, 5:size, 6:pattern
63
        return 6;
68
        return COLUMN_COUNT;
64 69
    }
65 70

  
66 71
    public int getRowCount() {
......
89 94
        		return null;
90 95
        	}
91 96
    		return fad.getSize();
97
        case PRECISION_COLUMN:
98
        	fad = configurable.internalGetFeatureDescriptorForColumn(rowIndex);
99
        	if( fad == null ) {
100
        		return null;
101
        	}
102
    		return fad.getPrecision();
92 103
        case PATTERN_COLUMN:
93 104
        	return configurable.getFormattingPattern(name);
94 105
        default:
......
134 145
        case PATTERN_COLUMN:
135 146
            return String.class;
136 147
        case SIZE_COLUMN:
148
        case PRECISION_COLUMN:
137 149
            /*
138 150
             * We must use Integer.class instead of int.class
139 151
             * because int.class does not have a registered
......
158 170
            return Messages.getText("Alias");
159 171
        case SIZE_COLUMN:
160 172
            return Messages.getText("Size");
173
        case PRECISION_COLUMN:
174
            return Messages.getText("Precision");
161 175
        case TYPE_COLUMN:
162 176
            return Messages.getText("Type");
163 177
        case PATTERN_COLUMN:

Also available in: Unified diff