Revision 46893 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
DefaultFeatureAttributePanel.java | ||
---|---|---|
26 | 26 |
import javax.swing.JTextField; |
27 | 27 |
import javax.swing.ListModel; |
28 | 28 |
import javax.swing.SwingUtilities; |
29 |
import javax.swing.UIManager; |
|
29 | 30 |
import javax.swing.event.ChangeEvent; |
30 | 31 |
import javax.swing.event.ListSelectionEvent; |
31 | 32 |
import javax.swing.text.JTextComponent; |
... | ... | |
1363 | 1364 |
public EditableFeatureAttributeDescriptor fetch(EditableFeatureAttributeDescriptor descriptor) { |
1364 | 1365 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
1365 | 1366 |
try { |
1367 |
if (this.pickerPrecision.get() != null && this.pickerDisplaySize.get() != null) { |
|
1368 |
if (this.pickerPrecision.get() > this.pickerDisplaySize.get()) { |
|
1369 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
1370 |
int n = dialogs.confirmDialog( |
|
1371 |
i18n.getTranslation("_The_precision_is_greater_than_the_display_size") + "\n" |
|
1372 |
+ i18n.getTranslation("_This_can_cause_problems_with_some_data_providers_like_SHP_or_DBF")+ "\n" |
|
1373 |
+ i18n.getTranslation("_Do_you_want_to_continue_accepting_the_current_values"), |
|
1374 |
i18n.getTranslation("_Warning"), |
|
1375 |
JOptionPane.YES_NO_OPTION, |
|
1376 |
JOptionPane.WARNING_MESSAGE |
|
1377 |
); |
|
1378 |
if(n != JOptionPane.YES_OPTION){ |
|
1379 |
return null; |
|
1380 |
} |
|
1381 |
} |
|
1382 |
} |
|
1366 | 1383 |
if (!this.chkAllowNulls.isSelected()) { |
1367 | 1384 |
if (descriptor.allowNull()) { |
1368 | 1385 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
... | ... | |
2040 | 2057 |
this.tagsController.setEnabled(false); |
2041 | 2058 |
break; |
2042 | 2059 |
} |
2060 |
this.txtDisplaySize.setBackground(UIManager.getColor(ToolsSwingManager.COLOR_TEXTFIELD_BACKGROUND)); |
|
2061 |
if(this.pickerPrecision.get() != null && this.pickerDisplaySize.get() != null){ |
|
2062 |
if(this.pickerPrecision.get() > this.pickerDisplaySize.get()){ |
|
2063 |
this.txtDisplaySize.setBackground(ToolsSwingLocator.getToolsSwingManager().getWarningBackgroundColor()); |
|
2064 |
} |
|
2065 |
} |
|
2043 | 2066 |
updateRelationState(); |
2044 | 2067 |
} |
2045 | 2068 |
|
Also available in: Unified diff