From: <de...@us...> - 2012-06-01 17:14:48
|
Revision: 7262 http://fudaa.svn.sourceforge.net/fudaa/?rev=7262&view=rev Author: deniger Date: 2012-06-01 17:14:41 +0000 (Fri, 01 Jun 2012) Log Message: ----------- prise en compte caractere editable Modified Paths: -------------- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java =================================================================== --- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -331,6 +331,9 @@ public abstract int addGeometry(Geometry _geom, Object[] _datas, CtuluCommandContainer _cmd); public void removeGeometries(final int[] _idx, final CtuluCommandContainer _cmd) { + if (!isGeomModifiable_) { + return; + } super.geometry_.remove(_idx, _cmd); } Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java =================================================================== --- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -11,6 +11,7 @@ */ package org.fudaa.ctulu.gis.gml; +import com.memoire.fu.FuLib; import gnu.trove.TIntArrayList; import gnu.trove.TObjectIntHashMap; @@ -58,19 +59,19 @@ public GISGMLZoneExporter() { super(); } - private boolean useIdAsName_; /** - * Cr\xE9ation de tous les attributes types a partir des attributs de la zone. L'attribut pris pour Z n'est pas cr\xE9\xE9, car - * transf\xE9r\xE9 dans le Z. - * + * Cr\xE9ation de tous les attributes types a partir des attributs de la zone. L'attribut pris pour Z n'est pas cr\xE9\xE9, car transf\xE9r\xE9 + * dans le Z. + * * @param _zone La zone. * @param _attIsZ L'attribut pris pour Z * @param _attrIdx Argument de sortie. Une table associant l'indice des attributs de la zone a un attribut cr\xE9\xE9. * @return Les attributs cr\xE9es. */ - public AttributeType[] createAttributes(final GISDataModel _zone, final GISAttributeDouble _attIsZ, final TObjectIntHashMap _attrIdx) { + public AttributeType[] createAttributes(final GISDataModel _zone, final GISAttributeDouble _attIsZ, + final TObjectIntHashMap _attrIdx) { final int attributeNb = _zone.getNbAttributes(); final TIntArrayList attribute = new TIntArrayList(attributeNb); @@ -101,7 +102,6 @@ atts[atts.length - 1] = AttributeTypeFactory.newAttributeType(attInd.getID(), attInd.getDataClass()); return atts; } - DataStore store_; OutputStream out_; @@ -121,8 +121,9 @@ * @throws SchemaException * @throws IllegalAttributeException */ - public void process(final ProgressionInterface _prog, final GISDataModel _zone, final GISAttributeDouble _attIsZ, final DataStore _dest) - throws IOException, SchemaException, IllegalAttributeException { + public void process(final ProgressionInterface _prog, final GISDataModel _zone, final GISAttributeDouble _attIsZ, + final DataStore _dest) + throws IOException, SchemaException, IllegalAttributeException { out_ = null; store_ = _dest; process(_prog, _zone, _attIsZ); @@ -130,7 +131,7 @@ /** * Attention: l'outputstream n'est pas ferme. - * + * * @param _prog * @param _zone * @param _dest @@ -139,29 +140,34 @@ * @throws IllegalAttributeException */ public void processGML(final ProgressionInterface _prog, final GISZoneCollection _zone, final OutputStream _dest) throws IOException, - SchemaException, IllegalAttributeException { + SchemaException, IllegalAttributeException { out_ = _dest; store_ = null; _zone.prepareExport(); process(_prog, _zone, _zone.getAttributeIsZ()); } + public void processGML(final ProgressionInterface _prog, final GISDataModel _zone, final OutputStream _dest) throws IOException, + SchemaException, IllegalAttributeException { + out_ = _dest; + store_ = null; + process(_prog, _zone, null); + } + /** - * Enregistre la zone sous un format GML. - * <p> - * Les attributs globaux sont enregistr\xE9s comme attributs globaux de chaque g\xE9om\xE9trie, l'attribut pris pour Z est - * enregistr\xE9 dans les coordonn\xE9es Z des g\xE9om\xE9tries.<br> - * Les attributs atomiques sont enregistr\xE9s sous forme de tableau de String, s\xE9par\xE9s par une virgule. - * + * Enregistre la zone sous un format GML. <p> Les attributs globaux sont enregistr\xE9s comme attributs globaux de chaque + * g\xE9om\xE9trie, l'attribut pris pour Z est enregistr\xE9 dans les coordonn\xE9es Z des g\xE9om\xE9tries.<br> Les attributs atomiques sont + * enregistr\xE9s sous forme de tableau de String, s\xE9par\xE9s par une virgule. + * * @param _prog Progression de la tache. * @param _zone La zone a enregistrer * @param _attIsZ L'attrribut pris pour Z (atomique ou non). */ private void process(final ProgressionInterface _prog, final GISDataModel _zone, GISAttributeDouble _attIsZ) throws IOException, SchemaException, - IllegalAttributeException { + IllegalAttributeException { /* - * Pour que les z atomiques soient export\xE9s correctement, il faut que - * prepareExport() ait \xE9t\xE9 appel\xE9 en amont de cette m\xE9thode. + * Pour que les z atomiques soient export\xE9s correctement, il faut que prepareExport() ait \xE9t\xE9 appel\xE9 en amont de cette + * m\xE9thode. */ stop_ = false; final TObjectIntHashMap attIdx = new TObjectIntHashMap(_zone.getNbAttributes()); @@ -196,8 +202,9 @@ GISAttributeModel md = (GISAttributeModel) value; sb.append("{").append(md.getObjectValueAt(0).toString().replaceAll(",", "‚")); - for (int k = 1; k < md.getSize(); k++) + for (int k = 1; k < md.getSize(); k++) { sb.append(",").append(md.getObjectValueAt(k).toString().replaceAll(",", "‚")); + } sb.append("}"); } else if (value != null) { sb.append("{").append(value.toString().replaceAll(",", "‚")); @@ -205,10 +212,10 @@ } feature.setAttribute(j, sb); + } /// Atributs standards. + else { + feature.setAttribute(j, _zone.getValue(attIdx.get(atts[j]), i)); } - - /// Atributs standards. - else feature.setAttribute(j, _zone.getValue(attIdx.get(atts[j]), i)); } // Enregistrement de l'index de la g\xE9om\xE9trie dans le fichier @@ -217,6 +224,8 @@ up.majAvancement(); } + } catch (Exception ex) { + ex.printStackTrace(); } finally { if (writer != null) { if (out_ == null) { @@ -229,19 +238,17 @@ } public FeatureType createFeatureType(final GISDataModel _zone, final AttributeType[] _atts) throws SchemaException { - /* Changement de GISZoneCollection en GISDataModel, suppression des lignes dessous - String name = _zone.getTitle(); - if (name == null) { - name = "zone"; - }*/ + /* + * Changement de GISZoneCollection en GISDataModel, suppression des lignes dessous String name = _zone.getTitle(); if (name == + * null) { name = "zone"; } + */ final FeatureType featureType = FeatureTypes.newFeatureType(_atts, "zone"); return featureType; } /** - * A utiliser pour des donn\xE9es sensibles lorsque l'on veut que certains attributs soient retrouv\xE9 dans toutes les - * langues. - * + * A utiliser pour des donn\xE9es sensibles lorsque l'on veut que certains attributs soient retrouv\xE9 dans toutes les langues. + * * @return true si on utilise l'ID de la variable pour construire l'attribut \xE0 inclure dans le fichier de sortie. */ protected boolean isUseIdAsName() { Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -605,7 +605,7 @@ TIntArrayList y = new TIntArrayList(50); for (int i = nombre - 1; i >= 0; i--) { - if (!modele_.isGeometryReliee(i) || !modele_.isGeometryFermee(i)) { + if (!modele_.isGeometryReliee(i) || !modele_.isGeometryFermee(i)||!isPainted(i, _versEcran)) { continue; } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -39,6 +39,7 @@ import com.memoire.bu.BuTable; import com.memoire.fu.Fu; import com.memoire.fu.FuLog; +import com.memoire.re.RESyntax; import com.vividsolutions.jts.geom.Envelope; import org.fudaa.ctulu.CtuluImageContainer; import org.fudaa.ctulu.CtuluLibImage; Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -34,7 +34,7 @@ */ public class CalqueGISEditionAction extends EbliActionPaletteTreeModel implements PropertyChangeListener, ZSelectionListener { - private ZEditorDefault editor_; + protected ZEditorDefault editor_; private ZScene scene_; private boolean hide_; // Vrai si le panel d'\xE9dition est ferm\xE9. // Calques utilis\xE9 dans cette action @@ -88,7 +88,7 @@ } } - private void unactivePaletteCreation() { + protected void unactivePaletteCreation() { if (calqueEdition_ != null) { calqueEdition_.cancelEdition(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |