Skip to content
Snippets Groups Projects
Commit c0c9b622 authored by Leonard Kupper's avatar Leonard Kupper
Browse files

Fix group order.

parent 399f7d09
No related branches found
No related tags found
1 merge request!42Legend rasterizer column views
......@@ -69,6 +69,22 @@ public class LegendRasterizer implements Rasterizer<Legend> {
moveIndentation(referenceCellArea, -1 * EXPLANATION_TEXT_INDENTATION_CELLS); // reset indentation
}
// String explanation lists
for (Map.Entry<String, Map<String, String>> list : legend.getSymbolExplanationGroups().entrySet()) {
String groupName = list.getKey();
setLanguage(legend.getLanguage());
writeLine("", referenceCellArea); // Leave space of one empty line
writeLine(groupName, referenceCellArea);
moveIndentation(referenceCellArea, EXPLANATION_TEXT_INDENTATION_CELLS); // set indentation
setLanguage(EXPLANATION_LIST_LANGUAGE);
for (Map.Entry<String, String> explanation : list.getValue().entrySet()) {
String symbol = explanation.getKey();
String description = explanation.getValue();
writeLine(symbol + " " + description, referenceCellArea);
}
moveIndentation(referenceCellArea, -1 * EXPLANATION_TEXT_INDENTATION_CELLS); // reset indentation
}
// Columnview
if (legend.getColumnView().size() > 0) {
setLanguage(legend.getLanguage());
......@@ -108,22 +124,6 @@ public class LegendRasterizer implements Rasterizer<Legend> {
}
}
// String explanation lists
for (Map.Entry<String, Map<String, String>> list : legend.getSymbolExplanationGroups().entrySet()) {
String groupName = list.getKey();
setLanguage(legend.getLanguage());
writeLine("", referenceCellArea); // Leave space of one empty line
writeLine(groupName, referenceCellArea);
moveIndentation(referenceCellArea, EXPLANATION_TEXT_INDENTATION_CELLS); // set indentation
setLanguage(EXPLANATION_LIST_LANGUAGE);
for (Map.Entry<String, String> explanation : list.getValue().entrySet()) {
String symbol = explanation.getKey();
String description = explanation.getValue();
writeLine(symbol + " " + description, referenceCellArea);
}
moveIndentation(referenceCellArea, -1 * EXPLANATION_TEXT_INDENTATION_CELLS); // reset indentation
}
} catch (Rectangle.OutOfSpaceException e) {
throw new InsufficientRenderingAreaException("The amount of data in the legend does not fit on the format.", e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment