Revision 44947
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java | ||
---|---|---|
666 | 666 |
for (FieldTypeParser fieldType : fieldTypes) { |
667 | 667 |
EditableFeatureAttributeDescriptor fad = fType.add(fieldType.name, fieldType.type); |
668 | 668 |
if( fieldType.detectedValue!=null ) { |
669 |
fad.setRequiredBytes(Math.max(fieldType.detectedValue.getDisplaySize(), fieldType.size));
|
|
669 |
fad.setDisplaySize(Math.max(fieldType.detectedValue.getDisplaySize(), fieldType.size));
|
|
670 | 670 |
fad.setSize(Math.max(fieldType.detectedValue.getDisplaySize(), fieldType.size)); |
671 | 671 |
if( fad.getPrecision()<fieldType.detectedValue.getPrecision() ) { |
672 | 672 |
fad.setPrecision(fieldType.detectedValue.getPrecision()); |
... | ... | |
675 | 675 |
fad.setScale(fieldType.detectedValue.getScale()); |
676 | 676 |
} |
677 | 677 |
} else { |
678 |
fad.setRequiredBytes(fieldType.size);
|
|
678 |
fad.setDisplaySize(fieldType.size);
|
|
679 | 679 |
} |
680 | 680 |
if (fieldType.type == DataTypes.GEOMETRY ) { |
681 | 681 |
fad.setGeometryType(fieldType.geomType, fieldType.geomSubtype); |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.dbf/src/main/java/org/gvsig/fmap/dal/store/dbf/utils/DbaseFileHeader.java | ||
---|---|---|
800 | 800 |
DBFStoreProvider.NAME |
801 | 801 |
); |
802 | 802 |
} |
803 |
attr.setRequiredBytes(dbfattr.getSize());
|
|
803 |
attr.setDisplaySize(dbfattr.getSize());
|
|
804 | 804 |
} |
805 | 805 |
return featureType; |
806 | 806 |
} |
... | ... | |
831 | 831 |
int size = descriptor.getSize(); |
832 | 832 |
int scale = descriptor.getScale(); |
833 | 833 |
int precision = descriptor.getPrecision(); |
834 |
int requiredBytes = descriptor.getRequiredBytes();
|
|
834 |
int displaySize = descriptor.getDisplaySize();
|
|
835 | 835 |
switch (type) { |
836 | 836 |
case DataTypes.DECIMAL: |
837 |
if( requiredBytes<1 ) {
|
|
837 |
if( displaySize<1 ) {
|
|
838 | 838 |
if( precision < 0) { |
839 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
839 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
840 | 840 |
} else { |
841 |
requiredBytes = precision + 3;
|
|
841 |
displaySize = precision + 3;
|
|
842 | 842 |
} |
843 | 843 |
} |
844 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
845 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
844 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
845 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
846 | 846 |
} |
847 |
header.addColumn(colName, DBFTYPE_NUMBER, requiredBytes, precision, scale);
|
|
847 |
header.addColumn(colName, DBFTYPE_NUMBER, displaySize, precision, scale);
|
|
848 | 848 |
break; |
849 | 849 |
case DataTypes.DOUBLE: |
850 |
if( requiredBytes<1 ) {
|
|
851 |
requiredBytes = DataType.DOUBLE_MAX_PRECISION+3;
|
|
850 |
if( displaySize<1 ) {
|
|
851 |
displaySize = DataType.DOUBLE_MAX_PRECISION+3;
|
|
852 | 852 |
} |
853 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
854 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
853 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
854 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
855 | 855 |
} |
856 |
header.addColumn(colName, DBFTYPE_FLOAT, requiredBytes, precision, scale);
|
|
856 |
header.addColumn(colName, DBFTYPE_FLOAT, displaySize, precision, scale);
|
|
857 | 857 |
break; |
858 | 858 |
case DataTypes.FLOAT: |
859 |
if( requiredBytes<1 ) {
|
|
860 |
requiredBytes = DataType.FLOAT_MAX_PRECISION+3;
|
|
859 |
if( displaySize<1 ) {
|
|
860 |
displaySize = DataType.FLOAT_MAX_PRECISION+3;
|
|
861 | 861 |
} |
862 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
863 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
862 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
863 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
864 | 864 |
} |
865 |
header.addColumn(colName, DBFTYPE_FLOAT, requiredBytes, precision, scale);
|
|
865 |
header.addColumn(colName, DBFTYPE_FLOAT, displaySize, precision, scale);
|
|
866 | 866 |
break; |
867 | 867 |
case DataTypes.INT: |
868 |
if( requiredBytes<1 ) {
|
|
868 |
if( displaySize<1 ) {
|
|
869 | 869 |
if( precision>=DataType.INT_MAX_PRECISION ) { |
870 |
requiredBytes = precision;
|
|
870 |
displaySize = precision;
|
|
871 | 871 |
} else { |
872 |
requiredBytes = precision + 1;
|
|
872 |
displaySize = precision + 1;
|
|
873 | 873 |
} |
874 | 874 |
} |
875 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
876 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
875 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
876 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
877 | 877 |
} |
878 |
header.addColumn(colName, DBFTYPE_NUMBER, requiredBytes, precision, scale);
|
|
878 |
header.addColumn(colName, DBFTYPE_NUMBER, displaySize, precision, scale);
|
|
879 | 879 |
break; |
880 | 880 |
case DataTypes.LONG: |
881 |
if( requiredBytes<1 ) {
|
|
881 |
if( displaySize<1 ) {
|
|
882 | 882 |
if( precision>=DataType.LONG_MAX_PRECISION ) { |
883 |
requiredBytes = precision;
|
|
883 |
displaySize = precision;
|
|
884 | 884 |
} else { |
885 |
requiredBytes = precision + 1;
|
|
885 |
displaySize = precision + 1;
|
|
886 | 886 |
} |
887 | 887 |
} |
888 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
889 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
888 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
889 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
890 | 890 |
} |
891 |
header.addColumn(colName, DBFTYPE_NUMBER, requiredBytes, precision, scale);
|
|
891 |
header.addColumn(colName, DBFTYPE_NUMBER, displaySize, precision, scale);
|
|
892 | 892 |
break; |
893 | 893 |
case DataTypes.DATE: |
894 | 894 |
header.addColumn(colName, DBFTYPE_DATE, FieldFormatter.DATE_SIZE, 0, 0); |
... | ... | |
903 | 903 |
header.addColumn(colName, DBFTYPE_BOOLEAN, 1, 0, 0); |
904 | 904 |
break; |
905 | 905 |
case DataTypes.STRING: |
906 |
if( requiredBytes<1 ) {
|
|
907 |
requiredBytes = size;
|
|
906 |
if( displaySize<1 ) {
|
|
907 |
displaySize = size;
|
|
908 | 908 |
} |
909 |
if( requiredBytes>DbaseFieldDescriptor.MAX_SIZE ) {
|
|
910 |
requiredBytes = DbaseFieldDescriptor.MAX_SIZE;
|
|
909 |
if( displaySize>DbaseFieldDescriptor.MAX_SIZE ) {
|
|
910 |
displaySize = DbaseFieldDescriptor.MAX_SIZE;
|
|
911 | 911 |
} |
912 |
header.addColumn(colName, DBFTYPE_STRING, requiredBytes, 0, 0);
|
|
912 |
header.addColumn(colName, DBFTYPE_STRING, displaySize, 0, 0);
|
|
913 | 913 |
break; |
914 | 914 |
case DataTypes.BYTE: |
915 |
if( requiredBytes<1 ) {
|
|
915 |
if( displaySize<1 ) {
|
|
916 | 916 |
if( precision>=DataType.BYTE_MAX_PRECISION ) { |
917 |
requiredBytes = precision;
|
|
917 |
displaySize = precision;
|
|
918 | 918 |
} else { |
919 |
requiredBytes = precision + 1;
|
|
919 |
displaySize = precision + 1;
|
|
920 | 920 |
} |
921 | 921 |
} |
922 |
if( requiredBytes>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
923 |
requiredBytes = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
922 |
if( displaySize>DbaseFieldDescriptor.MAX_NUMBER_SIZE ) {
|
|
923 |
displaySize = DbaseFieldDescriptor.MAX_NUMBER_SIZE;
|
|
924 | 924 |
} |
925 |
header.addColumn(colName, DBFTYPE_NUMBER,requiredBytes, precision, scale);
|
|
925 |
header.addColumn(colName, DBFTYPE_NUMBER,displaySize, precision, scale);
|
|
926 | 926 |
break; |
927 | 927 |
default: |
928 | 928 |
// Si no sabemos lo que es intentaremos guardarlo como un string |
929 |
if( requiredBytes<1 ) {
|
|
929 |
if( displaySize<1 ) {
|
|
930 | 930 |
if( size < 20 ) { |
931 |
requiredBytes = 20;
|
|
931 |
displaySize = 20;
|
|
932 | 932 |
} else { |
933 |
requiredBytes = size;
|
|
933 |
displaySize = size;
|
|
934 | 934 |
} |
935 | 935 |
} |
936 |
if( requiredBytes>DbaseFieldDescriptor.MAX_SIZE ) {
|
|
937 |
requiredBytes = DbaseFieldDescriptor.MAX_SIZE;
|
|
936 |
if( displaySize>DbaseFieldDescriptor.MAX_SIZE ) {
|
|
937 |
displaySize = DbaseFieldDescriptor.MAX_SIZE;
|
|
938 | 938 |
} |
939 |
header.addColumn(colName, DBFTYPE_STRING, requiredBytes, 0, 0);
|
|
939 |
header.addColumn(colName, DBFTYPE_STRING, displaySize, 0, 0);
|
|
940 | 940 |
break; |
941 | 941 |
} |
942 | 942 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureAttributeDescriptor.java | ||
---|---|---|
624 | 624 |
} |
625 | 625 |
|
626 | 626 |
@Override |
627 |
public EditableFeatureAttributeDescriptor setRequiredBytes(int size) {
|
|
628 |
this.requiredBytes = size;
|
|
627 |
public EditableFeatureAttributeDescriptor setDisplaySize(int size) {
|
|
628 |
this.displaySize = size;
|
|
629 | 629 |
return this; |
630 | 630 |
} |
631 | 631 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java | ||
---|---|---|
146 | 146 |
|
147 | 147 |
private int relationType = RELATION_TYPE_NONE; |
148 | 148 |
protected Locale locale; |
149 |
protected int requiredBytes;
|
|
149 |
protected int displaySize;
|
|
150 | 150 |
|
151 | 151 |
public DefaultFeatureAttributeDescriptor() { |
152 | 152 |
// Usada en la persistencia |
... | ... | |
183 | 183 |
this.hidden = false; |
184 | 184 |
this.relationType = RELATION_TYPE_NONE; |
185 | 185 |
this.locale = null; |
186 |
this.requiredBytes = 0;
|
|
186 |
this.displaySize = 0;
|
|
187 | 187 |
} |
188 | 188 |
|
189 | 189 |
protected DefaultFeatureAttributeDescriptor( |
... | ... | |
272 | 272 |
this.calculateMethod = other.calculateMethod; |
273 | 273 |
this.relationType = other.relationType; |
274 | 274 |
this.locale = other.locale; |
275 |
this.requiredBytes = other.requiredBytes;
|
|
275 |
this.displaySize = other.displaySize;
|
|
276 | 276 |
} |
277 | 277 |
|
278 | 278 |
public void setFeatureType(FeatureType type) { |
... | ... | |
723 | 723 |
if (tags == null) { |
724 | 724 |
this.tags = new DefaultTags(); |
725 | 725 |
} |
726 |
requiredBytes = state.getInt("requiredBytes",0);
|
|
726 |
displaySize = state.getInt("displaySize",0);
|
|
727 | 727 |
} |
728 | 728 |
|
729 | 729 |
@Override |
... | ... | |
813 | 813 |
state.set("foreingKey", this.foreingKey); |
814 | 814 |
state.set("tags", this.tags); |
815 | 815 |
|
816 |
state.set("requiredBytes", requiredBytes);
|
|
816 |
state.set("displaySize", displaySize);
|
|
817 | 817 |
} |
818 | 818 |
|
819 | 819 |
private static final String FEATATTRDESC_PERSISTENCE_DEFINITION_NAME = "FeatureAttributeDescriptor"; |
... | ... | |
879 | 879 |
definition.addDynFieldObject("tags") |
880 | 880 |
.setClassOfValue(Tags.class); |
881 | 881 |
|
882 |
definition.addDynFieldInt("requiredBytes").setMandatory(false);
|
|
882 |
definition.addDynFieldInt("displaySize").setMandatory(false);
|
|
883 | 883 |
|
884 | 884 |
} |
885 | 885 |
} |
... | ... | |
1444 | 1444 |
} |
1445 | 1445 |
|
1446 | 1446 |
@Override |
1447 |
public int getRequiredBytes() {
|
|
1448 |
return this.requiredBytes;
|
|
1447 |
public int getDisplaySize() {
|
|
1448 |
return this.displaySize;
|
|
1449 | 1449 |
} |
1450 | 1450 |
|
1451 | 1451 |
private class ConstantValueEvaluator extends AbstractEvaluator { |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/FetchFeatureTypeOperation.java | ||
---|---|---|
315 | 315 |
attr.setScale(DataType.SCALE_NONE); |
316 | 316 |
break; |
317 | 317 |
case DataTypes.BYTE: |
318 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
318 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
319 | 319 |
attr.setPrecision(DataType.BYTE_DEFAULT_PRECISION); |
320 | 320 |
attr.setScale(DataType.SCALE_NONE); |
321 | 321 |
break; |
322 | 322 |
case DataTypes.INT: |
323 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
323 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
324 | 324 |
attr.setPrecision(DataType.INT_DEFAULT_PRECISION); |
325 | 325 |
attr.setScale(DataType.SCALE_NONE); |
326 | 326 |
break; |
327 | 327 |
case DataTypes.LONG: |
328 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
328 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
329 | 329 |
attr.setPrecision(DataType.LONG_DEFAULT_PRECISION); |
330 | 330 |
attr.setScale(DataType.SCALE_NONE); |
331 | 331 |
break; |
332 | 332 |
case DataTypes.FLOAT: |
333 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
333 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
334 | 334 |
attr.setPrecision(DataType.FLOAT_DEFAULT_PRECISION); |
335 | 335 |
attr.setScale(DataType.SCALE_NONE); |
336 | 336 |
break; |
337 | 337 |
case DataTypes.DOUBLE: |
338 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
338 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
339 | 339 |
attr.setPrecision(DataType.DOUBLE_DEFAULT_PRECISION); |
340 | 340 |
attr.setScale(DataType.SCALE_NONE); |
341 | 341 |
break; |
342 | 342 |
case DataTypes.DECIMAL: |
343 |
attr.setRequiredBytes(rsMetadata.getColumnDisplaySize(colIndex));
|
|
343 |
attr.setDisplaySize(rsMetadata.getColumnDisplaySize(colIndex));
|
|
344 | 344 |
attr.setScale(rsMetadata.getScale(colIndex)); |
345 | 345 |
attr.setPrecision(rsMetadata.getPrecision(colIndex)); |
346 | 346 |
break; |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretable/table/DynFieldFacadeOfAFeatureAttributeDescriptor.java | ||
---|---|---|
718 | 718 |
} |
719 | 719 |
|
720 | 720 |
@Override |
721 |
public int getRequiredBytes() {
|
|
721 |
public int getDisplaySize() {
|
|
722 | 722 |
return 0; |
723 | 723 |
} |
724 | 724 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureAttributePanelView.java | ||
---|---|---|
45 | 45 |
JTextField txtScale = new JTextField(); |
46 | 46 |
JLabel lblRelationType = new JLabel(); |
47 | 47 |
JComboBox cboRelationType = new JComboBox(); |
48 |
JLabel lblRequiredBytes = new JLabel();
|
|
49 |
JTextField txtRequiredBytes = new JTextField();
|
|
48 |
JLabel lblDisplaySize = new JLabel();
|
|
49 |
JTextField txtDisplaySize = new JTextField();
|
|
50 | 50 |
JLabel lblGeometryType = new JLabel(); |
51 | 51 |
JLabel lblGeometrySubtype = new JLabel(); |
52 | 52 |
JLabel lblCRS = new JLabel(); |
... | ... | |
295 | 295 |
cboRelationType.setName("cboRelationType"); |
296 | 296 |
jpanel1.add(cboRelationType,cc.xy(4,16)); |
297 | 297 |
|
298 |
lblRequiredBytes.setName("lblRequiredBytes");
|
|
299 |
lblRequiredBytes.setText("_Required_bytes");
|
|
300 |
lblRequiredBytes.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
|
|
301 |
jpanel1.add(lblRequiredBytes,cc.xy(2,2));
|
|
298 |
lblDisplaySize.setName("lblDisplaySize");
|
|
299 |
lblDisplaySize.setText("_Required_bytes");
|
|
300 |
lblDisplaySize.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
|
|
301 |
jpanel1.add(lblDisplaySize,cc.xy(2,2));
|
|
302 | 302 |
|
303 |
txtRequiredBytes.setName("txtRequiredBytes");
|
|
304 |
txtRequiredBytes.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
|
|
305 |
jpanel1.add(txtRequiredBytes,cc.xy(4,2));
|
|
303 |
txtDisplaySize.setName("txtDisplaySize");
|
|
304 |
txtDisplaySize.setToolTipText("_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer");
|
|
305 |
jpanel1.add(txtDisplaySize,cc.xy(4,2));
|
|
306 | 306 |
|
307 | 307 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }); |
308 | 308 |
return jpanel1; |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureAttributePanel.java | ||
---|---|---|
410 | 410 |
private DatePickerController pickerIntervalEnd; |
411 | 411 |
private DatePickerController pickerIntervalStart; |
412 | 412 |
private CalculatorController<Integer> pickerSize; |
413 |
private CalculatorController<Integer> pickerRequiredBytes;
|
|
413 |
private CalculatorController<Integer> pickerDisplaySize;
|
|
414 | 414 |
private CalculatorController<Integer> pickerPrecision; |
415 | 415 |
private CalculatorController<Integer> pickerScale; |
416 | 416 |
private CalculatorController<Object> pickerDefaultValue; |
... | ... | |
523 | 523 |
swingManager.translate(this.lblPrecision); |
524 | 524 |
swingManager.translate(this.lblScale); |
525 | 525 |
swingManager.translate(this.lblSize); |
526 |
swingManager.translate(this.lblRequiredBytes);
|
|
526 |
swingManager.translate(this.lblDisplaySize);
|
|
527 | 527 |
swingManager.translate(this.chkVirtualField); |
528 | 528 |
swingManager.translate(this.tabAditionalFields); |
529 | 529 |
swingManager.translate(this.tabLayout); |
... | ... | |
551 | 551 |
swingManager.translate(this.lblIsClosedList); |
552 | 552 |
swingManager.translate(this.chkIsForeingKey); |
553 | 553 |
|
554 |
swingManager.translate(this.txtRequiredBytes);
|
|
554 |
swingManager.translate(this.txtDisplaySize);
|
|
555 | 555 |
swingManager.translate(this.txtPrecision); |
556 | 556 |
swingManager.translate(this.txtScale); |
557 | 557 |
swingManager.translate(this.txtScale); |
... | ... | |
562 | 562 |
swingManager.addClearButton(this.txtIntervalStart); |
563 | 563 |
swingManager.addClearButton(this.txtScale); |
564 | 564 |
swingManager.addClearButton(this.txtSize); |
565 |
swingManager.addClearButton(this.txtRequiredBytes);
|
|
565 |
swingManager.addClearButton(this.txtDisplaySize);
|
|
566 | 566 |
swingManager.addClearButton(this.txtLabel); |
567 | 567 |
swingManager.addClearButton(this.txtDescription); |
568 | 568 |
swingManager.addClearButton(this.cboGroup); |
... | ... | |
577 | 577 |
swingManager.setDefaultPopupMenu(this.txtIntervalStart); |
578 | 578 |
swingManager.setDefaultPopupMenu(this.txtScale); |
579 | 579 |
swingManager.setDefaultPopupMenu(this.txtSize); |
580 |
swingManager.setDefaultPopupMenu(this.txtRequiredBytes);
|
|
580 |
swingManager.setDefaultPopupMenu(this.txtDisplaySize);
|
|
581 | 581 |
swingManager.setDefaultPopupMenu(this.cboDateFormat); |
582 | 582 |
swingManager.setDefaultPopupMenu(this.cboFieldType); |
583 | 583 |
swingManager.setDefaultPopupMenu(this.cboGeometrySubtype); |
... | ... | |
615 | 615 |
this.pickerSize = evaluatorManager.createCalculatorController( |
616 | 616 |
this.txtSize, DataTypes.INT |
617 | 617 |
); |
618 |
this.pickerRequiredBytes = evaluatorManager.createCalculatorController( |
|
619 |
this.txtRequiredBytes, DataTypes.INT |
|
618 |
this.pickerDisplaySize = evaluatorManager.createCalculatorController(this.txtDisplaySize, DataTypes.INT |
|
620 | 619 |
); |
621 | 620 |
this.pickerPrecision = evaluatorManager.createCalculatorController( |
622 | 621 |
this.txtPrecision, DataTypes.INT |
... | ... | |
789 | 788 |
descriptor.setIsPrimaryKey(this.chkIsPrimaryKey.isSelected()); |
790 | 789 |
descriptor.setIsAutomatic(this.chkIsAutomatic.isSelected()); |
791 | 790 |
descriptor.setSize(this.pickerSize.get(0)); |
792 |
descriptor.setRequiredBytes(this.pickerRequiredBytes.get(0));
|
|
791 |
descriptor.setDisplaySize(this.pickerDisplaySize.get(0));
|
|
793 | 792 |
descriptor.setPrecision(this.pickerPrecision.get(0)); |
794 | 793 |
descriptor.setScale(this.pickerScale.get(0)); |
795 | 794 |
descriptor.setDefaultValue(this.pickerDefaultValue.get()); |
... | ... | |
929 | 928 |
this.pickerIntervalStart.set(null); |
930 | 929 |
this.pickerScale.set(null); |
931 | 930 |
this.pickerSize.set(null); |
932 |
this.pickerRequiredBytes.set(null);
|
|
931 |
this.pickerDisplaySize.set(null);
|
|
933 | 932 |
|
934 | 933 |
this.chkAllowNulls.setSelected(false); |
935 | 934 |
this.chkIsAutomatic.setSelected(false); |
... | ... | |
1014 | 1013 |
} else { |
1015 | 1014 |
this.pickerSize.set(null); |
1016 | 1015 |
} |
1017 |
this.pickerRequiredBytes.set(descriptor.getRequiredBytes());
|
|
1016 |
this.pickerDisplaySize.set(descriptor.getDisplaySize());
|
|
1018 | 1017 |
if( dataType.supportPrecision() ) { |
1019 | 1018 |
this.pickerPrecision.set(descriptor.getPrecision()); |
1020 | 1019 |
} else { |
... | ... | |
1117 | 1116 |
this.pickerSize.setEditable(false); |
1118 | 1117 |
this.pickerSize.set(null); |
1119 | 1118 |
} |
1120 |
this.pickerRequiredBytes.setEditable(this.mode == MODE_EDIT_ALL);
|
|
1119 |
this.pickerDisplaySize.setEditable(this.mode == MODE_EDIT_ALL);
|
|
1121 | 1120 |
if( dataType.supportPrecision() ) { |
1122 | 1121 |
if( dataType.isPredefinedPrecision() ) { |
1123 | 1122 |
this.pickerPrecision.setEditable(false); |
... | ... | |
1218 | 1217 |
this.pickerIntervalEnd.setEditable(true); |
1219 | 1218 |
this.pickerIntervalStart.setEditable(true); |
1220 | 1219 |
this.pickerSize.setEditable(dataType.supportSize()); |
1221 |
this.pickerRequiredBytes.setEditable(true);
|
|
1220 |
this.pickerDisplaySize.setEditable(true);
|
|
1222 | 1221 |
if( dataType.isPredefinedPrecision() ) { |
1223 | 1222 |
this.pickerPrecision.setEditable(false); |
1224 | 1223 |
this.pickerPrecision.set(dataType.getMaxPrecision()); |
... | ... | |
1284 | 1283 |
|
1285 | 1284 |
this.cboDataProfile.setEnabled(true); |
1286 | 1285 |
|
1287 |
this.pickerRequiredBytes.setEditable(false);
|
|
1286 |
this.pickerDisplaySize.setEditable(false);
|
|
1288 | 1287 |
this.chkAllowNulls.setEnabled(false); |
1289 | 1288 |
this.chkIsAutomatic.setEnabled(false); |
1290 | 1289 |
if( this.isVirtualField() ) { |
... | ... | |
1316 | 1315 |
this.pickerPrecision.setEditable(false); |
1317 | 1316 |
this.pickerScale.setEditable(false); |
1318 | 1317 |
this.pickerSize.setEditable(false); |
1319 |
this.pickerRequiredBytes.setEditable(false);
|
|
1318 |
this.pickerDisplaySize.setEditable(false);
|
|
1320 | 1319 |
this.cboDataProfile.setEnabled(false); |
1321 | 1320 |
|
1322 | 1321 |
this.chkAllowNulls.setEnabled(false); |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureAttributePanelView.xml | ||
---|---|---|
1303 | 1303 |
</at> |
1304 | 1304 |
</object> |
1305 | 1305 |
</at> |
1306 |
<at name="name">lblRequiredBytes</at>
|
|
1306 |
<at name="name">lblDisplaySize</at>
|
|
1307 | 1307 |
<at name="width">131</at> |
1308 |
<at name="text">_Required_bytes</at>
|
|
1308 |
<at name="text">_Characters_in_display</at>
|
|
1309 | 1309 |
<at name="fill"> |
1310 | 1310 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
1311 | 1311 |
<at name="name">fill</at> |
1312 | 1312 |
</object> |
1313 | 1313 |
</at> |
1314 |
<at name="toolTipText">_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer</at>
|
|
1314 |
<at name="toolTipText">_Number_of_characters_required_to_display_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated</at>
|
|
1315 | 1315 |
<at name="height">14</at> |
1316 | 1316 |
</object> |
1317 | 1317 |
</at> |
... | ... | |
1364 | 1364 |
</at> |
1365 | 1365 |
</object> |
1366 | 1366 |
</at> |
1367 |
<at name="name">txtRequiredBytes</at>
|
|
1367 |
<at name="name">txtDisplaySize</at>
|
|
1368 | 1368 |
<at name="width">592</at> |
1369 | 1369 |
<at name="toolTipText">_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer</at> |
1370 | 1370 |
<at name="height">20</at> |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/EditableFeatureAttributeDescriptor.java | ||
---|---|---|
96 | 96 |
* @param size |
97 | 97 |
* @return |
98 | 98 |
*/ |
99 |
public EditableFeatureAttributeDescriptor setRequiredBytes(int size);
|
|
99 |
public EditableFeatureAttributeDescriptor setDisplaySize(int size);
|
|
100 | 100 |
|
101 | 101 |
/** |
102 | 102 |
* Sets the precision |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureAttributeDescriptor.java | ||
---|---|---|
80 | 80 |
public int getSize(); |
81 | 81 |
|
82 | 82 |
/** |
83 |
* Return the required bytes to store this attribute.
|
|
83 |
* Return the designated column normal maximum width in characters.
|
|
84 | 84 |
* |
85 |
* This value is dependent of the store type. |
|
86 | 85 |
* @return |
87 | 86 |
*/ |
88 |
public int getRequiredBytes();
|
|
87 |
public int getDisplaySize();
|
|
89 | 88 |
|
90 | 89 |
/** |
91 | 90 |
* For attributes of type {@link DataTypes#DECIMAL}, this returns the maximum |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureAttributeDescriptor.java | ||
---|---|---|
662 | 662 |
} |
663 | 663 |
|
664 | 664 |
@Override |
665 |
public int getRequiredBytes() {
|
|
665 |
public int getDisplaySize() {
|
|
666 | 666 |
return 0; |
667 | 667 |
} |
668 | 668 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1447 | 1447 |
_DBF_loading_parameters=Par\u00e1metros de carga del DBF |
1448 | 1448 |
_SHP_loading_parameters=Par\u00e1metros de carga del SHP |
1449 | 1449 |
_Errors_occurred_during_search=Se han producido errores durante la busqueda |
1450 |
_Required_bytes=Bytes requeridos
|
|
1451 |
_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer=<html>Cantidad de bytes necesarios para almacenar el dato de este campo.\n<br>Dejelo vacio o cero para que se calcule automaticamente.\n<br>Este valor es dependiente del tipo de capa.</html>
|
|
1450 |
_Characters_in_display=Caracteres en pantalla
|
|
1451 |
_Number_of_characters_required_to_display_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated=<html>Cantidad de car\u00e1cteres necesarios para mostrar el dato de este campo.\n<br>Dejelo vacio o cero para que se calcule automaticamente.</html>
|
|
1452 | 1452 |
_Total_digits_precision=Digitos totales (precision) |
1453 | 1453 |
_Decimal_digits_escale=Digitos decimales (escala) |
1454 | 1454 |
_Number_of_digits_used_to_represent_the_number_Includes_the_digits_of_the_integer_part_and_the_digits_of_the_decimal_part=<html>Cantidad de digitos usados para representar el numero.\n<br>Incluye los digitos de la parte entera y los de la parte decimal.</html> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1367 | 1367 |
_DBF_loading_parameters=DBF loading parameters |
1368 | 1368 |
_SHP_loading_parameters=SHP loading parameters |
1369 | 1369 |
_Errors_occurred_during_search=Errors occurred during search |
1370 |
_Required_bytes=Required bytes
|
|
1371 |
_Number_of_bytes_required_to_store_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated_This_value_is_dependent_on_the_type_of_layer=Number of bytes required to store the data in this field.\nLeave it empty or zero to be automatically calculated.\nThis value is dependent on the type of layer.
|
|
1370 |
_Characters_in_display=Characters in display
|
|
1371 |
_Number_of_characters_required_to_display_the_data_in_this_field_Leave_it_empty_or_zero_to_be_automatically_calculated=Number of characters required to display the data in this field.\nLeave it empty or zero to be automatically calculated.
|
|
1372 | 1372 |
_Total_digits_precision=Total digits (precision) |
1373 | 1373 |
_Decimal_digits_escale=Decimal digits (scale) |
1374 | 1374 |
_Number_of_digits_used_to_represent_the_number_Includes_the_digits_of_the_integer_part_and_the_digits_of_the_decimal_part=Number of digits used to represent the number.\nIncludes the digits of the integer part and the digits of the decimal part. |
Also available in: Unified diff