24 |
|
|
25 |
import schmitzm.geotools.gui.FeatureCollectionTableModel; |
import schmitzm.geotools.gui.FeatureCollectionTableModel; |
26 |
import skrueger.AttributeMetaData; |
import skrueger.AttributeMetaData; |
27 |
|
import skrueger.i8n.I8NUtil; |
28 |
|
import skrueger.i8n.Translation; |
29 |
|
|
30 |
|
|
31 |
/** |
/** |
32 |
* This class extends the the {@link FeatureCollectionTableModel} with the |
* This class extends the the {@link FeatureCollectionTableModel} with the |
33 |
* functionalities of the {@link AttributeMetaData} (AMD) of {@linkplain StyledMapInterface styled objects}. |
* functionalities of the {@link AttributeMetaData} of {@linkplain StyledMapInterface styled objects}. |
34 |
* <ul> |
* <ul> |
35 |
* <li>column names are translated according to (AMD)</li> |
* <li>column names are translated according to {@link AttributeMetaData#getTitle()}</li> |
36 |
* <li>columns are hidden according to |
* <li>columns are hidden according to {@link AttributeMetaData#isVisible()()}</li> |
37 |
* </ul> |
* </ul> |
38 |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
39 |
* |
* |
107 |
// translate the column names |
// translate the column names |
108 |
if ( visibleAMD != null ) { |
if ( visibleAMD != null ) { |
109 |
Iterator<Integer> keys = visibleAMD.keySet().iterator(); |
Iterator<Integer> keys = visibleAMD.keySet().iterator(); |
110 |
for (int i=0; keys.hasNext(); i++) |
for (int i=0; i<colNames.length && keys.hasNext(); i++) { |
111 |
colNames[i] = visibleAMD.get( keys.next() ).getTitle().toString(); |
Translation title = visibleAMD.get( keys.next() ).getTitle(); |
112 |
|
if ( !I8NUtil.isEmpty(title) ) |
113 |
|
colNames[i] = title.toString(); |
114 |
|
} |
115 |
} |
} |
116 |
} |
} |
117 |
} |
} |