[Schmitzm-commits] r55 - trunk/src/skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Apr 17 16:26:14 CEST 2009
Author: mojays
Date: 2009-04-17 16:26:14 +0200 (Fri, 17 Apr 2009)
New Revision: 55
Modified:
trunk/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
Log:
Modified: trunk/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
===================================================================
--- trunk/src/skrueger/geotools/StyledFeatureCollectionTableModel.java 2009-04-17 14:10:10 UTC (rev 54)
+++ trunk/src/skrueger/geotools/StyledFeatureCollectionTableModel.java 2009-04-17 14:26:14 UTC (rev 55)
@@ -24,14 +24,16 @@
import schmitzm.geotools.gui.FeatureCollectionTableModel;
import skrueger.AttributeMetaData;
+import skrueger.i8n.I8NUtil;
+import skrueger.i8n.Translation;
/**
* This class extends the the {@link FeatureCollectionTableModel} with the
- * functionalities of the {@link AttributeMetaData} (AMD) of {@linkplain StyledMapInterface styled objects}.
+ * functionalities of the {@link AttributeMetaData} of {@linkplain StyledMapInterface styled objects}.
* <ul>
- * <li>column names are translated according to (AMD)</li>
- * <li>columns are hidden according to
+ * <li>column names are translated according to {@link AttributeMetaData#getTitle()}</li>
+ * <li>columns are hidden according to {@link AttributeMetaData#isVisible()()}</li>
* </ul>
* @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
*
@@ -105,8 +107,11 @@
// translate the column names
if ( visibleAMD != null ) {
Iterator<Integer> keys = visibleAMD.keySet().iterator();
- for (int i=0; keys.hasNext(); i++)
- colNames[i] = visibleAMD.get( keys.next() ).getTitle().toString();
+ for (int i=0; i<colNames.length && keys.hasNext(); i++) {
+ Translation title = visibleAMD.get( keys.next() ).getTitle();
+ if ( !I8NUtil.isEmpty(title) )
+ colNames[i] = title.toString();
+ }
}
}
}
More information about the Schmitzm-commits
mailing list