From: <emm...@us...> - 2008-10-17 15:17:36
|
Revision: 4079 http://fudaa.svn.sourceforge.net/fudaa/?rev=4079&view=rev Author: emmanuel_martin Date: 2008-10-17 15:17:26 +0000 (Fri, 17 Oct 2008) Log Message: ----------- ajout des natures dans les fichier st et changement mineur dans l'aspect du tableau d'importation dans la wizard Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-10-17 08:08:51 UTC (rev 4078) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-10-17 15:17:26 UTC (rev 4079) @@ -118,7 +118,7 @@ if (str != null) { lignes.add(str); if ("".equals(name)) { - names.add(CtuluLib.getS(isSt_?"_P":"_N")+((GISGeometry)str).getId()); + names.add(CtuluLib.getS(isSt_?"P":"_N")+((GISGeometry)str).getId()); } else { names.add(name); @@ -135,7 +135,7 @@ if (str != null) { lignes.add(str); if ("".equals(name)) { - names.add(CtuluLib.getS("_P")+((GISGeometry)str).getId()); + names.add(CtuluLib.getS("P")+((GISGeometry)str).getId()); } else { names.add(name); @@ -147,7 +147,7 @@ if (lignes.size() > 0) { final GISZoneCollectionLigneBrisee zligs = new GISZoneCollectionLigneBrisee(null); zligs.addAllLineStringClosedOrNode((LineString[]) lignes.toArray(new LineString[lignes.size()]), null); - zligs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE}, null); + zligs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE, GISAttributeConstants.NATURE}, null); if(zligs.getAttributeIsZ()!=null) zligs.setAttributeIsZ(GISAttributeConstants.BATHY); zligs.postImport(0); @@ -157,6 +157,11 @@ for (int i=0; i<names.size(); i++) { attmod.setObject(i,attmod.getAttribute().createDataForGeom(names.get(i),1),null); } + // Affectation de l'attribut nature + attmod=zligs.getModel(GISAttributeConstants.NATURE); + for (int i=0; i<attmod.getSize(); i++) { + attmod.setObject(i,attmod.getAttribute().createDataForGeom(GISAttributeConstants.ATT_NATURE_PF,1),null); + } ret[0]=zligs; } @@ -171,7 +176,7 @@ } zdirs.addAllLineStringClosedOrNode(ldirs, null); - zdirs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE}, null); + zdirs.setAttributes(new GISAttributeInterface[] { GISAttributeConstants.BATHY, GISAttributeConstants.TITRE, GISAttributeConstants.NATURE}, null); if(zdirs.getAttributeIsZ()!=null) zdirs.setAttributeIsZ(GISAttributeConstants.BATHY); zdirs.postImport(0); @@ -181,6 +186,11 @@ for (int i=0; i<namedirs.length; i++) { attmod.setObject(i,attmod.getAttribute().createDataForGeom(namedirs[i],1),null); } + // Affectation de l'attribut nature + attmod=zdirs.getModel(GISAttributeConstants.NATURE); + for (int i=0; i<attmod.getSize(); i++) { + attmod.setObject(i,attmod.getAttribute().createDataForGeom(GISAttributeConstants.ATT_NATURE_LD,1),null); + } ret[1]=zdirs; } return ret; Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-17 08:08:51 UTC (rev 4078) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlWizardImportStepDestination.java 2008-10-17 15:17:26 UTC (rev 4079) @@ -208,10 +208,23 @@ String value=_value.toString(); if (_value==ModelTableImport.NEW_CALQUE||_value==ModelTableImport.NO_CALQUE) value=FSigLib.getS(value); - return new BuLabel(value); + BuLabel lbl =new BuLabel(value); + lbl.setHorizontalAlignment(BuLabel.CENTER); + return lbl; } - else - return new BuLabel(_value.toString()); + else if (_column==1){ + BuLabel lbl =new BuLabel(_value.toString()); + lbl.setHorizontalAlignment(BuLabel.CENTER); + return lbl; + } + else { + BuLabel lbl =new BuLabel(_value.toString()); + lbl.setHorizontalAlignment(BuLabel.CENTER); + if(_isSelected){ + lbl.setText("<html><b>"+lbl.getText()+"</b></html>"); + } + return lbl; + } } } @@ -456,6 +469,8 @@ pnInfo_.setSrc(data_); // Update du panel d'import table_.setModel(new ModelTableImport(generateTitleColumnTable(), generateDataTable())); + table_.getColumnModel().getColumn(0).setCellRenderer(new ImportTableRenderer()); + table_.getColumnModel().getColumn(1).setCellRenderer(new ImportTableRenderer()); table_.getColumnModel().getColumn(2).setCellRenderer(new ImportTableRenderer()); table_.getColumnModel().getColumn(3).setCellRenderer(new ImportTableRenderer()); ImportTableEditorForBCalqueSelection editor=new ImportTableEditorForBCalqueSelection(); @@ -531,7 +546,7 @@ } protected void fillAttributsPanel(){ - // Si rien n'est selectionn\xE9, on iter sur les lignes jusqu'\xE0 en trouver une ayant des truc amapper mapper + // Si rien n'est selectionn\xE9, on iter sur les lignes jusqu'\xE0 en trouver une ayant des truc a mapper if(table_.getSelectedRow()!=-1) generateMappingAttribute(table_.getSelectedRow()); else{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |