From: <bma...@us...> - 2008-07-09 16:21:29
|
Revision: 3677 http://fudaa.svn.sourceforge.net/fudaa/?rev=3677&view=rev Author: bmarchan Date: 2008-07-09 09:21:37 -0700 (Wed, 09 Jul 2008) Log Message: ----------- Ajout de l'attribut Nature Modified Paths: -------------- branches/Br_FudaaModeleur_TF/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java Modified: branches/Br_FudaaModeleur_TF/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java =================================================================== --- branches/Br_FudaaModeleur_TF/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-07-09 16:20:58 UTC (rev 3676) +++ branches/Br_FudaaModeleur_TF/fudaa_devel/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java 2008-07-09 16:21:37 UTC (rev 3677) @@ -30,7 +30,7 @@ } public static String toString(final GISAttributeInterface _att) { - if (_att == TITRE || _att == BATHY) { + if (_att == TITRE || _att == BATHY || _att == NATURE) { return _att.getID(); } final String attributeSep = getAttributeSep(); @@ -49,6 +49,9 @@ if (BATHY.getID().equals(_saveName)) { return BATHY; } + if (NATURE.getID().equals(_saveName)) { + return NATURE; + } return null; } @@ -76,6 +79,9 @@ if (TITRE.isSameContent(res)) { res = TITRE; } + else if (NATURE.isSameContent(res)) { + res = NATURE; + } } return res; @@ -85,11 +91,12 @@ final ArrayList l = new ArrayList(2); l.add(BATHY); l.add(TITRE); + l.add(NATURE); return l; } public static boolean isConstant(final GISAttributeInterface _att) { - return _att == TITRE || _att == BATHY; + return _att == TITRE || _att == BATHY || _att == NATURE; } /** @@ -100,10 +107,6 @@ private int numid_=0; String def_ = CtuluLib.getS("<Defaut>"); - protected Object readResolve() { - return TITRE; - } - public String getID() { return "ATTRIBUTE_TITLE"; } @@ -125,14 +128,23 @@ }; /** + * Un attribut nature, global. + */ + public final static GISAttributeString NATURE = new GISAttributeString(CtuluLib.getS("Nature"), false) { + public String getID() { + return "ATTRIBUTE_NATURE"; + } + + public boolean isEditable() { + return false; + } + }; + + /** * Un attribut bathy, atomique. */ public final static GISAttributeDouble BATHY = new GISAttributeDouble(CtuluLib.getS("z"), true) { - protected Object readResolve() { - return BATHY; - } - public String getID() { return "ATTRIBUTE_Z"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |