Revision 38560
branches/v2_0_0_prep/libraries/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java | ||
---|---|---|
856 | 856 |
throw new NotContinueWizardException(_msg, ex, this); |
857 | 857 |
} |
858 | 858 |
|
859 |
efad1.setIsPrimaryKey(((Boolean) tm.getValueAt(i, COLUMN_PRIMARYKEY)) |
|
860 |
.booleanValue()); |
|
861 |
efad1.setAllowNull(!((Boolean) tm.getValueAt(i, COLUMN_MANDATORY)) |
|
862 |
.booleanValue()); |
|
863 | 859 |
efad1.setSRS((IProjection) tm.getValueAt(i, COLUMN_CRS)); |
864 | 860 |
|
865 | 861 |
//If there is not a previous default geometry field, add it |
... | ... | |
869 | 865 |
edft.setDefaultGeometryAttributeName(efad1.getName()); |
870 | 866 |
} |
871 | 867 |
} |
868 |
|
|
869 |
// pk and mandatory |
|
870 |
efad1.setIsPrimaryKey(((Boolean) tm.getValueAt(i, COLUMN_PRIMARYKEY)) |
|
871 |
.booleanValue()); |
|
872 |
efad1.setAllowNull(!((Boolean) tm.getValueAt(i, COLUMN_MANDATORY)) |
|
873 |
.booleanValue()); |
|
874 |
|
|
872 | 875 |
} |
873 | 876 |
} |
874 | 877 |
|
... | ... | |
1117 | 1120 |
List<int[]> supported, |
1118 | 1121 |
int index /* 0 for geom types, 1 for geom subtypes */) { |
1119 | 1122 |
|
1123 |
if (supported == null) { |
|
1124 |
// all supported |
|
1125 |
return all_types; |
|
1126 |
} |
|
1127 |
|
|
1120 | 1128 |
List<ComboItemGeomType> resp = new ArrayList<ComboItemGeomType>(); |
1121 | 1129 |
int len = all_types.size(); |
1122 | 1130 |
ComboItemGeomType item = null; |
branches/v2_0_0_prep/extensions/extEditing/config/text.properties | ||
---|---|---|
308 | 308 |
_Unable_to_draw_help_geometry=No se ha podido dibujar geometr?a de ayuda |
309 | 309 |
_Drawing_error=Error en el dibujado |
310 | 310 |
_Split_line_must_start_and_end_outside_bbox=La l?nea de corte debe empezar y terminar fuera del rect?ngulo que contiene a la geometr?a |
311 |
_Invalid_values_in_some_fields_must_be_edited_before_end_editing=Hay valores no v?lidos en algunos campos. Deben editarse antes de cerrar la edici?n |
branches/v2_0_0_prep/extensions/extEditing/config/text_en.properties | ||
---|---|---|
305 | 305 |
_Unable_to_draw_help_geometry=Unable to draw help geometry |
306 | 306 |
_Drawing_error=Drawing error |
307 | 307 |
_Split_line_must_start_and_end_outside_bbox=Split line must start and end outside the geometry's bounding box |
308 |
_Invalid_values_in_some_fields_must_be_edited_before_end_editing=Invalid values in some fields must be edited before closing editing session |
|
308 | 309 |
|
310 |
|
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/EditionManager.java | ||
---|---|---|
28 | 28 |
import java.util.Iterator; |
29 | 29 |
import java.util.List; |
30 | 30 |
|
31 |
import javax.swing.JOptionPane; |
|
31 | 32 |
import javax.swing.JPanel; |
32 | 33 |
import javax.swing.SwingUtilities; |
33 | 34 |
|
... | ... | |
37 | 38 |
import org.gvsig.andami.PluginServices; |
38 | 39 |
import org.gvsig.andami.messages.NotificationManager; |
39 | 40 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
41 |
import org.gvsig.app.ApplicationLocator; |
|
40 | 42 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
41 | 43 |
import org.gvsig.editing.layers.FactoryLayerEdited; |
42 | 44 |
import org.gvsig.editing.layers.ILayerEdited; |
... | ... | |
63 | 65 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanel; |
64 | 66 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent; |
65 | 67 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
66 |
import org.gvsig.tools.service.ServiceException; |
|
67 | 68 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
68 | 69 |
import org.gvsig.tools.swing.api.dynobject.DynObjectSwingManager; |
69 | 70 |
import org.gvsig.tools.swing.api.dynobject.JDynObjectComponent; |
... | ... | |
338 | 339 |
dynObjectComponent = |
339 | 340 |
dynObjectSwinManager.createJDynObjectComponent( |
340 | 341 |
feature.getAsDynObject(), true); |
341 |
} catch (ServiceException e) { |
|
342 |
throw new FeatureRuleMandatoryAttributesException(e, |
|
343 |
store.getFullName()); |
|
342 |
} catch (Exception e) { |
|
343 |
|
|
344 |
// TODO This has to be improved |
|
345 |
// Instead of this warning, show dialog to |
|
346 |
// fill feature type |
|
347 |
showBadValuesMessage(e.getMessage()); |
|
348 |
return; |
|
349 |
|
|
344 | 350 |
} |
345 | 351 |
final JPanel panel = new JPanel(); |
346 | 352 |
|
... | ... | |
372 | 378 |
|
373 | 379 |
} |
374 | 380 |
|
381 |
/** |
|
382 |
* @param message |
|
383 |
*/ |
|
384 |
private void showBadValuesMessage(String message) { |
|
385 |
|
|
386 |
ApplicationLocator.getManager().message( |
|
387 |
message, |
|
388 |
JOptionPane.WARNING_MESSAGE); |
|
389 |
|
|
390 |
/* |
|
391 |
* We cannot do this because window focus |
|
392 |
* causes exception in drawing |
|
393 |
* |
|
394 |
IWindow iw = PluginServices.getMDIManager().getActiveWindow(); |
|
395 |
Component pare = null; |
|
396 |
if (iw instanceof Component) { |
|
397 |
pare = (Component) iw; |
|
398 |
} |
|
399 |
|
|
400 |
String _tit = Messages.getText("editing"); |
|
401 |
String _msg = Messages.getText("_Invalid_values_in_some_fields_must_be_edited_before_end_editing"); |
|
402 |
_msg = _msg + "\n\n[" + message + "]"; |
|
403 |
|
|
404 |
JOptionPane.showMessageDialog( |
|
405 |
pare, |
|
406 |
_msg, _tit, |
|
407 |
JOptionPane.WARNING_MESSAGE); |
|
408 |
*/ |
|
409 |
} |
|
410 |
|
|
375 | 411 |
private void addCheckRules(FLyrVect layer) { |
376 | 412 |
try { |
377 | 413 |
FeatureType featureType = |
Also available in: Unified diff